PKGBUILD 3.54 KB
Newer Older
Eric Vidal's avatar
Eric Vidal committed
1
2
3
4
5
6
7
# Obarun        : 66 init/supervisor
# Maintainer    : Eric Vidal <eric@obarun.org>
# Maintainer    : Jean-Michel T.Dydak <jean-michel@obarun.org>
# PkgSource     : url="https://framagit.org/pkg/obextra/syslog-ng"
#-----------------------------------------------------------------------------------------------

#-----------------------------------------| DESCRIPTION |---------------------------------------
Eric Vidal's avatar
Eric Vidal committed
8
9

pkgname=syslog-ng
Eric Vidal's avatar
Eric Vidal committed
10

Eric Vidal's avatar
Eric Vidal committed
11
pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
Eric Vidal's avatar
Eric Vidal committed
12

Eric Vidal's avatar
Eric Vidal committed
13
pkgver=3.27.1
14
pkgrel=3
Eric Vidal's avatar
Eric Vidal committed
15

Eric Vidal's avatar
Eric Vidal committed
16
url="https://www.syslog-ng.com/products/open-source-log-management/"
Eric Vidal's avatar
Eric Vidal committed
17
18
19
20

track=
target="$pkgname-$pkgver.tar.gz"
source=(https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$pkgver/${target}
Eric Vidal's avatar
Eric Vidal committed
21
        syslog-ng.conf syslog-ng.logrotate)
Eric Vidal's avatar
Eric Vidal committed
22
23
24
25
26
27
28
29
30
31
32
33

#-------------------------------------| BUILD CONFIGURATION |-----------------------------------

makedepends=(
	'libxslt'
	'mongo-c-driver'
	'librabbitmq-c'
	'python'
	'libesmtp'
	'hiredis'
	'libdbi'
	'libmaxminddb'
Eric Vidal's avatar
Eric Vidal committed
34
35
	'net-snmp'
	'librdkafka'
Eric Vidal's avatar
Eric Vidal committed
36
	'libcap')
Eric Vidal's avatar
Eric Vidal committed
37
38
39
40
41
42
43
	
checkdepends=(
	'python-nose'
	'python-ply')

#--------------------------------------------| BUILD |------------------------------------------

Eric Vidal's avatar
Eric Vidal committed
44
45
build() {
  cd ${pkgname}-$pkgver
Eric Vidal's avatar
Eric Vidal committed
46
  ./autogen.sh
Eric Vidal's avatar
Eric Vidal committed
47
48
49
50
51
52
53
54
55
56
57
58
  ./configure 	--prefix=/usr \
				--sysconfdir=/etc/syslog-ng \
				--libexecdir=/usr/lib \
				--sbindir=/usr/bin \
				--localstatedir=/var/lib/syslog-ng \
				--datadir=/usr/share/ \
				--with-pidfile-dir=/run \
				--disable-spoof-source \
				--enable-ipv6 \
				--enable-systemd=no \
				--with-systemdsystemunitdir=no \
				--enable-manpages \
Eric Vidal's avatar
Eric Vidal committed
59
60
61
62
63
				--enable-all-modules \
				--disable-java \
				--disable-java-modules \
				--disable-riemann \
				--with-python=3 \
Eric Vidal's avatar
Eric Vidal committed
64
				--with-jsonc=system
Eric Vidal's avatar
Eric Vidal committed
65
66
67
  make
}

Eric Vidal's avatar
Eric Vidal committed
68
69
#--------------------------------------------| CHECK |------------------------------------------

Eric Vidal's avatar
Eric Vidal committed
70
71
check() {
  cd ${pkgname}-$pkgver
Eric Vidal's avatar
Eric Vidal committed
72
  make check || /bin/true # unit test requires criterion
Eric Vidal's avatar
Eric Vidal committed
73
74
}

Eric Vidal's avatar
Eric Vidal committed
75
76
#-------------------------------------------| PACKAGE |-----------------------------------------

Eric Vidal's avatar
Eric Vidal committed
77
78
79
80
81
package() {
  make -C ${pkgname}-$pkgver DESTDIR="$pkgdir" install
  install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
  install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf"
  install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
Eric Vidal's avatar
Eric Vidal committed
82
83
  # this is not specific to systemd, the file can be sourced by any service file as classic bash operation
  install -Dm644 "$srcdir"/$pkgname-$pkgver/contrib/systemd/syslog-ng@default -t "$pkgdir"/etc/default
Eric Vidal's avatar
Eric Vidal committed
84
}
Eric Vidal's avatar
Eric Vidal committed
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

#------------------------------------| INSTALL CONFIGURATION |----------------------------------

arch=(x86_64)

backup=('etc/syslog-ng/scl.conf'
        'etc/syslog-ng/syslog-ng.conf'
        'etc/logrotate.d/syslog-ng')

depends=(
	'awk'
	'glib2'
	'glib2'
	'libnsl'
	'json-c'
	'curl'
	'libnet')

optdepends=('logrotate: for rotating log files'
            'libdbi: for the SQL plugin'
            'librabbitmq-c: for the AMQP plugin'            
            'mongo-c-driver: for the MongoDB plugin'
            'libesmtp: for the SMTP plugin'
            'hiredis: for the Redis plugin'
            'libmaxminddb: for the GeoIP2 plugin'
            'net-snmp: for the SNMP plugin'
            'python: for Python-based plugins')

conflicts=('eventlog')

replaces=('eventlog')

#-------------------------------------| SECURITY AND LICENCE |----------------------------------

license=('GPL2' 'LGPL2.1')

sha1sums=('b083081bca113c1779ef8c5ef4eef20a3690be2a'
          'a9b54de3e91921966562bd458db26dea135888ba'
          '949128fe3d7f77a7aab99048061f885bc758000c')