libcap: fix bootstrap on environment with go and pam-devel

new package: pam-cap
This commit is contained in:
Đoàn Trần Công Danh 2023-08-31 22:27:04 +07:00
parent 63a32902dd
commit 6c63cec625
4 changed files with 29 additions and 38 deletions

1
srcpkgs/libcap-pam Symbolic link
View file

@ -0,0 +1 @@
libcap

View file

@ -1,30 +0,0 @@
# Template file for 'libcap-pam'
pkgname=libcap-pam
version=2.34
revision=1
build_style=gnu-makefile
make_use_env=yes
make_install_args="RAISE_SETFCAP=no"
hostmakedepends="gperf perl pam-devel"
makedepends="pam-devel attr-devel"
short_desc="POSIX.1e capabilities suite - PAM module"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://sites.google.com/site/fullycapable/"
changelog="https://sites.google.com/site/fullycapable/release-notes-for-libcap"
distfiles="${KERNEL_SITE}/libs/security/linux-privs/libcap2/libcap-${version}.tar.xz"
checksum=aecdd42015955068d3d94b7caa9590fcb2de5df53ce53c61a21b912bfc0b1611
conf_files="/etc/security/capability.conf"
pre_build() {
vsed -e 's,CC :=,CC ?=,' -i Make.Rules
# Disable tests, as they cause cross-build failure
vsed -e '/test:/,/.sh/d' -e '/tests/d' -i Makefile
}
do_install() {
vinstall pam_cap/capability.conf 644 etc/security
vmkdir usr/lib/security
mv pam_cap/pam_cap.so ${DESTDIR}/usr/lib/security
}

View file

@ -1 +0,0 @@
pkgname=libcap

View file

@ -1,27 +1,39 @@
# Template file for 'libcap'
pkgname=libcap
version=2.69
revision=1
revision=2
bootstrap=yes
build_style=gnu-makefile
make_install_args="SBINDIR=/usr/bin exec_prefix=/usr
LIBDIR=/usr/lib PKGCONFIGDIR=/usr/lib/pkgconfig RAISE_SETFCAP=no"
make_build_args="GOLANG=no"
make_use_env=yes
make_check_target="test"
short_desc="POSIX.1e capabilities suite"
maintainer="skmpz <dem.procopiou@gmail.com>"
license="GPL-2.0-only"
license="GPL-2.0-only, BSD-3-Clause"
homepage="https://sites.google.com/site/fullycapable/"
changelog="https://sites.google.com/site/fullycapable/release-notes-for-libcap"
distfiles="${KERNEL_SITE}/libs/security/linux-privs/libcap2/libcap-${version}.tar.xz"
checksum=f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb
if [ "$CROSS_BUILD" ]; then
make_build_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
elif [ "$CHROOT_READY" ]; then
hostmakedepends="gperf"
make_build_args+=" CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
fi
if [ "$CHROOT_READY" ]; then
hostmakedepends="gperf"
makedepends="pam-devel"
make_build_args+=" PAM_CAP=yes"
else
make_build_args+=" PAM_CAP=no"
fi
make_install_args="${make_build_args} SBINDIR=/usr/bin exec_prefix=/usr
LIBDIR=/usr/lib PKGCONFIGDIR=/usr/lib/pkgconfig RAISE_SETFCAP=no"
post_install() {
vlicense License
}
libcap-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
@ -43,3 +55,12 @@ libcap-progs_package() {
vmove usr/share
}
}
libcap-pam_package() {
conf_files="/etc/security/capability.conf"
short_desc+=" - PAM module"
pkg_install() {
vinstall pam_cap/capability.conf 644 etc/security
vmove usr/lib/security
}
}