aboutsummaryrefslogtreecommitdiffstats
path: root/main/rsyslog/APKBUILD
blob: c33bc44578745d67cb156b581193fac3dc32deb0 (plain) (blame)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# Contributor: Francisco Guerreiro <francisg@fnop.net>
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Contributor: Cameron Banta <cbanta@gmail.com>
# Contributor: Ashley Sommer <ashleysommer@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Cameron Banta <cbanta@gmail.com>
pkgname=rsyslog
pkgver=8.40.0
pkgrel=2
pkgdesc="Enhanced multi-threaded syslogd with database support and more."
url="https://www.rsyslog.com/"
arch="all"
license="Apache-2.0 GPL-3.0-or-later LGPL-3.0-or-later"
options="!check"
makedepends="
	curl-dev
	czmq-dev
	gnutls-dev
	hiredis-dev
	krb5-dev
	libdbi-dev
	libestr-dev
	libfastjson-dev
	libgcrypt-dev
	liblogging-dev
	libmaxminddb-dev
	libnet-dev
	linux-headers
	librelp-dev
	mariadb-connector-c-dev
	net-snmp-dev
	postgresql-dev
	py-docutils
	rabbitmq-c-dev
	util-linux-dev
	zlib-dev
	"
install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-dbg"
source="https://www.rsyslog.com/files/download/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.logrotate
	$pkgname.conf
	musl-fix.patch
	queue.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

# <subpackage>[:<module>...]
_plugins="
	crypto:lmcry_gcry
	elasticsearch:omelasticsearch
	gssapi:lmgssutil:imgssapi:omgssapi
	hiredis:omhiredis
	http:omhttp:fmhttp
	libdbi:omlibdbi
	mmanon
	mmaudit
	mmcount
	mmdblookup
	mmfields
	mmjsonparse
	mmpstrucdata
	mmrm1stspace
	mmsequence
	mmsnmptrapd
	mmutf8fix
	mysql:ommysql
	pgsql:ompgsql
	pmaixforwardedfrom
	pmlastmsg
	pmsnare
	rabbitmq:omrabbitmq
	relp:imrelp:omrelp
	snmp:omsnmp
	testing:omtesting
	tls:lmnsd_gtls
	udpspoof:omudpspoof
	uxsock:omuxsock
	zmq:imczmq:omczmq
	"
for _i in $_plugins; do
	subpackages="$subpackages $pkgname-${_i%%:*}:_plugin"
done

build() {
	cd "$builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		\
		--disable-rfc3195 \
		--enable-largefile \
		--enable-gssapi-krb5 \
		--enable-mysql \
		--enable-pgsql \
		--enable-libdbi \
		--enable-snmp \
		--enable-elasticsearch \
		--enable-omhttp \
		--enable-gnutls \
		--enable-mail \
		--enable-imdiag \
		--enable-mmjsonparse \
		--enable-mmaudit \
		--enable-mmanon \
		--enable-mmrm1stspace \
		--enable-mmutf8fix \
		--enable-mmcount \
		--enable-mmsequence \
		--enable-mmdblookup \
		--enable-mmfields \
		--enable-mmpstrucdata \
		--enable-relp \
		--enable-imfile \
		--enable-imptcp \
		--enable-impstats \
		--enable-omprog \
		--enable-omudpspoof \
		--enable-omstdout \
		--enable-pmlastmsg \
		--enable-pmaixforwardedfrom \
		--enable-pmsnare \
		--enable-omuxsock \
		--enable-mmsnmptrapd \
		--enable-omrabbitmq \
		--enable-imczmq \
		--enable-omczmq \
		--enable-omhiredis
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	# Remove lib that is used only for testing.
	rm -f "$pkgdir"/usr/lib/rsyslog/imdiag.so

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

	install -m700 -d "$pkgdir"/var/lib/rsyslog
}

_plugin() {
	local name="${subpkgname#$pkgname-}"
	pkgdesc="$name support for $pkgname"
	depends="$pkgname=$pkgver-r$pkgrel"

	local libnames=$(printf '%s\n' $_plugins | grep "^$name:" | cut -d: -f2- | tr : ' ')
	local libname

	for libname in ${libnames:-$name}; do
		mkdir -p "$subpkgdir"/usr/lib/rsyslog/
		mv "$pkgdir"/usr/lib/rsyslog/$libname.so "$subpkgdir"/usr/lib/rsyslog/
	done

	# Allow people to find plugins by their full name (including prefix;
	# mm, om, im, ...).
	for libname in $libnames; do
		provides="$provides $pkgname-$libname=$pkgver-r$pkgrel"
	done
}

sha512sums="3d5d4f92e37ad9bf3767d5d7fc87fcb7956656f676a9495c78abd12fe9072ec8763b50543b198308a71d5d919721fb9b84b6725dd83a9d9b8a1639d81382c0dd  rsyslog-8.40.0.tar.gz
bcd63c8df2ac63b80f3cb51ba7f544988df6cd875f4e81020e762dff30d7537f21b72c95a4b1c08baf15f4ed5f03defbf3f061673aabada5841f45ab9f579374  rsyslog.initd
b5cbdcfa601ae8e7617289e7805fe71daa17bd03a7a30e1e1aad7a58a4ad4c1d89c9a203228f15816232ab6ab6d7a2752f7bbf4d259bbd5eccbe9728dc7e8aaa  rsyslog.logrotate
9c9913b3367ac4d0b0f998ffa3aaaf136cf939ed4275f13f79d4c7336d0978007af13cb2c6f35d17ef25a53907fb064705f23c3b3a6a6fcd06ae85c3c51c7e38  rsyslog.conf
04f1c8060b9439fe25f9a4291697c577fb3d540aefcd67ed6d63d416c1dd0306fa68ae89745af2b4dc2e288d46aadd9c7a96ccfaaf3a146d9d76bd3433e3c1a5  musl-fix.patch
7be105f9a30d23b48ee46e19d31ba37ec30477935a9f7ba3929666a9abe175313dbb7caf55fbb1c6579dd5d25fe037eea84cae9065fe3f765f23569344bce5d7  queue.patch"