# $Id: PKGBUILD 138388 2015-08-15 17:33:07Z seblu $
# Maintainer: Sébastien Luttringer
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: mickael9 <mickael9 at gmail dot com>

pkgname=znc
pkgver=1.6.1
pkgrel=1
pkgdesc='An IRC bouncer with modules & scripts support'
url='http://en.znc.in/wiki/index.php/ZNC'
license=('GPL2')
arch=('i686' 'x86_64')
depends=('libsasl' 'icu')
makedepends=('tcl' 'python' 'perl')
optdepends=('tcl: modtcl module'
            'python: modpython module'
            'perl: modperl module'
            'cyrus-sasl: saslauth module')
install=$pkgname.install
source=("http://znc.in/releases/$pkgname-$pkgver.tar.gz"
        "$pkgname.sysusers")
md5sums=('8e29289e6229b6d2473de202170745ab'
         '919705dccc42d3bff1549d3b3680e55a')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
    --enable-cyrus \
    --enable-python \
    --enable-perl \
    --enable-tcl \
    --with-systemdsystemunitdir=/usr/lib/systemd/system
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
}

# vim:set ts=2 sw=2 et:
