upgpkg: sbcl 2.2.11-1
[arch-packages.git] / ulogd / trunk / PKGBUILD
blobff93f2f6ecd112005deec360f2064c05bc7e69c5
1 # Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Dale Blount <dale@archlinux.org>
5 pkgname=ulogd
6 pkgver=2.0.8
7 pkgrel=1
8 pkgdesc='Userspace Packet Logging for netfilter'
9 arch=('x86_64')
10 url='https://www.netfilter.org/projects/ulogd/'
11 license=('GPL2')
12 depends=('libmnl'
13          'libnetfilter_acct'
14          'libnetfilter_conntrack'
15          'libnetfilter_log'
16          'libnfnetlink')
17 backup=('etc/ulogd.conf')
18 makedepends=('mariadb-libs'
19              'libpcap'
20              'libdbi'
21              'postgresql-libs'
22              'sqlite'
23              'jansson')
24 optdepends=('mariadb-libs: MySQL databases support'
25             'sqlite: SQLite3 databases support'
26             'postgresql-libs: PostgreSQL databases support'
27             'libdbi: DBI abstraction databases support'
28             'libpcap: PCAP output support'
29             'jansson: JSON output support')
30 validpgpkeys=('37D964ACC04981C75500FB9BD55D978A8A1420E4') # Netfilter Core Team
31 source=("https://www.netfilter.org/projects/ulogd/files/$pkgname-$pkgver.tar.bz2"{,.sig}
32         "$pkgname.logrotate"
33         "$pkgname.conf"
34         "$pkgname.service")
35 sha256sums=('4ead6c3970c3f57fa1e89fe2d7cc483ba6fe2bd1b08701521e0b3afd667df291'
36             'SKIP'
37             'de7626ea6355691cb89e7f119097ba62c7519546f2c5f1b6c1afc56efd4429ae'
38             '72c4f7b468a5ed39038074c757fe5d34a3e364192536b0a3659ae7fdb4789d2c'
39             'de607fcaf2c36dcaf46856b2d29cf794203a59cad322c62e1d493312cc49b984')
41 prepare() {
42   cd $pkgname-$pkgver
43   # apply patch from the source array (should be a pacman feature)
44   local filename
45   for filename in "${source[@]}"; do
46     if [[ "$filename" =~ \.patch$ ]]; then
47       msg2 "Applying patch ${filename##*/}"
48       patch -p1 -N -i "$srcdir/${filename##*/}"
49     fi
50   done
51   :
54 build() {
55   cd $pkgname-$pkgver
56   ./configure \
57     --prefix=/usr \
58     --sbindir=/usr/bin \
59     --sysconfdir=/etc \
60     --with-mysql \
61     --with-pgsql \
62     --with-dbi
63   make
66 package() {
67   cd $pkgname-$pkgver
68   make DESTDIR="$pkgdir" install
69   install -dm755 "$pkgdir/usr/share/doc/ulogd"
70   install -Dm644 ulogd.conf "$pkgdir/usr/share/doc/ulogd/ulogd.conf"
71   install -m644 doc/*.{table,sql} "$pkgdir/usr/share/doc/ulogd"
72   cd "$srcdir"
73   install -Dm644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
74   install -Dm644 $pkgname.logrotate "$pkgdir/etc/logrotate.d/$pkgname"
75   install -Dm644 $pkgname.conf "$pkgdir/etc/$pkgname.conf"
78 # vim:set ts=2 sw=2 et: