8.28.1. Installation of Libcap
![[Note]](../images/note.png)
Note
If updating this package on an existing system and the go compiler is
installed, prevent a build error by using export GOLANG=no
before running the commands below. Be sure to unset GOLANG
after installation is complete.
Prevent static libraries from being installed:
sed -i '/install -m.*STA/d' libcap/Makefile
Compile the package:
make prefix=/usr lib=lib
The meaning of the make option:
lib=libThis parameter sets the library directory to
/usr/lib rather than
/usr/lib64 on x86_64. It has no effect on
x86.
To test the results, issue:
make test
Install the package:
make prefix=/usr lib=lib install
8.28.2. Installation of Libcap - 32-bit
Clean previous build:
make distclean
Compile the package:
make CC="gcc -m32 -march=i686"
Install the package:
make CC="gcc -m32 -march=i686" lib=lib32 prefix=$PWD/DESTDIR/usr -C libcap install
cp -Rv DESTDIR/usr/lib32/* /usr/lib32
sed -e "s|^libdir=.*|libdir=/usr/lib32|" -i /usr/lib32/pkgconfig/lib{cap,psx}.pc
chmod -v 755 /usr/lib32/libcap.so.2.78
rm -rf DESTDIR