summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pam_cap/APKBUILD66
1 files changed, 66 insertions, 0 deletions
diff --git a/pam_cap/APKBUILD b/pam_cap/APKBUILD
new file mode 100644
index 0000000..3b65afd
--- /dev/null
+++ b/pam_cap/APKBUILD
@@ -0,0 +1,66 @@
+# Maintainer:
+
+# when changing _ver or _rel make sure they match main/libcap
+_ver=2.70
+_rel=0
+
+pkgname=pam_cap
+pkgver=$_ver
+pkgrel=$_rel
+pkgdesc="POSIX 1003.1e capabilities, pam module"
+arch="all"
+license="BSD-3-Clause OR GPL-2.0-only"
+url="https://sites.google.com/site/fullycapable/"
+depends="libcap2=$_ver-r$_rel"
+makedepends="libcap-dev linux-headers linux-pam-dev perl bash"
+#subpackages="$pkgname-doc" # libcap-doc owns the manpages
+source="https://kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-$pkgver.tar.xz"
+options="!check"
+builddir="$srcdir/libcap-$_ver"
+
+prepare() {
+ default_prepare
+ # verify the libcap version, based on zfs-lts APKBUILD prepare()
+ local _libcap_apkbuild="$startdir"/../../main/libcap/APKBUILD
+ if [ -f $_libcap_apkbuild ]; then
+ (
+ . $_libcap_apkbuild
+ pkgname=$_name
+ [ "$_ver" != "$pkgver" ] && die "please update _ver to $pkgver"
+ [ "$_rel" != "$pkgrel" ] && die "please update _rel to $pkgrel"
+ return 0
+ )
+ fi
+}
+
+build() {
+ make -C pam_cap\
+ BUILD_CC=gcc \
+ CC="${CC:-gcc}" \
+ lib=lib \
+ prefix=/usr \
+ lib_prefix= \
+ GOLANG=no \
+ PAM_CAP=yes \
+ DESTDIR="$pkgdir"
+}
+
+package() {
+ make -C pam_cap \
+ lib=lib \
+ prefix=/usr \
+ lib_prefix= \
+ GOLANG=no \
+ PAM_CAP=yes \
+ DESTDIR="$pkgdir" \
+ install
+
+ install -D -m644 -t "$pkgdir"/etc/security pam_cap/capability.conf
+ # libcap-doc owns these:
+ #install -D -m644 -t "$pkgdir"/usr/share/man/man5 doc/capability.conf.5
+ #install -D -m644 -t "$pkgdir"/usr/share/man/man8 doc/pam_cap.8
+}
+
+sha512sums="
+4e0bf0efeccb654c409afe9727b2b53c1d4da8190d7a0a9848fc52550ff3e13502add3eacde04a68a5b7bec09e91df487f64c5746ba987f873236a9e53b3d4e8 libcap-2.70.tar.xz
+"