# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=znc pkgver=1.6.0 pkgrel=0 pkgdesc="An advanced IRC bouncer" url="http://znc.in" arch="all" license="ASL 2.0" depends="" depends_dev="" makedepends="perl-dev openssl-dev cyrus-sasl-dev python-dev c-ares-dev swig gettext-dev tcl-dev autoconf automake" install="$pkgname.pre-install" pkgusers="$pkgname" subpackages="$pkgname-dev $pkgname-doc $pkgname-extra $pkgname-modtcl $pkgname-modperl" source="http://znc.in/releases/znc-$pkgver.tar.gz $pkgname.initd $pkgname.confd" _builddir="$srcdir"/znc-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" export CFLAGS="$CFLAGS -D_GNU_SOURCE" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --enable-perl \ --enable-tcl \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -D -m755 "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname || return 1 install -D -m644 "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname || return 1 install -d -o $pkgname $pkgdir/var/lib/znc || return 1 } _mv_to_sub() { local i for i in "$@"; do mkdir -p "$subpkgdir"/${i%/*} mv "$pkgdir"/$i "$subpkgdir"/$i || return 1 done } _mv_mod() { local i for i in "$@"; do _mv_to_sub usr/lib/znc/$i || return 1 done } dev() { default_dev _mv_to_sub usr/bin/znc-buildmod } extra() { pkgdesc="Extra modules for ZNC" _mv_mod \ autovoice.so \ block_motd.so \ clearbufferonmsg.so \ ctcpflood.so \ flooddetach.so \ imapauth.so \ listsockets.so \ log.so \ notify_connect.so \ send_raw.so \ shell.so } modtcl() { pkgdesc="TCL module for ZNC" depends="znc" _mv_mod modtcl.so _mv_to_sub usr/share/znc/modtcl } modperl() { pkgdesc="Perl module for ZNC" depends="znc" _mv_mod modperl modperl.so } md5sums="674d8c1277752dcc627b96e33a63376e znc-1.6.0.tar.gz d46d465d75c526cd21ebee8bfaa4440b znc.initd 1817e134ec3fa6ec05d36d4995a5aaa5 znc.confd" sha256sums="df622aeae34d26193c738dff6499e56ad669ec654484e19623738d84cc80aba7 znc-1.6.0.tar.gz 9df9e738efca0e6ace045bdb6a1419082408119ba92c032566c6d4a61b1844b5 znc.initd be3155e79e6ed13be88fbf9d99f6889b3ee8425837120c448c827b8302672063 znc.confd" sha512sums="f645d9c947970e193ff9b230fa8ecc6a562a44ddf2a9d43019861deb2ef6ac166436ec556997160c5d5b9a48112068e36a108ec8f98f6d7cf0e1958a422283fc znc-1.6.0.tar.gz 0d1b9bf71cde1b803e9deddc64006528778dc628603bb4ba8cca17098dcb6b8fc34dcb43eca7de7dec61ce84832dd07d76c7ccb2d9175f859d5aee2a349e8045 znc.initd 352f18d64cbfbd5970c859f2ae2290c0ddafcbd8f1bb5d74f33976bc8388f65a75f8a9a73a093fbac12f2d243d4bcf74380bbb3aaab8d68f7bf4eab7ce3bea46 znc.confd"