# Contributor: William Pitcock # Maintainer: William Pitcock pkgname=rpm pkgver=4.11.0.1 pkgrel=2 pkgdesc="The RPM package manager" url="http://www.rpm.org/" arch="all" license="GPL2 LGPL2+" depends="" depends_dev="nspr-dev nss-dev db-dev lua-dev zlib-dev bzip2-dev xz-dev libelf-dev file-dev popt-dev libcap-dev acl-dev" makedepends="$depends_dev graphviz gettext-dev python-dev" install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py-rpm:py_rpm" source="http://rpm.org/releases/rpm-4.11.x/rpm-$pkgver.tar.bz2 rpm-uclibc.patch" _builddir="$srcdir"/rpm-$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" _EXT_CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss" \ CFLAGS="$CFLAGS $_EXT_CPPFLAGS" CPPFLAGS="$CPPFLAGS $_EXT_CPPFLAGS" \ LIBS="$LIBS -lintl" \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --with-external-db \ --with-cap --with-acl \ --enable-python \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm "$pkgdir"/usr/lib/*.la "$pkgdir"/usr/lib/rpm-plugins/*.la } py_rpm() { mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib || return 1 for dir in "$subpkgdir"/usr/lib/python*; do rm "$dir"/site-packages/rpm/*.la done } md5sums="b35f5359e0d4494d7b11e8d0c1512a0d rpm-4.11.0.1.tar.bz2 528cdfc96ebfe8db3e389abdcf024d94 rpm-uclibc.patch" sha256sums="98496c0c73095d7c66a8b6f1d8ab00998e1daf4e46a017ae74190c65132ffb21 rpm-4.11.0.1.tar.bz2 e963102ba11f83b691ad27ca7df9283524710a8fbd458e85e6ac84f3413778e9 rpm-uclibc.patch" sha512sums="72bd3054b2d0def1e25fba7113eda14def38baef62b558e65cafaf3b374823d0905d982772cffddfd9dc6698eff293251acb2ace7dfda0964085669caa88d535 rpm-4.11.0.1.tar.bz2 7a5796716b0f53e0c7fde5d7f42bd767eb2dd03fda03179779b7085e7f0dfc72a1c246621458d3bbe6227a5d59074b3f29147eea34d889a700b3ff47b799c2ce rpm-uclibc.patch"