summaryrefslogtreecommitdiffstats
path: root/syslog-ng/Pkgfile
blob: b481b4618cc33ab928189389c562abc55286fe86 (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
# Description: Démons de log pour le système et le noyau
# URL: http://www.infodrom.org/projects/sysklogd/
# Maintainer: NuTyX core team
# Packager: piernov <piernov@piernov.org>
# Depends on: eventlog
# Run on: eventlog

name=syslog-ng
version=3.3.5
release=1
source=(http://www.balabit.com/downloads/files/$name/sources/$version/source/${name}_$version.tar.gz
	syslog-ng.conf
	syslog-ng.conf.d
	syslog-ng.logrotate
	syslog-ng.rc)

build() {
	cd $name-$version
	./configure --prefix=/usr \
		--sysconfdir=/etc/syslog-ng \
		--libexecdir=/usr/lib \
		--localstatedir=/var/lib/syslog-ng \
		--datadir=/usr/share/syslog-ng \
		--with-pidfile-dir=/run \
		--enable-systemd \
		--with-systemdsystemunitdir=/usr/lib/systemd/system
	make
	make DESTDIR=$PKG install

	install -dm755 $PKG/var/lib/syslog-ng $PKG/etc/syslog-ng/patterndb.d
	install -Dm644 $SRC/syslog-ng.conf $PKG/etc/syslog-ng/syslog-ng.conf
	install -Dm644 $SRC/syslog-ng.logrotate $PKG/etc/logrotate.d/syslog-ng
	install -Dm755 $SRC/syslog-ng.rc $PKG/etc/rc.d/init.d/syslog-ng
	install -Dm644 $SRC/syslog-ng.conf.d $PKG/etc/sysconfig/syslog-ng

	sed -e 's@/bin/systemctl@/usr&@' \
		-e '$aAlias=syslog.service' \
		-e '/^ExecStartPre/d' \
		-i $PKG/usr/lib/systemd/system/syslog-ng.service

#	mv ../syslog.conf $PKG/etc/
}