1 # Maintainer: Florian Pritz <bluewind@xinu.at>
2 # Contributor: Eric BĂ©langer <eric@archlinux.org>
7 pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
9 url="https://www.syslog-ng.com/products/open-source-log-management/"
10 license=('GPL2' 'LGPL2.1')
11 depends=('awk' 'systemd-libs' 'glib2' 'libnsl' 'json-c' 'curl' 'libnet' 'openssl')
12 makedepends=('libxslt' 'mongo-c-driver' 'librabbitmq-c' 'python' 'libesmtp' 'hiredis'
13 'libdbi' 'libmaxminddb' 'net-snmp' 'librdkafka' 'libcap' 'systemd')
14 checkdepends=('python-nose' 'python-ply')
15 optdepends=('logrotate: for rotating log files'
16 'libdbi: for the SQL plugin'
17 'librabbitmq-c: for the AMQP plugin'
18 'mongo-c-driver: for the MongoDB plugin'
19 'libesmtp: for the SMTP plugin'
20 'hiredis: for the Redis plugin'
21 'libmaxminddb: for the GeoIP2 plugin'
22 'net-snmp: for the SNMP plugin'
23 'librdkafka: for the Kafka C plugin'
24 'python: for Python-based plugins')
25 conflicts=('eventlog')
27 backup=('etc/syslog-ng/scl.conf'
28 'etc/syslog-ng/syslog-ng.conf'
29 'etc/logrotate.d/syslog-ng'
30 'etc/default/syslog-ng@default')
31 source=(https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$pkgver/$pkgname-$pkgver.tar.gz
32 syslog-ng.conf syslog-ng.logrotate)
33 sha512sums=('f4df871f780b2e55e847d3ac108d0647659cac2493180d29436f04a4b75d38b90aba8adcd38f6337dce8f69d6aba9ff33fd3d8dc0f86021a29f60a21747e9a10'
34 'ef7611fd0e73d6e6f16691393810889a327ba51fc55b0458119b5d88356a0599fed87d9cccd6708886bdabdf1af78f1e1c590ddb1a3959224a3595daec2e1613'
35 'cd39f545a6a855c866a466bf846e33940b2c2dd1fc2eaf50cce29c68e1a5753c7c4b56411e4f01c152f32e155104a98dd755a96319767f47c73a8853f720b2cc')
39 sed -i -e 's,/bin/,/usr/bin/,' -e 's,/sbin/,/bin/,' contrib/systemd/syslog-ng@.service
40 sed -i -e 's|/var/run|/run|g' contrib/systemd/syslog-ng@default
46 ./configure --prefix=/usr --sysconfdir=/etc/syslog-ng --libexecdir=/usr/lib \
47 --sbindir=/usr/bin --localstatedir=/var/lib/syslog-ng --datadir=/usr/share \
48 --with-pidfile-dir=/run --enable-spoof-source --enable-ipv6 \
49 --enable-systemd --with-systemdsystemunitdir=/usr/lib/systemd/system \
50 --enable-manpages --enable-all-modules --disable-java --disable-java-modules \
51 --disable-mqtt --disable-riemann --with-python=3 --with-jsonc=system
57 make check || /usr/bin/true # unit test requires criterion
61 make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
62 install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
63 install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf"
64 install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
65 install -Dm644 "$srcdir"/$pkgname-$pkgver/contrib/systemd/syslog-ng@default -t "$pkgdir"/etc/default