upgpkg: sbcl 2.2.9-1
[arch-packages.git] / audit / trunk / PKGBUILD
blob290dd21c3f98380a93d0e540332f5be0a9c53733
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: David Runge <dvzrv@archlinux.org>
3 # Contributor: Christian Rebischke <Chris.Rebischke@archlinux.org>
4 # Contributor: Daniel Micay <danielmicay@gmail.com>
5 # Contributor: <kang@insecure.ws>
6 # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
7 # Contributor: Connor Behan <connor.behan@gmail.com>
8 # Contributor: henning mueller <henning@orgizm.net>
10 pkgbase=audit
11 pkgname=(audit python-audit)
12 pkgver=3.0.8
13 pkgrel=1
14 pkgdesc='Userspace components of the audit framework'
15 url='https://people.redhat.com/sgrubb/audit'
16 arch=(x86_64)
17 makedepends=(glibc krb5 libcap-ng libldap linux-headers python swig)
18 license=(GPL2 LGPL2.1)
19 options=(debug emptydirs)
20 source=(
21   https://people.redhat.com/sgrubb/audit/$pkgname-$pkgver.tar.gz
22   $pkgbase-3.0.8-config_paths.patch
24 sha512sums=('8379bf425d68381d182300e628e42de8460d2f3e15b2395e10880f94b9989656852a50a9bece75b632ec8a04c40c9e666ff4c9d6b25ace3a8f50d2011506afab'
25             'bc699123f810abcf9300728bf61d7fcfcc83677b75fbeb713fb24cc11b2f9edf687661aab70766acde7c3c41c6a62f8e0a54cdfb49d1c7ce2246b67fbe3feec5')
26 b2sums=('38a35a7540e608127cfc54a2de2cb12df8c29e778799ca53318824c84565a67b7ea131f9bba455fa469ce9139a27908738f571a6e383ce9a3274f70c09d27ec7'
27         '50be1b4f76ace20d8d14b4c57a9bb69daa3da35fd654aca8730bc287682fe38f1c1917b37469fb087daf9f309ffc15cca15f54166ece0a055f540c2604778fc6')
29 prepare() {
30   # replace the use of /sbin with /usr/bin in configs
31   patch -Np1 -d $pkgbase-$pkgver -i ../$pkgbase-3.0.8-config_paths.patch
34 build() {
35   cd $pkgbase-$pkgver
36   ./configure \
37     --prefix=/usr \
38     --sbindir=/usr/bin \
39     --sysconfdir=/etc \
40     --libexecdir=/usr/lib/audit \
41     --enable-gssapi-krb5=yes \
42     --enable-systemd=yes \
43     --with-libcap-ng=yes
44   # prevent excessive overlinking due to libtool
45   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
46   make
47   [ -n "$SOURCE_DATE_EPOCH" ] && touch -h -d @$SOURCE_DATE_EPOCH bindings/swig/python/audit.py
50 package_audit() {
51   depends=(glibc krb5 libkrb5.so libgssapi_krb5.so libcap-ng libcap-ng.so)
52   provides=(libaudit.so libauparse.so)
53   backup=(
54     etc/libaudit.conf
55     etc/audit/audit-stop.rules
56     etc/audit/auditd.conf
57     etc/audit/audisp-remote.conf
58     etc/audit/zos-remote.conf
59     etc/audit/plugins.d/af_unix.conf
60     etc/audit/plugins.d/au-remote.conf
61     etc/audit/plugins.d/audispd-zos-remote.conf
62     etc/audit/plugins.d/syslog.conf
63   )
65   make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
67   # add log dir
68   install -vdm 700 "$pkgdir/var/log/$pkgname"
70   # remove legacy files
71   rm -frv "$pkgdir/usr/lib/audit"
73   # remove files provided by python-audit
74   rm -frv "$pkgdir/usr/lib/python"*
77 package_python-audit() {
78   depends=(audit libaudit.so libauparse.so glibc python)
79   pkgdesc+=' (python bindings)'
81   make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver/bindings
84 # vim: ts=2 sw=2 et: