aboutsummaryrefslogtreecommitdiffstats
path: root/main/gradm/APKBUILD
blob: d56c4eaaa7e4eb26ceefe72f9e65e06ed586f6b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gradm
pkgver=3.1.201503211320
_ver=${pkgver/.20/-20}
pkgrel=0
pkgdesc="administrative utility for grsecurity kernels"
url="http://www.grsecurity.org/"
arch="all"
license="GPL"
makedepends="bison flex-dev linux-headers"
install=""
subpackages="$pkgname-doc"
source="http://grsecurity.net/stable/gradm-$_ver.tar.gz
	policy
	base.policyd
	grsec-rbac.initd"

_builddir="$srcdir/gradm"
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 LIBS="" || return 1
}

package() {
	cd "$_builddir"
	make LIBS="" 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="4e00bb0b4e74d3af0c2f7331eca11d62  gradm-3.1-201503211320.tar.gz
38ee3aef884bdcfe6a5b925760f6220b  policy
1d4a2c2e522b7124ad901ae102181e72  base.policyd
e76916d72b4af3e430ff53de671e2c8c  grsec-rbac.initd"
sha256sums="325d85c80cf997b972b1ea344916130e955b678a2377b12296486d2c0f18cd9f  gradm-3.1-201503211320.tar.gz
46ecc20298a4497340435f7f6bf7b96d075a931e1f533c1b330cbd13616bc463  policy
a6d40bc669036cd61d8eec26b7ce356cccdec2bc0640556515cb2a98a461672c  base.policyd
6aa91aaddc74f96e2dc4913a10941318257f2bf4c0b1fa2a7d5ad25386d39b8b  grsec-rbac.initd"
sha512sums="05b6b59faad0ec20e2dd09cf5c47c0ae7b5377952aadb6d30dd63e4bad95f1c3ab099f526c797d3397b4d8467cdf07857887285ac59d90b58ddf213fa88667eb  gradm-3.1-201503211320.tar.gz
0cd4a85d40815813129c669400a9e2fb4b5258c1d20dae8075e3f3123c3ff1ece9dc3a16209ef8d6cb968477ab687926923bcdca0b78fb3beff105a699284a01  policy
8b6a3a6cf550119dbf162d6dffcf5acef30cae6b070a028d5d5697bf20ce5e0d7e1900992f7c88c60b2eb5e5118561753e8111440a6032922780620ac25ee7cb  base.policyd
7f53992506edcedfd97b5b3581da80ffbc1a1a79ad3c5e7b7982f9d41387bea34077045d36595a631a87e96a25819b3c569ca94c344a0581ead8c5e5dbd32c1d  grsec-rbac.initd"