smlinux/base/libcap/libcap.SMBuild
2022-09-23 11:42:48 +05:30

41 lines
1.2 KiB
Text
Executable file

app=libcap
version=2.26
build=1sml
homepage="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/"
download="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-$version.tar.xz"
desc="library to get/set POSIX capabilities"
requires="musl"
build() {
mkandenterbuilddir
rm -rf $app-$version
tar xf $srcdir/$app-$version.tar.?z*
cd $app-$version
fixbuilddirpermissions
sed -i 's,BUILD_GPERF := ,BUILD_GPERF := no #,' Make.Rules
cp $srcdir/libcap2-cap_names.h libcap/cap_names.h
touch libcap/cap_names.list.h libcap/_makenames libcap/cap_names.h
make prefix="" man_prefix=/share/man lib=lib CFLAGS="$CFLAGS" \
BUILD_CC="$CC"
make RAISE_SETFCAP=no FAKEROOT=$pkg prefix="" man_prefix=/share/man \
SBINDIR=/bin lib=lib install
LIBDIR=$pkg/lib
SBINDIR=$pkg/bin
LD_LIBRARY_PATH=${LIBDIR} ${SBINDIR}/setcap cap_setfacap=i ${SBINDIR}/setcap || echo "oops"
cp License $pkgdocs/
mkfinalpkg
}
sha512sums="
e40340d6a10bb9e935c9112e6ec3274d2b7ce79e3da23bf49fa575b381a21678597a2a1a2dee5732590700634fca5fa18c68ea98e8558dfdd12397247b72c395 libcap-2.26.tar.lz
75e8856399e8007424c1130eecebc4db05abda0ece9fa7533ad674e8f67e34122036238cc950f93b7711877a9b5abab0c46c71253e0a06d8cd7558e149e1baf9 libcap2-cap_names.h
"