summaryrefslogtreecommitdiff
path: root/extra/syslog-ng/PKGBUILD
blob: 006459cbbd809b7b24bd61bfbc5ebc78c8c438a1 (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
# $Id: PKGBUILD 188171 2013-06-11 16:24:06Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>

pkgname=syslog-ng
pkgver=3.4.2
pkgrel=1
pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
arch=('i686' 'x86_64')
license=('GPL2')
url="http://www.balabit.com/network-security/syslog-ng/"
depends=('awk' 'eventlog' 'glib2' 'libcap' 'openssl' 'systemd')
makedepends=('flex' 'pkg-config' 'python2')
optdepends=('logrotate: for rotating log files')
options=('!libtool')
backup=('etc/syslog-ng/scl.conf'
        'etc/syslog-ng/syslog-ng.conf'
        'etc/logrotate.d/syslog-ng')
install=$pkgname.install
source=("http://www.balabit.com/downloads/files/syslog-ng/sources/$pkgver/source/${pkgname}_$pkgver.tar.gz"
        syslog-ng.conf
        syslog-ng.logrotate)
sha1sums=('96474f955fb51d4f31ce1154c84b0cb48c8748d2'
          '0aaf695ea6756b59198ff2e4af237b4a6186525d'
          '949128fe3d7f77a7aab99048061f885bc758000c')

build() {
  cd "$pkgname-$pkgver"

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc/syslog-ng \
    --libexecdir=/usr/lib \
    --sbindir=/usr/bin \
    --localstatedir=/var/lib/syslog-ng \
    --datadir=/usr/share/syslog-ng \
    --with-pidfile-dir=/run \
    --disable-spoof-source \
    --enable-ipv6 \
    --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"

  sed -i 's,/sbin/,/bin/,' "$pkgdir/usr/lib/systemd/system/syslog-ng.service"
}