aboutsummaryrefslogtreecommitdiffstats
path: root/main/rsyslog/APKBUILD
blob: a145aae4bbb636cba29c41975266eee5e0622265 (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
85
86
87
88
89
90
91
92
93
# Maintainer: Cameron Banta <cbanta@gmail.com>
# Contributor: cbanta@gmail.com
pkgname=rsyslog
pkgver=6.4.2
pkgrel=0
pkgdesc="Enhanced multi-threaded syslogd with database support and more."
url="http://www.rsyslog.com/"
arch="all"
license="GPLv3 LGPL-3"
makedepends="zlib-dev gnutls-dev mysql-dev postgresql-dev net-snmp-dev
	libnet-dev libgcrypt-dev libee-dev libestr-dev"
subpackages="$pkgname-doc $pkgname-mysql $pkgname-pgsql $pkgname-tls $pkgname-snmp"
source="http://www.rsyslog.com/files/download/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	$pkgname.logrotate
	$pkgname.conf"


_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	export LDFLAGS="-lestr"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--disable-gui \
		--disable-rfc3195 \
		--enable-largefile \
		--enable-imdiag \
		--enable-imfile \
		--enable-mail \
		--enable-omprog \
		--enable-omstdout \
		--enable-omudpspoof \
		--enable-zlib \
		--enable-mysql \
		--enable-pgsql \
		--enable-gnutls \
		--enable-snmp \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
}

build() {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	rm -f "$pkgdir"/usr/lib/rsyslog/*.la || return 1

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf
}

mysql() {
	pkgdesc="rsyslog mysql support"
	mkdir -p "$subpkgdir"/usr/lib/rsyslog/
	mv "$pkgdir"/usr/lib/rsyslog/ommysql.so "$subpkgdir"/usr/lib/rsyslog/
}

pgsql() {
	pkgdesc="rsyslog pgsql support"
	mkdir -p "$subpkgdir"/usr/lib/rsyslog/
	mv "$pkgdir"/usr/lib/rsyslog/ompgsql.so "$subpkgdir"/usr/lib/rsyslog/
}

tls() {
	pkgdesc="rsyslog tls support"
	mkdir -p "$subpkgdir"/usr/lib/rsyslog/
	mv "$pkgdir"/usr/lib/rsyslog/lmnsd_gtls.so "$subpkgdir"/usr/lib/rsyslog/
}

snmp() {
	pkgdesc="rsyslog snmp support"
	mkdir -p "$subpkgdir"/usr/lib/rsyslog/
	mv "$pkgdir"/usr/lib/rsyslog/omsnmp.so "$subpkgdir"/usr/lib/rsyslog/
}

md5sums="7de0124ec7d67ce2bfda0009ab1263ee  rsyslog-6.4.2.tar.gz
6b63d774eb718bc1ab91f3fb5471ade3  rsyslog.initd
0a0aef98f677364e6178c34274df7723  rsyslog.confd
bc43debc9ffdf66bc1409025fd3d1176  rsyslog.logrotate
65fbf5a7a81a53a70974e3085e96cb41  rsyslog.conf"