blob: def20616df0b9ae9ee82a9e95112428df9a87206 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ulogd
pkgver=2.0.5
pkgrel=7
pkgdesc="A userspace logging daemon for netfilter/iptables related logging"
url="http://netfilter.org/projects/ulogd/index.html"
arch="all"
license="GPL-2.0"
depends=""
makedepends="libmnl-dev libpcap-dev libnetfilter_acct-dev bsd-compat-headers
libnfnetlink-dev libnetfilter_conntrack-dev libnetfilter_log-dev
pkgconfig mariadb-connector-c-dev libressl-dev postgresql-dev zlib-dev linux-headers
autoconf automake libtool"
subpackages="$pkgname-mysql $pkgname-pgsql $pkgname-doc"
source="https://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2
musl-fixes.patch
fix-pluginit.patch
ulogd.initd
ulogd.confd
"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
autoreconf -vif
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-pgsql \
--with-mysql \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
install -Dm644 ulogd.conf "$pkgdir"/etc/ulogd.conf
install -Dm644 ulogd.logrotate "$pkgdir"/etc/logrotate.d/ulogd
install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.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
}
mysql() {
depends="$pkgname"
mkdir -p "$subpkgdir"/usr/lib/ulogd/
mv "$pkgdir"/usr/lib/ulogd/ulogd_output_MYSQL.so "$subpkgdir"/usr/lib/ulogd/
}
pgsql() {
depends="$pkgname"
mkdir -p "$subpkgdir"/usr/lib/ulogd/
mv "$pkgdir"/usr/lib/ulogd/ulogd_output_PGSQL.so "$subpkgdir"/usr/lib/ulogd/
}
sha512sums="bf00b8adaad7bd04077a83521b0d7accc26e644c8f3386819e7f91476178b6733f1c6554fb82dd0d3913398c83a61d65f61dc973f199f610bfaadc6251504819 ulogd-2.0.5.tar.bz2
637598d5cd03dc284f301ac966da0adc09ae7ecffe0d202ab9a7dcf389274ee0c76b1785a095c0f67ce7eee883e66efd56c1006d5323a2d716070e88daca9122 musl-fixes.patch
5e98a45dac0d13520d16c6b45560dfed398bdac78f5328a40566088493a90793ccd01c0ac576bed4d0b97fdb49df19191bde83f631323c387bf1ed77dcbfa57c fix-pluginit.patch
ab60e367a18d6dafcf5ee22562e303d74944f97b1e42717607db85f11d15d94be3e0e9aaa422c2bac13cdeee1aabc550f751f3e6419b1c7b16d86d0ee8fad55a ulogd.initd
bdae1ff90c671b6847dfda1947a33e24bfbe16ad963f85769d923ba33021bc4ca315fd410b46fac102f0a24e879e4be4ad7bb5978c5a6755e74e6b5d7c3e18ee ulogd.confd"
|