summaryrefslogtreecommitdiffstats
path: root/abs/core/audit/PKGBUILD
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2020-09-29 03:07:33 (GMT)
committerBritney Fransen <brfransen@gmail.com>2020-09-29 03:07:33 (GMT)
commitfb6b26cefcac8566bda0f59700ea0f84a1ca773c (patch)
treecc4063ecf2824ea0930ef36ab40202982797f7ce /abs/core/audit/PKGBUILD
parent5ff3dedc291364b52421469a0cb352758fc27ec9 (diff)
downloadlinhes_pkgbuild-fb6b26cefcac8566bda0f59700ea0f84a1ca773c.zip
linhes_pkgbuild-fb6b26cefcac8566bda0f59700ea0f84a1ca773c.tar.gz
linhes_pkgbuild-fb6b26cefcac8566bda0f59700ea0f84a1ca773c.tar.bz2
audit: initial inclusion
Diffstat (limited to 'abs/core/audit/PKGBUILD')
-rw-r--r--abs/core/audit/PKGBUILD82
1 files changed, 82 insertions, 0 deletions
diff --git a/abs/core/audit/PKGBUILD b/abs/core/audit/PKGBUILD
new file mode 100644
index 0000000..1689021
--- /dev/null
+++ b/abs/core/audit/PKGBUILD
@@ -0,0 +1,82 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer : Christian Rebischke <Chris.Rebischke@archlinux.org>
+# Contributor: Daniel Micay <danielmicay@gmail.com>
+# Contributor: <kang@insecure.ws>
+# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+# Contributor: Connor Behan <connor.behan@gmail.com>
+# Contributor: henning mueller <henning@orgizm.net>
+
+pkgbase=audit
+pkgname=('audit' 'python-audit')
+pkgver=2.8.5
+pkgrel=7
+pkgdesc='Userspace components of the audit framework'
+url='https://people.redhat.com/sgrubb/audit'
+arch=('x86_64')
+makedepends=('krb5' 'libcap-ng' 'libldap' 'swig' 'linux-headers' 'python')
+license=('GPL')
+options=('emptydirs')
+source=(${pkgbase}-${pkgver}.tar.gz::https://people.redhat.com/sgrubb/audit/${pkgbase}-${pkgver}.tar.gz)
+sha512sums=('7d416aaa21c1a167f8e911ca82aecbaba804424f3243f505066c43ecc4a62a34feb2c27555e99d3268608404793dccca0f828c63670e3aa816016fb493f8174a')
+
+prepare() {
+ cd ${pkgbase}-${pkgver}
+ sed 's|/var/run/auditd.pid|/run/auditd.pid|' -i init.d/auditd.service
+}
+
+build() {
+ cd ${pkgbase}-${pkgver}
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib/audit \
+ --enable-gssapi-krb5=yes \
+ --enable-systemd=yes \
+ --with-libcap-ng=yes
+ make
+ [ -n "${SOURCE_DATE_EPOCH}" ] && touch -h -d @$SOURCE_DATE_EPOCH bindings/swig/python/audit.py
+}
+
+package_audit() {
+ depends=('krb5' 'libcap-ng')
+ provides=('libaudit.so' 'libauparse.so')
+ backup=(
+ etc/libaudit.conf
+ etc/audit/audit-stop.rules
+ etc/audit/auditd.conf
+ etc/audisp/audispd.conf
+ etc/audisp/audisp-remote.conf
+ etc/audisp/zos-remote.conf
+ etc/audisp/plugins.d/af_unix.conf
+ etc/audisp/plugins.d/audispd-zos-remote.conf
+ etc/audisp/plugins.d/au-remote.conf
+ etc/audisp/plugins.d/syslog.conf
+ )
+
+ cd ${pkgbase}-${pkgver}
+ make DESTDIR="${pkgdir}" INSTALL='install -p' install
+
+ cd "${pkgdir}"
+ install -d -m 0700 var/log/audit
+ rm -rf etc/rc.d \
+ etc/sysconfig \
+ usr/lib/audit \
+ usr/lib/python*
+
+ sed -ri 's|/sbin|/usr/bin|' \
+ etc/audit/*.conf \
+ etc/audisp/plugins.d/*.conf \
+ usr/lib/systemd/system/auditd.service
+
+ chmod 644 usr/lib/systemd/system/auditd.service
+}
+
+package_python-audit() {
+ depends=('python' 'audit')
+ pkgdesc+=' (python bindings)'
+ cd ${pkgbase}-${pkgver}
+ make -C bindings DESTDIR="${pkgdir}" INSTALL='install -p' install
+}
+
+# vim: ts=2 sw=2 et: