diff --git a/templates/libcap-devel b/templates/libcap-devel new file mode 120000 index 0000000000..4085af6401 --- /dev/null +++ b/templates/libcap-devel @@ -0,0 +1 @@ +libcap \ No newline at end of file diff --git a/templates/libcap-pam b/templates/libcap-pam new file mode 120000 index 0000000000..4085af6401 --- /dev/null +++ b/templates/libcap-pam @@ -0,0 +1 @@ +libcap \ No newline at end of file diff --git a/templates/libcap-progs b/templates/libcap-progs new file mode 120000 index 0000000000..4085af6401 --- /dev/null +++ b/templates/libcap-progs @@ -0,0 +1 @@ +libcap \ No newline at end of file diff --git a/templates/libcap/build.diff b/templates/libcap/build.diff new file mode 100644 index 0000000000..b38f5fc439 --- /dev/null +++ b/templates/libcap/build.diff @@ -0,0 +1,18 @@ +--- progs/capsh.c.orig 2009-05-10 19:57:26.897493561 +0200 ++++ progs/capsh.c 2009-05-10 19:57:40.092519179 +0200 +@@ -9,6 +9,7 @@ + * capability manipulations work as expected (or not). + */ + ++#include + #include + #include + #include +@@ -16,7 +17,6 @@ + #include + #include + #include +-#include + + /* prctl based API for altering character of current process */ + #define PR_GET_KEEPCAPS 7 diff --git a/templates/libcap/devel.template b/templates/libcap/devel.template new file mode 100644 index 0000000000..3455a2fb7f --- /dev/null +++ b/templates/libcap/devel.template @@ -0,0 +1,17 @@ +# Template file for 'libcap-devel'. +# +short_desc="${short_desc} (development files)" +long_desc="${long_desc} + + This package contains files for development, headers, static libs, etc." + +Add_dependency run libcap + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib ${DESTDIR}/usr/share/man + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/lib/libcap.*a ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/libcap.so ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/share/man/man3 ${DESTDIR}/usr/share/man +} diff --git a/templates/libcap/pam.template b/templates/libcap/pam.template new file mode 100644 index 0000000000..495f611e77 --- /dev/null +++ b/templates/libcap/pam.template @@ -0,0 +1,19 @@ +# Template file for 'libcap-pam'. +# +short_desc="${short_desc} (PAM module)" +long_desc="${long_desc} + + This package contains a PAM module provided by the libcap package." + +conf_files="/etc/security/capability.conf" + +Add_dependency run glibc +Add_dependency run libcap +Add_dependency run pam + +do_install() +{ + mkdir -p ${DESTDIR}/lib + mv ${SRCPKGDESTDIR}/lib/security ${DESTDIR}/lib + mv ${SRCPKGDESTDIR}/etc ${DESTDIR} +} diff --git a/templates/libcap/progs.template b/templates/libcap/progs.template new file mode 100644 index 0000000000..cd60a5e5a0 --- /dev/null +++ b/templates/libcap/progs.template @@ -0,0 +1,16 @@ +# Template file for 'libcap-progs'. +# +short_desc="${short_desc} (utilities)" +long_desc="${long_desc} + + This package contains binary utilities provided by the libcap package." + +Add_dependency run glibc +Add_dependency run libcap + +do_install() +{ + mkdir -p ${DESTDIR}/usr/share/man + mv ${SRCPKGDESTDIR}/usr/sbin ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/share/man/man8 ${DESTDIR}/usr/share/man +} diff --git a/templates/libcap/template b/templates/libcap/template new file mode 100644 index 0000000000..2509094525 --- /dev/null +++ b/templates/libcap/template @@ -0,0 +1,32 @@ +# Template file for 'libcap' +pkgname=libcap +sourcepkg=$pkgname +version=2.16 +distfiles="${KERNEL_SITE}/libs/security/linux-privs/libcap2/$pkgname-$version.tar.bz2" +build_style=gnu_makefile +make_install_args="prefix=/usr" +short_desc="POSIX.1e capabilities library" +maintainer="Juan RP " +checksum=9c5a41a5577d6f702fe4d29e92f91f1d586a2ef272f6b7fa137bae3f0e76cc2f +long_desc=" + libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) + draft 15 capabilities." + +subpackages="devel pam progs" +Add_dependency build perl +Add_dependency build pam +Add_dependency full glibc + +pre_configure() +{ + sed -i -e "s|LIBDIR=\$(FAKEROOT)\$(lib_prefix)\/lib|LIBDIR=\$(FAKEROOT)/\$(lib)|g" \ + ${wrksrc}/Make.Rules +} + +post_install() +{ + install -D -m644 ${wrksrc}/pam_cap/capability.conf \ + ${DESTDIR}/etc/security/capability.conf + mkdir -p ${DESTDIR}/lib + mv ${DESTDIR}/usr/lib/security ${DESTDIR}/lib +}