aboutsummaryrefslogtreecommitdiffstats
path: root/main/rsyslog/APKBUILD
blob: ec59d9276d559ebddf078154cfe0f3b3073c2e27 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Cameron Banta <cbanta@gmail.com>
# Contributor: cbanta@gmail.com
pkgname=rsyslog
pkgver=8.9.0
pkgrel=2
pkgdesc="Enhanced multi-threaded syslogd with database support and more."
url="http://www.rsyslog.com/"
arch="all"
license="GPLv3 LGPL3"
makedepends="zlib-dev gnutls-dev mariadb-dev postgresql-dev net-snmp-dev
	libnet-dev libgcrypt-dev libee-dev libestr-dev liblogging-dev
	json-c-dev util-linux-dev py-docutils"
subpackages="$pkgname-doc $pkgname-mysql $pkgname-pgsql $pkgname-tls $pkgname-snmp
	$pkgname-dbg"
source="http://www.rsyslog.com/files/download/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	$pkgname.logrotate
	$pkgname.conf
	musl-fix.patch
	gnutls-3.4.0.patch
	"


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

prepare() {
	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"
	./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
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install

	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="b9e10a3ea9d52b4fa9bbbf540d313970  rsyslog-8.9.0.tar.gz
67b8afd572b4103b39b54a729b880b53  rsyslog.initd
a34f33d8f798ab6652b347ad09656284  rsyslog.confd
bc43debc9ffdf66bc1409025fd3d1176  rsyslog.logrotate
bc0a9b1095f5f6ffc937cd2c9bd26dff  rsyslog.conf
05a0995f5cbe241720aaf6b149860286  musl-fix.patch
aafafdf4502f5e4de5fcfebd21499700  gnutls-3.4.0.patch"
sha256sums="eab00e8e758cd9dd33b3e2cf6af80297d1951dc7db37bd723a6488a35d577adc  rsyslog-8.9.0.tar.gz
223d4bdb69760ef5a9a044d68434c805cd15e31fa190a86f5f283912d0baf6d6  rsyslog.initd
f93cd477770872486185152454ce66e89302b7a8d7a112ff285ceea892dfe1f1  rsyslog.confd
f0effc19bd1f1bfa367d65d6516c73509cb34545157b9e91cf6e437685dd3fe5  rsyslog.logrotate
e4ebe806b5a71edaa4492033ea3a3e70810a64d3f3d4f4e9954eefcf25f2e2ed  rsyslog.conf
feda2d9ca6c788e375116b6c43b6c4ac5debe83dab0efcfc9a47216c9af36599  musl-fix.patch
540530796fd535889ef1a1741ad06e3a0ab4441247396f89ebb06010ce9c102e  gnutls-3.4.0.patch"
sha512sums="942cccc2cbe147572cc2d346ac330d80c86915757b2b7a380829f0b40294d7e4afd4887d5066821af1e059cd78cdb38520fc9d28b55daa7afcd0e5b2e6bd9a5d  rsyslog-8.9.0.tar.gz
9a4b184076a82e0899da79ab3749e1c67eac03f36c4460d34ed0385f4a3ffad53681a1cc25dd514e835c9399a9abd01c235743535ad549d5be7f66d9e127b9dc  rsyslog.initd
a4d969671800227129be870b0318961b79d16365663754111a136734bbf7005abd4da24853dfdc07b3b6691ab5a7b215f0ac6c19022b4c5c8dab06165a42431b  rsyslog.confd
d54377ddf39197656811a84272568ea761f984e19dd04fc54f372dd04a9244e66d02b26ab33073d0344d054f031660ec611f3c7a18c266e7b68cef5e2c47f06f  rsyslog.logrotate
3bcd58b222eb7f4d8a42a0643cacb6ab44790f90c9bd550678e002bc19863d5d6a7341e5e5ba0b9292f85c6c04cd5cc42d174acdc63e8ba22022620db10f2b9b  rsyslog.conf
d5f16d624b40fcd68f689bb65cfad8f537b35f3d7f9c4453c472b21437964442baf0846b3658a6cdd2e0d44b60085140deffc68cf9e3c460bcc5db40cf142ee1  musl-fix.patch
b0e2fc464c840211acef0da481fed5eb594d5bee62672fbccf379efcf3f88c3acee5efd8c51671508feaf2edacd05426766577c94e733479a90a58f68f4fc8a4  gnutls-3.4.0.patch"