# Contributor: # Maintainer: Natanael Copa pkgname=ccnet pkgver=3.1.7 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" _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="b556583308eff38625671fc3d8880553 ccnet-3.1.7.tar.gz" sha256sums="c785a89b7c2c145943f494a8b1f373e4b62e4aacc1d55abfb933e2c44d3dcaec ccnet-3.1.7.tar.gz" sha512sums="2d8d9b3e6cdb5fd6db7b6c9bd59f29d2b8c9fe80db48ffca1cbaca01f1f8624b5d520495d0f79d4e8c0c313132af6e1fb38d1ed685e25a42ddf792b732ad4c89 ccnet-3.1.7.tar.gz"