# Contributor: Carlo Landmeter # Maintainer: Carlo Landmeter pkgname=libxml2 pkgver=2.9.1 pkgrel=1 pkgdesc="XML parsing library, version 2" url="http://www.xmlsoft.org/" arch="all" license="MIT" depends= depends_dev="zlib-dev python-dev" makedepends="zlib-dev python-dev" subpackages="$pkgname-doc $pkgname-dev py-$pkgname:py $pkgname-utils" source="ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz libxml2-pthread.patch " options="!strip" _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ || return 1 make } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install rm "$pkgdir"/usr/lib/*.la \ "$pkgdir"/usr/lib/python*/site-packages/*.la \ || return 1 install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING } py() { cd "$_builddir" pkgdesc="$pkgname python bindings" install -d "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } utils() { pkgdesc="XML utilities" replaces="libxml2" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } md5sums="9c0cfef285d5c4a5c80d00904ddab380 libxml2-2.9.1.tar.gz f5fe0da88617b8d87977640a009b8ea9 libxml2-pthread.patch" sha256sums="fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb libxml2-2.9.1.tar.gz 59e0013398c959df25cf7406e43ad15cccc9bdcfefb6875260bf0daf67c76543 libxml2-pthread.patch" sha512sums="7b10de749485bc2eb2108063e97d89e70d6fbb78b1bf195ab5528c8c64e79483d55223a49d95934f4e00b00e906c18bdd34344703ffe158dcf08096905a44c1b libxml2-2.9.1.tar.gz 1a1c747bfd5f8692ef5df2510dea5572aaf153b597463da0dfd817e53a5cd5c8ebb7e9be88ab787194ccedbf4f2739ada45acf655d38fb40a384004e91062322 libxml2-pthread.patch"