# Contributor: William Pitcock # Maintainer: William Pitcock pkgname=rpm pkgver=4.10.3.1 pkgrel=0 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.10.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="7be152323885f6e558bd581f021e5add rpm-4.10.3.1.tar.bz2 5b52ad780c3ec753d1124d6d53697612 rpm-uclibc.patch" sha256sums="6260e765982936913ca877b042ed0ad863d656e06ec5badc94fa810d36b7368c rpm-4.10.3.1.tar.bz2 0b43737b018a089351db920f1a72a8984a8dbc11f3a0df4e9722e14bdcd8bec3 rpm-uclibc.patch" sha512sums="5abb38547c7126ef535dc988ca55f75d834277bcb37556c4da4234355774331f536c7b42e5f4c0dcb4258da30dd47119f208ee9c935c9b943a5d060c48cb7c29 rpm-4.10.3.1.tar.bz2 0c4a03c1ea6cc3fef2ce25797ad5fbe7b22576fa6ff8d8f3424496e90e13d774e05785cbddf24ed07a7bdc3a25ac4d614537ec5ed1b14f2039c93a1a9077a9ff rpm-uclibc.patch"