APKBUILD 2.03 KB
Newer Older
Tycho Andersen's avatar
Tycho Andersen committed
1 2
# Maintainer: Tycho Andersen <tycho@docker.com>
pkgname=audit
3
pkgver=2.8.3
4
pkgrel=1
Tycho Andersen's avatar
Tycho Andersen committed
5 6
pkgdesc="User space tools for 2.6 kernel auditing"
url="http://people.redhat.com/sgrubb/audit/"
7
arch="all"
8
license="GPL-2.0-or-later"
9 10
depends_dev="linux-headers"
makedepends="$depends_dev swig libcap-ng-dev python3"
11
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs"
Tycho Andersen's avatar
Tycho Andersen committed
12
source="http://people.redhat.com/sgrubb/audit/audit-$pkgver.tar.gz
Tycho Andersen's avatar
Tycho Andersen committed
13 14
	0002-auparse-remove-use-of-rawmemchr.patch
	0003-all-get-rid-of-strndupa.patch
15
	auditd.initd
16 17
	auditd.confd"

Tycho Andersen's avatar
Tycho Andersen committed
18 19 20
builddir="$srcdir/audit-$pkgver"

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

Tycho Andersen's avatar
Tycho Andersen committed
25 26 27 28
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
29
		--prefix=/usr \
Tycho Andersen's avatar
Tycho Andersen committed
30 31 32
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
33 34
		--disable-zos-remote \
		--enable-shared=audit \
35 36
		$WITHOUT
	make
37 38 39 40
}

check() {
	cd "$builddir"
41
	make -j1 check
Tycho Andersen's avatar
Tycho Andersen committed
42 43 44 45
}

package() {
	cd "$builddir"
46
	make DESTDIR="$pkgdir" install
47
	install -D -m755 "$srcdir"/auditd.initd \
48
		"$pkgdir"/etc/init.d/auditd
49
	install -D -m644 "$srcdir"/auditd.confd \
50
		"$pkgdir"/etc/conf.d/auditd
51 52 53 54
}

static() {
	pkgdesc="Static libaudit libraries"
55 56
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
Tycho Andersen's avatar
Tycho Andersen committed
57 58
}

59
sha512sums="aa939b81a66111f4e466208d7a38414bd186d00ccd374b420439764905b4707bbfcdc2331a6179a080fca981d19171696ecabd26674205b2f9339c44954db933  audit-2.8.3.tar.gz
60 61
b7851d4c3c6d7d35f2e822273c17ab530ac24301c414da7f0c7578b7a182692ecd01b51cb50ea04adba4b43987f27020f8f411aec23b3bda0af4d4b6e9fbae5d  0002-auparse-remove-use-of-rawmemchr.patch
c380c04fc1939903eea9919d5a918f58725177adee1fe7dbe81e33905bad2f561dc35cae9f3d79aa6f00245cf33cdd50cef5e2b58f4fa5b8cd0cfad59af7137a  0003-all-get-rid-of-strndupa.patch
62 63
1b48c248db5d34f148f9c79f8b2a6acbf61c729230341b861f5e331bbfb0c8356305a09eb2cc5c82c14c4fd9a13c7c13957e1ed493834b8b3b9ee38978e4c31f  auditd.initd
69d8777772ded7a8c0db2bcf84961b121bb355fa0d4ba0e14e311f8a8bfe665cbd2b7ac632d73477f9dfa9a6eec357a7ed458fe9b3e7b5ede75b166f3f092ab7  auditd.confd"