# Contributor: Łukasz Jendrysik # Contributor: Michał Polański # Maintainer: Leonardo Arena pkgname=ulogd pkgver=2.0.8 pkgrel=2 pkgdesc="Userspace logging daemon for netfilter/iptables related logging" url="https://netfilter.org/projects/ulogd/" arch="all" license="GPL-2.0-only" makedepends=" bsd-compat-headers jansson-dev libmnl-dev libnetfilter_acct-dev libnetfilter_conntrack-dev libnetfilter_log-dev libnfnetlink-dev libpcap-dev libpq-dev linux-headers mariadb-connector-c-dev openssl-dev>3 sqlite-dev zlib-dev " subpackages=" $pkgname-doc $pkgname-openrc " source="https://www.netfilter.org/projects/ulogd/files/ulogd-$pkgver.tar.bz2 ulogd.initd ulogd.confd ulogd.logrotate " _modules="mysql pgsql json xml sqlite3" for _module in $_modules; do subpackages="$subpackages $pkgname-$_module:_plugin" done build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-pgsql \ --with-mysql make } package() { make DESTDIR="$pkgdir" install install -Dm644 ulogd.conf "$pkgdir"/etc/ulogd.conf install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname install -dm755 "$pkgdir"/usr/share/doc/ulogd install -Dm644 ulogd.conf "$pkgdir"/usr/share/doc/ulogd/ulogd.conf.sample install -Dm644 doc/ulogd.sgml "$pkgdir"/usr/share/doc/ulogd/ulogd.sgml install -dm0755 "$pkgdir"/usr/share/ulogd for file in $(ls doc/*.sql); do install -Dm644 $file "$pkgdir"/usr/share/ulogd/$file done } _plugin() { plugin="${subpkgname##*-}" depends="$pkgname=$pkgver-r$pkgrel" pkgdesc="$plugin output for $pkgname" mkdir -p "$subpkgdir"/usr/lib/ulogd mv "$pkgdir"/usr/lib/ulogd/ulogd_output_"$(echo $plugin | tr '[a-z]' '[A-Z]')".so \ "$subpkgdir"/usr/lib/ulogd # Move the .sql files to their plugins to subpackage case "$plugin" in pgsql|mysql) mkdir -p "$subpkgdir"/usr/share/ulogd/doc mv "$pkgdir"/usr/share/ulogd/doc/"$plugin"* "$subpkgdir"/usr/share/ulogd/doc ;; esac } sha512sums=" 9f99f6f35bad5da4559d788dc3ba3dae17d4ae972737cae3313ecf68f08eaf5f55514fce6f30503437e4158fd30a06438b9249d5d20f6343964cbf690f87309d ulogd-2.0.8.tar.bz2 8bfe0c6058a8f78af4d98895e6c757a11818f06e56d801792999a3de57abfdd6f4a2ae4fd41c4013230e55d90df4a01b7855fd0bf42c815673987f8747310203 ulogd.initd 927475edf73605117ffaa6ae26316151b4c2cef6f49d2f552d0d57f2e294fc3799169c40db95b10d59a34d2176c1e0c263a7786aa4651d34a337fa906294950c ulogd.confd 82768ec7ffc53f82f4914d80c38da0a269fcc4e68b7955746c1d6c1e4f3fce48a927b4f29b5929d7fc2a01701160c41e05960bbeb1fd682705d589912789e69e ulogd.logrotate "