summaryrefslogtreecommitdiff
path: root/extra/syslog-ng/PKGBUILD
blob: a8f23bf39bc955cc3f4fc43d2cfee671ca02073c (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
# $Id: PKGBUILD 177980 2013-02-12 19:15:26Z 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.1
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/modules.conf'
        'etc/syslog-ng/scl.conf'
        'etc/syslog-ng/syslog-ng.conf'
        'etc/conf.d/syslog-ng'
        '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.conf.d
        syslog-ng.logrotate
        syslog-ng.rc)
sha1sums=('e75892262863b77f74a401d19661164154f716e7'
          '0aaf695ea6756b59198ff2e4af237b4a6186525d'
          '9b2eb6ea9e27c9f1b6c1c855be211ec3da51d3c8'
          '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"
}