aboutsummaryrefslogtreecommitdiffstats
path: root/main/syslog-ng/APKBUILD
blob: fa47f6539f5a19a9fdafde3df318d0ce6bbfcdb9 (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
# Contributor: jv <jens@eisfair.org>
# Contributor: Adrian Guenter <adrian@gntr.me>
# Maintainer: jv <jens@eisfair.org>
pkgname=syslog-ng
pkgver=3.13.2
pkgrel=3
pkgdesc="Next generation logging daemon"
url="http://www.balabit.com"
arch="all !aarch64"
license="GPL-2.0"
depends=""
depends_dev="glib-dev eventlog-dev pcre-dev libressl-dev python2-dev hiredis-dev json-c-dev file"
makedepends="$depends_dev"
install="$pkgname.post-install"
subpackages="$pkgname-json"

source="https://github.com/balabit/syslog-ng/releases/download/syslog-ng-${pkgver}/syslog-ng-${pkgver}.tar.gz
    json-c.patch
    syslog-ng.logrotate
    syslog-ng.initd
    syslog-ng-destination.std
    syslog-ng-filter.std
    syslog-ng-log.std
    syslog-ng-options.std
    syslog-ng-plugins.std
    syslog-ng-source.std
    "

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

build() {
    cd "$_builddir"
    ./configure --prefix=/usr \
    --sysconfdir=/etc/syslog-ng \
    --localstatedir=/run \
    --enable-extra-warnings \
    --with-librabbitmq-client=system \
    --enable-ipv6 \
    --enable-ssl \
    --disable-sql \
    --enable-redis \
    --disable-mongodb \
    --enable-json
    make
}

check() {
    cd "$_builddir"
    make check || return 0
}

package() {
    cd "$_builddir"
    make -j1 DESTDIR=${pkgdir} install
    rm -rf ${pkgdir}/etc/syslog-ng
    rm -rf ${pkgdir}/run
    rm -rf ${pkgdir}/usr/include
    rm -rf ${pkgdir}/usr/lib/pkgconfig
    rm -rf ${pkgdir}/usr/share
    rm -f  ${pkgdir}/usr/lib/libsyslog-ng.so
    rm -rf ${pkgdir}/usr/lib/$pkgname/libtest
    # getent module doesn't build properly as musl doesn't support reentrant
    # getprotoby[number|name] funcs. The provided compat lib only patches
    # solaris, which does provide reentrant versions under a different sig
    rm -f  ${pkgdir}/usr/lib/$pkgname/libtfgetent.so
    install -D -m755 "$srcdir"/$pkgname.initd ${pkgdir}/etc/init.d/$pkgname
    install -D -m644 "$srcdir"/syslog-ng-destination.std ${pkgdir}/etc/syslog-ng/syslog-ng-destination.std
    install -D -m644 "$srcdir"/syslog-ng-filter.std ${pkgdir}/etc/syslog-ng/syslog-ng-filter.std
    install -D -m644 "$srcdir"/syslog-ng-log.std ${pkgdir}/etc/syslog-ng/syslog-ng-log.std
    install -D -m644 "$srcdir"/syslog-ng-options.std ${pkgdir}/etc/syslog-ng/syslog-ng-options.std
    install -D -m644 "$srcdir"/syslog-ng-plugins.std ${pkgdir}/etc/syslog-ng/syslog-ng-plugins.std
    install -D -m644 "$srcdir"/syslog-ng-source.std ${pkgdir}/etc/syslog-ng/syslog-ng-source.std
    install -D -m644 "$srcdir"/syslog-ng.logrotate ${pkgdir}/etc/logrotate.d/syslog-ng
}

json() {
    pkgdesc="JSON plugin for syslog-ng"
    mkdir -p "$subpkgdir"/usr/lib/syslog-ng/
    mv "$pkgdir"/usr/lib/syslog-ng/libjson*.so "$subpkgdir"/usr/lib/syslog-ng
}

sha512sums="fd5c6645f1e8e10cba940ea29715f9e7cc286cd49c2f45bde2a447731189d6171ca204aa066ac96dd09246fd7ed1751130d143d807c979518d688e7750490cfe  syslog-ng-3.13.2.tar.gz
8c77a1bcdd5097c20c0f27c1ae9826c1cde1c1c4ad204e1085f138f315daefb1d05a8e00f6d71f77b06b9656f642a6dd8a3b6ba8665bb2f6d2f1bbd6318d17a3  json-c.patch
a062d1601f5215f60e2fc40c6ca498d768aa97af3647a9468731123a28fdd67962421b4412bfbe08a1123141b730cb78f102230ab72befec05ba7f398b39e27a  syslog-ng.logrotate
84fa9b10268edd8cae2ed1fd4b0d8b7078afab050571e1f05ce45c95f97a650511e8dfe30f5815cf2582446ea9f4a45aafcde3a5ae373716cecb6395bc1dd16b  syslog-ng.initd
b51d8b3da9584b6cb5b5c023b5ca1085d8e4c2cfa56f6ed12fe6feb0f33a390b43825aaaf4dd74eb6b7765485fe42f7f21c74380b72de9ed2c7775787ab1e720  syslog-ng-destination.std
e04a70a0b8fc4f40951c9b608b0dede1fa561dd7f58ce8fd8bac70b578b749d15d202973fd9de9fe494656ee138ef5efd32ea6229e6ec0a2f19672dd621acc91  syslog-ng-filter.std
d7864f6666101e0818dd0178a4d1ada2417280de153ff916fe4879348a37b7bfab5936e86629dc52e4edf82fbd601e04d08ed5a2117bcb0470a3d5884add9f55  syslog-ng-log.std
9f4224faf45c73daa54549aebf20e2c45d0bf533a20d2ad97d7258490ce793c8b08cc34cac2a89d185e936515096eb93c793018986c8d21861d88c4b0005d16a  syslog-ng-options.std
6da6629cad9a1d8a54139cda968ca6a4b86536b2c14eb9bc8a3d09c7cbc20cf18fadee0046687de30149ea18da65a7f8ba08c07b35fb46eb42e1fc5faecff3e7  syslog-ng-plugins.std
b441689ded539a358bf03fc292721a280ea29e1592b2a10ce011b455643dae3949af239a0f2bf84957096757e55a87e844df10c0be016fb7ac969d53def6afc6  syslog-ng-source.std"