# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=znc pkgver=1.2 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 libiconv-dev tcl-dev autoconf automake" install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-extra $pkgname-modtcl $pkgname-modperl" source="http://znc.in/releases/znc-$pkgver.tar.gz" _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 # aclocal -I m4 && autoheader && autoconf || return 1 } build() { cd "$_builddir" export CHARSET= ./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 } _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 \ charset.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="ef18e5402a82cc3fcab5c2ac5c2e6f3b znc-1.2.tar.gz" sha256sums="d9a2cd2a484ff23e6fc9cbde8dd8a43efbcd8d288afca7b1268914ca0d18701d znc-1.2.tar.gz" sha512sums="dff24e56127e5599d64b4c62de967d5d48d8ebf23ca8597d33bf0b3622640512db7a462bfa7c2031cd8307f402bab8efa345f6d1fc813e78eb0dcae581de3cf7 znc-1.2.tar.gz"