mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 13:47:14 +08:00
61 lines
1.8 KiB
Bash
61 lines
1.8 KiB
Bash
#Contributions from Arch: https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/audit
|
|
|
|
pkgname=audit
|
|
pkgver=2.5
|
|
pkgrel=2
|
|
pkgdesc='User space utilities for storing and searching the audit records generated by the audit subsystem in the Linux kernel.'
|
|
url="http://people.redhat.com/sgrubb/audit"
|
|
arch=('x86_64')
|
|
depends=('krb5' 'libcap-ng')
|
|
makedepends=('libldap' 'linux-headers' 'python3' 'swig')
|
|
license=(GPL)
|
|
options=(emptydirs staticlibs)
|
|
backup=(etc/libaudit.conf
|
|
etc/audit/rules.d/audit.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)
|
|
source=("$url/$pkgname-$pkgver.tar.gz")
|
|
sha256sums=('9b0a0760c6f37d80cbbfe46a74db722e60ac8100b28eb31953878ffca8ac14b4')
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
PYTHON=/usr/bin/python3 ./configure \
|
|
--prefix=/usr \
|
|
--sbindir=/usr/bin \
|
|
--sysconfdir=/etc \
|
|
--libexecdir=/usr/lib/audit \
|
|
--with-python=yes \
|
|
--enable-gssapi-krb5=yes \
|
|
--with-apparmor \
|
|
--enable-gssapi-krb5=yes \
|
|
--enable-systemd \
|
|
--with-libcap-ng=yes
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
cd "$pkgdir"
|
|
install -d var/log/audit
|
|
rm -rf etc/rc.d etc/sysconfig
|
|
|
|
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
|
|
|
|
# install rule examples
|
|
install -d $pkgdir/etc/audit/rules.avail
|
|
cp -v ${srcdir}/${pkgname}-${pkgver}/rules/*rules ${pkgdir}/etc/audit/rules.avail/
|
|
}
|