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')
24 makedepends=('libxslt' 'mongo-c-driver' 'librabbitmq-c' 'python' 'libesmtp' 'hiredis'
25 'libdbi' 'libmaxminddb' 'net-snmp' 'librdkafka' 'systemd')
26 checkdepends=('python-nose' 'python-ply')
27 optdepends=('logrotate: for rotating log files'
28 'libdbi: for the SQL plugin'
29 'librabbitmq-c: for the AMQP plugin'
30 'mongo-c-driver: for the MongoDB plugin'
31 'libesmtp: for the SMTP plugin'
32 'hiredis: for the Redis plugin'
33 'libmaxminddb: for the GeoIP2 plugin'
34 'net-snmp: for the SNMP plugin'
35 'librdkafka: for the Kafka C plugin'
36 'python: for Python-based plugins'
37 'python-ply: for debugger CLI')
38 conflicts=('eventlog')
40 backup=('etc/syslog-ng/scl.conf'
41 'etc/syslog-ng/syslog-ng.conf'
42 'etc/logrotate.d/syslog-ng'
43 'etc/default/syslog-ng@default')
44 source=(https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$pkgver/$pkgname-$pkgver.tar.gz
45 syslog-ng.conf syslog-ng.logrotate)
46 sha512sums=('89abb7a53570b6f7c0dc76905c97d207447117f1db1aa0c0da97c17366ea833b6404f9c7fc318436fd01be2bab032eccca9712063a7c683780026e7e52493dc8'
47 '36629a566a8343574dc07430e744e20ce90574be0cc856bc43340f834cd6642a8f08889b9ba15996d088aeebeee4bc3ca64411265046c17c8e125fbed8948ded'
48 'cd39f545a6a855c866a466bf846e33940b2c2dd1fc2eaf50cce29c68e1a5753c7c4b56411e4f01c152f32e155104a98dd755a96319767f47c73a8853f720b2cc')
52 sed -i -e 's,/bin/,/usr/bin/,' -e 's,/sbin/,/bin/,' contrib/systemd/syslog-ng@.service
53 sed -i -e 's|/var/run|/run|g' contrib/systemd/syslog-ng@default
59 # https://archlinux.org/todo/lto-fat-objects/
60 export CFLAGS+=" -ffat-lto-objects"
61 export CXXFLAGS+=" -ffat-lto-objects"
65 ./configure --prefix=/usr --sysconfdir=/etc/syslog-ng --libexecdir=/usr/lib \
66 --sbindir=/usr/bin --localstatedir=/var/lib/syslog-ng --datadir=/usr/share \
67 --with-pidfile-dir=/run --enable-spoof-source --enable-ipv6 \
68 --enable-systemd --with-systemdsystemunitdir=/usr/lib/systemd/system \
69 --enable-manpages --enable-all-modules --disable-java --disable-java-modules \
70 --disable-mqtt --disable-riemann --with-python=3 --with-jsonc=system
71 # prevent excessive overlinking due to libtool
72 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
76 # TODO: package criterion
83 make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
84 install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
85 install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf"
86 install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
87 install -Dm644 "$srcdir"/$pkgname-$pkgver/contrib/systemd/syslog-ng@default -t "$pkgdir"/etc/default