core/syslog-ng/PKGBUILD

65 lines
2.1 KiB
Bash

#
# Core Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas[at]chakra-project[dot]org>
pkgname=syslog-ng
pkgver=3.3.5
pkgrel=1
pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
arch=('i686' 'x86_64')
license=('GPL2')
groups=('base')
url="http://www.balabit.com/network-security/syslog-ng/"
depends=('glib2' 'eventlog' 'openssl' 'libcap' 'awk')
makedepends=('flex' 'pkg-config')
optdepends=('logrotate: for rotating log files')
provides=('logger')
options=('!libtool')
backup=('etc/syslog-ng/modules.conf' 'etc/syslog-ng/scl.conf' \
'etc/syslog-ng/syslog-ng.conf' 'etc/logrotate.d/syslog-ng' 'etc/logrotate.d/syslog-ng')
source=("http://www.balabit.com/downloads/files/syslog-ng/sources/$pkgver/source/${pkgname}_$pkgver.tar.gz"
'syslog-ng.conf'
'syslog-ng.conf.d'
'syslog-ng.logrotate'
'syslog-ng.rc')
sha1sums=('0c8b85079b60c68c4279bcd4124b1e3c6358407b'
'98074e0facfc6ef036202662cc86d04b38a2c142'
'eb2aa25737e0cb9453c7b058f0e2dcf16abf21cd'
'949128fe3d7f77a7aab99048061f885bc758000c'
'94af81a84e3add6653755122cdd5080694de059d')
build() {
cd "$pkgname-$pkgver"
./configure \
--prefix=/usr \
--sysconfdir=/etc/syslog-ng \
--libexecdir=/usr/lib \
--localstatedir=/var/lib/syslog-ng \
--datadir=/usr/share/syslog-ng \
--with-pidfile-dir=/run \
--disable-spoof-source \
--enable-systemd \
--with-systemdsystemunitdir=/usr/lib/systemd/system
make
}
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"
install -Dm755 "$srcdir/syslog-ng.rc" "$pkgdir/etc/rc.d/syslog-ng"
install -Dm644 "$srcdir/syslog-ng.conf.d" "$pkgdir/etc/conf.d/syslog-ng"
# location of systemctl
sed -e 's@/bin/systemctl@/usr&@' \
-e '$aAlias=syslog.service' \
-e '/^ExecStartPre/d' \
-i "$pkgdir/usr/lib/systemd/system/syslog-ng.service"
}