summaryrefslogtreecommitdiffstats
path: root/testing/rpm/APKBUILD
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2012-12-18 05:30:14 -0600
committerWilliam Pitcock <nenolod@dereferenced.org>2012-12-18 05:30:14 -0600
commit70da3b600b308f6623872635b66fd88c2c5d6965 (patch)
tree465cbc91b24837a979f04d91b11cd8bd32235816 /testing/rpm/APKBUILD
parent5c1ef1a5585888bff525a4d89eeb7f4bf8c29e45 (diff)
downloadaports-70da3b600b308f6623872635b66fd88c2c5d6965.tar.bz2
aports-70da3b600b308f6623872635b66fd88c2c5d6965.tar.xz
testing/rpm: new aport
Diffstat (limited to 'testing/rpm/APKBUILD')
-rw-r--r--testing/rpm/APKBUILD62
1 files changed, 62 insertions, 0 deletions
diff --git a/testing/rpm/APKBUILD b/testing/rpm/APKBUILD
new file mode 100644
index 000000000..eb8697a8c
--- /dev/null
+++ b/testing/rpm/APKBUILD
@@ -0,0 +1,62 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=rpm
+pkgver=4.10.2
+pkgrel=0
+pkgdesc="the RPM package manager"
+url="http://www.rpm.org/"
+arch="all"
+license="GPL"
+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="a644aea351c9b3889bbaded5d6a377c9 rpm-4.10.2.tar.bz2
+5b52ad780c3ec753d1124d6d53697612 rpm-uclibc.patch"