2022-03-20 13:19:37 +01:00
|
|
|
#!/usr/bin/bash
|
|
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
|
|
|
|
# Website : https://pozol.eu
|
|
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
|
|
|
|
pkgbase=audit
|
|
|
|
pkgname=('audit' 'python-audit')
|
2022-04-22 21:14:33 +02:00
|
|
|
pkgver=3.0.8
|
2022-03-20 13:19:37 +01:00
|
|
|
pkgrel=01
|
2022-04-22 21:14:33 +02:00
|
|
|
pkgdesc="Userspace components of the audit framework w/o systemd"
|
2022-03-20 13:19:37 +01:00
|
|
|
url='https://people.redhat.com/sgrubb/audit'
|
2022-04-22 21:14:33 +02:00
|
|
|
arch=(x86_64)
|
|
|
|
makedepends=(glibc krb5 libcap-ng libldap swig linux-lts-headers python)
|
2022-03-20 13:19:37 +01:00
|
|
|
options=(emptydirs)
|
2022-04-22 21:14:33 +02:00
|
|
|
#options=(emptydirs debug) # comment above options uncomment this to have debug packages produced
|
|
|
|
source=($url/$pkgname-$pkgver.tar.gz
|
|
|
|
$pkgbase-3.0.8-config_paths.patch)
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
# replace the use of /sbin with /usr/bin in configs
|
|
|
|
patch -Np1 -d $pkgbase-$pkgver -i ../$pkgbase-3.0.8-config_paths.patch
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-03-20 13:19:37 +01:00
|
|
|
|
|
|
|
build() {
|
2022-04-22 21:14:33 +02:00
|
|
|
cd $pkgbase-$pkgver
|
2022-03-20 13:19:37 +01:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sbindir=/usr/bin \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--libexecdir=/usr/lib/audit \
|
|
|
|
--enable-gssapi-krb5=yes \
|
|
|
|
--enable-systemd=no \
|
|
|
|
--with-libcap-ng=yes
|
2022-04-22 21:14:33 +02:00
|
|
|
# prevent excessive overlinking due to libtool
|
|
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
|
|
make
|
|
|
|
[ -n "$SOURCE_DATE_EPOCH" ] && touch -h -d @$SOURCE_DATE_EPOCH bindings/swig/python/audit.py
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package_audit() {
|
2022-04-22 21:14:33 +02:00
|
|
|
depends=(glibc krb5 libkrb5.so libgssapi_krb5.so libcap-ng libcap-ng.so)
|
|
|
|
provides=(libaudit.so libauparse.so)
|
2022-03-20 13:19:37 +01:00
|
|
|
backup=(
|
|
|
|
etc/libaudit.conf
|
|
|
|
etc/audit/audit-stop.rules
|
|
|
|
etc/audit/auditd.conf
|
|
|
|
etc/audit/audisp-remote.conf
|
|
|
|
etc/audit/zos-remote.conf
|
|
|
|
etc/audit/plugins.d/af_unix.conf
|
|
|
|
etc/audit/plugins.d/au-remote.conf
|
|
|
|
etc/audit/plugins.d/audispd-zos-remote.conf
|
|
|
|
etc/audit/plugins.d/syslog.conf
|
|
|
|
)
|
|
|
|
|
2022-04-22 21:14:33 +02:00
|
|
|
make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
|
2022-03-20 13:19:37 +01:00
|
|
|
|
2022-04-22 21:14:33 +02:00
|
|
|
# add log dir
|
|
|
|
install -vdm 700 "$pkgdir/var/log/$pkgname"
|
2022-03-20 13:19:37 +01:00
|
|
|
|
2022-04-22 21:14:33 +02:00
|
|
|
# remove legacy files
|
|
|
|
rm -frv "$pkgdir/usr/lib/audit"
|
|
|
|
|
|
|
|
# remove files provided by python-audit
|
|
|
|
rm -frv "$pkgdir/usr/lib/python"*
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package_python-audit() {
|
2022-04-22 21:14:33 +02:00
|
|
|
depends=(audit libaudit.so libauparse.so glibc python)
|
2022-03-20 13:19:37 +01:00
|
|
|
pkgdesc+=' (python bindings)'
|
2022-04-22 21:14:33 +02:00
|
|
|
|
|
|
|
make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver/bindings
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
2022-09-03 00:50:45 +02:00
|
|
|
#---- license gpg-key sha256sums ----
|
2022-03-20 13:19:37 +01:00
|
|
|
|
2022-04-22 21:14:33 +02:00
|
|
|
license=(GPL LGPL2.1)
|
2022-03-20 13:19:37 +01:00
|
|
|
|
2022-04-22 21:14:33 +02:00
|
|
|
sha256sums=(b5f4d9b9ad69381ee18f33d3d918326aa52861509c901143f8a8c4ed5caa8913 # audit-3.0.8.tar.gz
|
|
|
|
c3647e09d1a973595d8e43e373b8644dfb7131328c7fb3e229593af02c72ca42) # audit-3.0.8-config_paths.patch
|