# Contributor: # Maintainer: Natanael Copa pkgname=ccnet pkgver=4.0.3 pkgrel=0 pkgdesc="framework for writing networked applications in C" url="https://github.com/haiwen/ccnet/" arch="all" license="GPL3" makedepends="autoconf automake bash glib-dev jansson-dev openssl-dev libevent-dev libsearpc-dev libtool libzdb-dev python-dev sqlite-dev util-linux-dev vala" source="$pkgname-$pkgver.tar.gz::https://github.com/haiwen/ccnet/archive/v${pkgver}.tar.gz" subpackages="$pkgname-dev py-$pkgname:py $pkgname-libs" _builddir="${srcdir}/${pkgname}-${pkgver}" prepare() { local pf cd "${_builddir}" for pf in $source; do case $pf in *.patch) msg $pf; patch -p1 -i "$srcdir"/${pf} || return 1;; esac done } build() { cd "${_builddir}" ./autogen.sh ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --enable-python \ --enable-server make || return 1 } package() { cd "${_builddir}" make DESTDIR="${pkgdir}" install || return 1 rm "${pkgdir}"/usr/lib/libccnet.la } py() { arch="noarch" cd "$_builddir" pkgdesc="$pkgname python bindings" install -d "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } md5sums="dcfae5bd5788980b10cab1a1a7d14607 ccnet-4.0.3.tar.gz" sha256sums="9c05e8dcd2a5cf12c4f8d2cde5e0b90f732782039bb09670029a838f1fb80d25 ccnet-4.0.3.tar.gz" sha512sums="ce6da63ced68ed4dea4bef3afadecdd6372e45f72c4441734002d5a16f34ac37c31594e91949219b6a59416d1170153555a81bd230eeaa9fe16cb8deb543a9d3 ccnet-4.0.3.tar.gz"