# Maintainer: Natanael Copa pkgname=gradm pkgver=2.9.1.201307031629 _ver=${pkgver/.20/-20} pkgrel=0 pkgdesc="administrative utility for grsecurity kernels" url="http://www.grsecurity.org/" arch="all" license="GPL" makedepends="bison flex" install="" subpackages="$pkgname-doc" source="http://grsecurity.net/stable/gradm-$_ver.tar.gz policy base.policyd grsec-rbac.initd" _builddir="$srcdir/gradm2" prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" make || return 1 } package() { cd "$_builddir" make INSTALL=install DESTDIR="$pkgdir" install || return 1 # we don't want the grsecurity-recommended policy as it's old # and non-modular. rm "$pkgdir"/etc/grsec/policy # install the base policy file which pulls in everything else. install -m644 "$srcdir"/policy "$pkgdir"/etc/grsec/policy # prepare and install base policy to /var/lib/grsec/policy.d install -d -D "$pkgdir"/var/lib/grsec/policy.d install -m644 "$srcdir"/base.policyd "$pkgdir"/var/lib/grsec/policy.d/00-base # install grsec-rbac into initd install -d -D "$pkgdir"/etc/init.d install -m755 "$srcdir"/grsec-rbac.initd "$pkgdir"/etc/init.d/grsec-rbac } md5sums="3e28596bc8e58d49e647cbb5a6d94d28 gradm-2.9.1-201307031629.tar.gz 38ee3aef884bdcfe6a5b925760f6220b policy 1d4a2c2e522b7124ad901ae102181e72 base.policyd 2fc5d055dd43a2d9e1bed378dcab8641 grsec-rbac.initd" sha256sums="f8207ad36d61d0c1509a9d6b3668ffcb52d1953af5419b8717e9ca7db3d101ac gradm-2.9.1-201307031629.tar.gz 46ecc20298a4497340435f7f6bf7b96d075a931e1f533c1b330cbd13616bc463 policy a6d40bc669036cd61d8eec26b7ce356cccdec2bc0640556515cb2a98a461672c base.policyd 8e514a8a8b910aef6d9cbd081fab2df409d85d55c49664f4c749110233fe9739 grsec-rbac.initd" sha512sums="67b461b2e6423ac2917438546be90c6c1d8210545a3e3c7c8c351317ebd556f5e6126e4765e617979bc51442817af0c1d1d2b0d33ce88ec44c0f303cfaba76e1 gradm-2.9.1-201307031629.tar.gz 0cd4a85d40815813129c669400a9e2fb4b5258c1d20dae8075e3f3123c3ff1ece9dc3a16209ef8d6cb968477ab687926923bcdca0b78fb3beff105a699284a01 policy 8b6a3a6cf550119dbf162d6dffcf5acef30cae6b070a028d5d5697bf20ce5e0d7e1900992f7c88c60b2eb5e5118561753e8111440a6032922780620ac25ee7cb base.policyd 4d49ff1ab989e1fdf9c35e1e10d765bf4fa9317b76ff0218fa871623cf071e0aec694b7336b573b384d73d8e034aa8431e669e827ed224d75aae430ec23088c9 grsec-rbac.initd"