# Maintainer: Natanael Copa pkgname=apr-util pkgver=1.5.3 pkgrel=0 pkgdesc="The Apache Portable Runtime Utility Library" url="http://apr.apache.org/" arch="all" license="ASL 2.0" depends= subpackages="$pkgname-dev $pkgname-dbm_db $pkgname-dbd_pgsql $pkgname-dbd_sqlite3 $pkgname-ldap" makedepends="apr-dev expat-dev bash openldap-dev sqlite-dev postgresql-dev db-dev" depends_dev="expat-dev apr-dev openldap-dev sqlite-dev postgresql-dev db-dev" source="http://www.apache.org/dist/apr/$pkgname-$pkgver.tar.bz2" _builddir="$srcdir/$pkgname-$pkgver" build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --with-apr=/usr \ --with-ldap \ --with-pgsql \ --with-sqlite3 \ --with-berkeley-db \ --without-iconv \ --without-sqlite2 \ --without-gdbm \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm "$pkgdir"/usr/lib/apr-util*/*.la \ "$pkgdir"/usr/lib/*.exp \ "$pkgdir"/usr/lib/*.la || return 1 } _mv_mod() { pkgdesc="The Apache Portable Runtime Utility Library - $2 driver" depends= local _moddir="usr/lib/apr-util-1" mkdir -p "$subpkgdir"/$_moddir mv "$pkgdir"/$_moddir/apr_$1*.so "$subpkgdir"/$_moddir/ } dbm_db() { _mv_mod dbm_db "Berkley DB"; } dbd_pgsql() { _mv_mod dbd_pgsql "PostgreSQL"; } dbd_mysql() { _mv_mod dbd_mysql "MySQL"; } dbd_sqlite3() { _mv_mod dbd_sqlite "SQLite3"; } ldap() { _mv_mod ldap "LDAP"; } md5sums="6f3417691c7a27090f36e7cf4d94b36e apr-util-1.5.3.tar.bz2" sha256sums="78edb174f13e25ee15ded2b849b741a248b879a93a77a2d31c20f7e225be3968 apr-util-1.5.3.tar.bz2" sha512sums="b03588fd10c8705ea72cb35e821a99ba160c5a480d91d766969672c72a4db5bc2ec01b13cbe0eccc1cd1eadd96e8198994296bc2f0232b3fce4e82271a382db6 apr-util-1.5.3.tar.bz2"