mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
69 lines
2.4 KiB
Bash
69 lines
2.4 KiB
Bash
pkgname=syslog-ng
|
|
pkgver=3.19.1
|
|
pkgrel=1
|
|
pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
|
|
arch=('x86_64')
|
|
url="http://www.balabit.com/network-security/syslog-ng/"
|
|
license=('GPL2' 'LGPL2.1')
|
|
depends=('awk' 'libsystemd' 'glib2' 'libdbi')
|
|
makedepends=('libxslt' 'json-c' 'python3')
|
|
checkdepends=('python3-nose' 'python3-ply' 'python2')
|
|
optdepends=('logrotate: for rotating log files'
|
|
'json-c: for json-plugin'
|
|
'curl: for the HTTP module'
|
|
'python: for the Python plugin')
|
|
conflicts=('eventlog')
|
|
replaces=('eventlog')
|
|
backup=('etc/syslog-ng/scl.conf'
|
|
'etc/syslog-ng/syslog-ng.conf'
|
|
'etc/logrotate.d/syslog-ng'
|
|
'etc/default/syslog-ng@default')
|
|
source=(https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$pkgver/$pkgname-$pkgver.tar.gz
|
|
syslog-ng.conf syslog-ng.logrotate)
|
|
sha256sums=('5cf931a9d7bead0e6d9a2c65eee8f6005a005878f59aa280f3c4294257ed5178'
|
|
'31cee11ae3c897c51ea01982e1ea838aa8ac730d56661a17e66bd9de5bede1c7'
|
|
'93c935eca56854011ea9e353b7a1da662ad40b2e8452954c5b4b5a1d5b2d5317')
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
sed -i -e 's,/bin/,/usr/bin/,' -e 's,/sbin/,/bin/,' contrib/systemd/syslog-ng@.service
|
|
sed -i -e 's|etc|etc/syslog-ng|g' -e 's|/var/run|/run|g' contrib/systemd/syslog-ng@default
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
./configure --prefix=/usr \
|
|
--sysconfdir=/etc/syslog-ng \
|
|
--libexecdir=/usr/lib \
|
|
--sbindir=/usr/bin \
|
|
--localstatedir=/var/lib/syslog-ng \
|
|
--datadir=/usr/share \
|
|
--enable-ipv6 \
|
|
--enable-manpages \
|
|
--enable-sql \
|
|
--enable-systemd \
|
|
--with-jsonc=system \
|
|
--with-librabbitmq-client=system \
|
|
--with-pidfile-dir=/run \
|
|
--with-systemdsystemunitdir=/usr/lib/systemd/system \
|
|
--disable-spoof-source
|
|
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd $pkgname-$pkgver
|
|
make check || /bin/true # python test requires pep8
|
|
}
|
|
|
|
package() {
|
|
make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
|
|
install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
|
|
install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf"
|
|
install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
|
|
install -Dm644 "$srcdir"/$pkgname-$pkgver/contrib/systemd/syslog-ng@default -t "$pkgdir"/etc/default
|
|
|
|
# See http://lists.balabit.hu/pipermail/syslog-ng/2016-February/022667.html
|
|
rm -r "$pkgdir"/usr/share/syslog-ng/include/scl/cim
|
|
}
|