aboutsummaryrefslogtreecommitdiffstats
path: root/main/audit/APKBUILD
blob: 37f2ab2ba7366754c2b64ceb7c9159cbd199517d (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
66
67
68
69
70
# Maintainer: Tycho Andersen <tycho@docker.com>
pkgname=audit
pkgver=2.8.5
pkgrel=0
pkgdesc="User space tools for 2.6 kernel auditing"
url="http://people.redhat.com/sgrubb/audit/"
arch="all"
license="GPL-2.0-or-later"
depends_dev="linux-headers"
makedepends="$depends_dev swig libcap-ng-dev python3"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc"
source="https://people.redhat.com/sgrubb/audit/audit-$pkgver.tar.gz
	0002-auparse-remove-use-of-rawmemchr.patch
	0003-all-get-rid-of-strndupa.patch
	auditd.initd
	auditd.confd"

case "$CARCH" in
mips*)
	# mips builder does not have audit support enabled
	options="$options !check"
	;;
esac

builddir="$srcdir/audit-$pkgver"

build() {
	if [ "$CARCH" = "ppc64le" ]; then
		WITHOUT="--without-python3 --without-python"
	fi

	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-zos-remote \
		--enable-shared=audit \
		$WITHOUT
	make
}

check() {
	cd "$builddir"
	make -j1 check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -D -m644 "$srcdir"/auditd.confd \
		"$pkgdir"/etc/conf.d/auditd
	install -D -m755 "$srcdir"/auditd.initd \
                "$pkgdir"/etc/init.d/auditd
}

static() {
	pkgdesc="Static libaudit libraries"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}

sha512sums="7d416aaa21c1a167f8e911ca82aecbaba804424f3243f505066c43ecc4a62a34feb2c27555e99d3268608404793dccca0f828c63670e3aa816016fb493f8174a  audit-2.8.5.tar.gz
b7851d4c3c6d7d35f2e822273c17ab530ac24301c414da7f0c7578b7a182692ecd01b51cb50ea04adba4b43987f27020f8f411aec23b3bda0af4d4b6e9fbae5d  0002-auparse-remove-use-of-rawmemchr.patch
f3f2c4ee745e99877c981d889c5cbb0379d073a9b7634c1480ae603a21a13045f9978b51f8cb53c8d0ba414d249bb859af7bca7e302c464b3fc3c6463ecca762  0003-all-get-rid-of-strndupa.patch
1b48c248db5d34f148f9c79f8b2a6acbf61c729230341b861f5e331bbfb0c8356305a09eb2cc5c82c14c4fd9a13c7c13957e1ed493834b8b3b9ee38978e4c31f  auditd.initd
69d8777772ded7a8c0db2bcf84961b121bb355fa0d4ba0e14e311f8a8bfe665cbd2b7ac632d73477f9dfa9a6eec357a7ed458fe9b3e7b5ede75b166f3f092ab7  auditd.confd"