# Contributor: jv # Contributor: Adrian Guenter # Maintainer: jv pkgname=syslog-ng pkgver=3.18.1 pkgrel=0 pkgdesc="Next generation logging daemon" url="http://www.balabit.com" arch="all !aarch64" license="GPL-2.0" makedepends="glib-dev eventlog-dev pcre-dev openssl-dev python2-dev hiredis-dev json-c-dev file" install="$pkgname.post-install" subpackages="$pkgname-json $pkgname-openrc" source="https://github.com/balabit/syslog-ng/releases/download/syslog-ng-${pkgver}/syslog-ng-${pkgver}.tar.gz syslog-ng.logrotate syslog-ng.initd syslog-ng-destination.std syslog-ng-filter.std syslog-ng-log.std syslog-ng-options.std syslog-ng-plugins.std syslog-ng-source.std " _builddir="$srcdir/${pkgname}-$pkgver" build() { cd "$_builddir" ./configure --prefix=/usr \ --sysconfdir=/etc/syslog-ng \ --localstatedir=/run \ --enable-extra-warnings \ --with-librabbitmq-client=system \ --enable-ipv6 \ --enable-ssl \ --disable-sql \ --enable-redis \ --disable-mongodb \ --enable-json make } check() { cd "$_builddir" make check || return 0 } package() { cd "$_builddir" make -j1 DESTDIR=${pkgdir} install rm -rf ${pkgdir}/etc/syslog-ng rm -rf ${pkgdir}/run rm -rf ${pkgdir}/usr/include rm -rf ${pkgdir}/usr/lib/pkgconfig rm -rf ${pkgdir}/usr/share rm -f ${pkgdir}/usr/lib/libsyslog-ng.so rm -rf ${pkgdir}/usr/lib/$pkgname/libtest # getent module doesn't build properly as musl doesn't support reentrant # getprotoby[number|name] funcs. The provided compat lib only patches # solaris, which does provide reentrant versions under a different sig rm -f ${pkgdir}/usr/lib/$pkgname/libtfgetent.so install -D -m755 "$srcdir"/$pkgname.initd ${pkgdir}/etc/init.d/$pkgname install -D -m644 "$srcdir"/syslog-ng-destination.std ${pkgdir}/etc/syslog-ng/syslog-ng-destination.std install -D -m644 "$srcdir"/syslog-ng-filter.std ${pkgdir}/etc/syslog-ng/syslog-ng-filter.std install -D -m644 "$srcdir"/syslog-ng-log.std ${pkgdir}/etc/syslog-ng/syslog-ng-log.std install -D -m644 "$srcdir"/syslog-ng-options.std ${pkgdir}/etc/syslog-ng/syslog-ng-options.std install -D -m644 "$srcdir"/syslog-ng-plugins.std ${pkgdir}/etc/syslog-ng/syslog-ng-plugins.std install -D -m644 "$srcdir"/syslog-ng-source.std ${pkgdir}/etc/syslog-ng/syslog-ng-source.std install -D -m644 "$srcdir"/syslog-ng.logrotate ${pkgdir}/etc/logrotate.d/syslog-ng } json() { pkgdesc="JSON plugin for syslog-ng" mkdir -p "$subpkgdir"/usr/lib/syslog-ng/ mv "$pkgdir"/usr/lib/syslog-ng/libjson*.so "$subpkgdir"/usr/lib/syslog-ng } sha512sums="2e6ea690f8762f3f37885118f023048c4cba59f58002c87fa1c469cb991b2ba707015b3e54c50f17c3d6e6251d798557406925a9159f4fa914331f281dc39e48 syslog-ng-3.18.1.tar.gz a062d1601f5215f60e2fc40c6ca498d768aa97af3647a9468731123a28fdd67962421b4412bfbe08a1123141b730cb78f102230ab72befec05ba7f398b39e27a syslog-ng.logrotate 84fa9b10268edd8cae2ed1fd4b0d8b7078afab050571e1f05ce45c95f97a650511e8dfe30f5815cf2582446ea9f4a45aafcde3a5ae373716cecb6395bc1dd16b syslog-ng.initd b51d8b3da9584b6cb5b5c023b5ca1085d8e4c2cfa56f6ed12fe6feb0f33a390b43825aaaf4dd74eb6b7765485fe42f7f21c74380b72de9ed2c7775787ab1e720 syslog-ng-destination.std e04a70a0b8fc4f40951c9b608b0dede1fa561dd7f58ce8fd8bac70b578b749d15d202973fd9de9fe494656ee138ef5efd32ea6229e6ec0a2f19672dd621acc91 syslog-ng-filter.std d7864f6666101e0818dd0178a4d1ada2417280de153ff916fe4879348a37b7bfab5936e86629dc52e4edf82fbd601e04d08ed5a2117bcb0470a3d5884add9f55 syslog-ng-log.std 9f4224faf45c73daa54549aebf20e2c45d0bf533a20d2ad97d7258490ce793c8b08cc34cac2a89d185e936515096eb93c793018986c8d21861d88c4b0005d16a syslog-ng-options.std 6da6629cad9a1d8a54139cda968ca6a4b86536b2c14eb9bc8a3d09c7cbc20cf18fadee0046687de30149ea18da65a7f8ba08c07b35fb46eb42e1fc5faecff3e7 syslog-ng-plugins.std b441689ded539a358bf03fc292721a280ea29e1592b2a10ce011b455643dae3949af239a0f2bf84957096757e55a87e844df10c0be016fb7ac969d53def6afc6 syslog-ng-source.std"