# Maintainer: Natanael Copa pkgname=xmlrpc-c pkgver=1.16.44 pkgrel=1 pkgdesc="This library provides a modular implementation of XML-RPC for C and C++" url="http://xmlrpc-c.sourceforge.net/" arch="all" license="custom:xmlrpc-c" depends= makedepends="libtool curl-dev libxml2-dev zlib-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-client $pkgname-client++:clientxx xmlrpc-c++:cxx" source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tgz xmlrpc-c-curl.patch" _builddir="$srcdir"/$pkgname-$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" ./configure --prefix=/usr \ --mandir=/usr/share/man \ --enable-libxml2-backend \ --disable-cgi-server \ --disable-abyss-server \ --disable-libwww-client \ --disable-wininet-client # no parallel builds :-( make -C include &&\ make -C lib &&\ make -j1 -C src &&\ make } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -m 644 -D doc/COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING rm -f "$pkgdir"/usr/lib/*.la } client() { pkgdesc="C client libraries for xmlrpc-c" replaces="$pkgname" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libxmlrpc_client.so.* "$subpkgdir"/usr/lib/ } clientxx() { replaces="libxml-c++" pkgdesc="C++ client libraries for xmlrpc-c" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libxmlrpc_client++.so.* "$subpkgdir"/usr/lib/ } cxx() { pkgdesc="This library provides a modular implementation of XML-RPC for C++" replaces="$pkgname" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/*++* \ "$pkgdir"/usr/lib/libxmlrpc_packetsocket.so.* \ "$pkgdir"/usr/lib/libxmlrpc_cpp.so.* \ "$subpkgdir"/usr/lib/ } md5sums="de3197ef5e1a6dc3265ad407fb1651c6 xmlrpc-c-1.16.44.tgz 101c2224b2338247097f96b03e206261 xmlrpc-c-curl.patch"