summaryrefslogtreecommitdiff
path: root/app-arch/rpm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-arch/rpm
reinit the tree, so we can have metadata
Diffstat (limited to 'app-arch/rpm')
-rw-r--r--app-arch/rpm/Manifest15
-rw-r--r--app-arch/rpm/files/rpm-4.11.0-autotools.patch14
-rw-r--r--app-arch/rpm/files/rpm-4.8.1-db-path.patch26
-rw-r--r--app-arch/rpm/files/rpm-4.9.1.2-libdir.patch31
-rw-r--r--app-arch/rpm/metadata.xml8
-rw-r--r--app-arch/rpm/rpm-4.11.0.1.ebuild117
-rw-r--r--app-arch/rpm/rpm-4.11.1.ebuild117
-rw-r--r--app-arch/rpm/rpm-4.11.2-r1.ebuild119
-rw-r--r--app-arch/rpm/rpm-4.11.2.ebuild117
-rw-r--r--app-arch/rpm/rpm-4.12.0.1.ebuild122
10 files changed, 686 insertions, 0 deletions
diff --git a/app-arch/rpm/Manifest b/app-arch/rpm/Manifest
new file mode 100644
index 000000000000..64913331afd4
--- /dev/null
+++ b/app-arch/rpm/Manifest
@@ -0,0 +1,15 @@
+AUX rpm-4.11.0-autotools.patch 503 SHA256 f1020af54fcad6271376ff50e9a2a166e31bb8602401bbbeadb570a82dc8b11d SHA512 fdec043c3db2315aaabd3da91067a8d299ba564eaf53ba6465840352586f0660a5216cfd291b19398a53b2646f4a0b312076e14e56004d8e941d4ae279d54305 WHIRLPOOL 0acf50816eeec2fa4dca4488df83febece25b47b78fd94dcb0264c8e45ecc4b5e5ccd6e7d200dbe66c7737023c408d5549ef1070dcc8c3576eef959616b121d4
+AUX rpm-4.8.1-db-path.patch 628 SHA256 791682c72dd3a24e5e8268bfa967412035aa135c7b8d4673541bed129b89a0f3 SHA512 12539bbeda99d261890d50304945c7f022681ca0a283c70f17a6b1f188e9e24e9ce05b71d541ed6d951f94576b5183c49c4db784d5016d075a859c1e4dcb9005 WHIRLPOOL 96260c3669e3e4521f58e720aa27f365c293d82c85fe26a8a271e069b00e7971231a08b19d390f1282eecbb80aa49ec58a67ca80adef8a2fa95ae410f04cd4d3
+AUX rpm-4.9.1.2-libdir.patch 1056 SHA256 e4beb68b13861ccedcaa0a90c49f42c6dd7a2d7799360798b21eec7ea689437c SHA512 505faa54ccf196891f1e2231c776f8eadf547bf2003a495c90a2e5e4c93e31aadae5bac70541d316643a8aca85a1b2a3dc6b0ae2601834534ccded06a4a5fabc WHIRLPOOL 2a72aa223728f18fe186686dfee3e137e52f91a8150d4ed364fee9b9152941a4b2df366958901e4bdb733acf1eca77f5662755373fa0928f4f782e0723197caa
+DIST rpm-4.11.0.1.tar.bz2 3670158 SHA256 98496c0c73095d7c66a8b6f1d8ab00998e1daf4e46a017ae74190c65132ffb21 SHA512 72bd3054b2d0def1e25fba7113eda14def38baef62b558e65cafaf3b374823d0905d982772cffddfd9dc6698eff293251acb2ace7dfda0964085669caa88d535 WHIRLPOOL bf37145cfecb2820b21f3a79c7c28048bf6b1c25500720d4159083b75535cf79075840b8d73e3b5562aab6ad520e384d0fd4e2aff26fb4e212bb863115682afb
+DIST rpm-4.11.1.tar.bz2 3778922 SHA256 5bbb0899ffdc997d399c4e96311f9cda5364f1fed5164aaf9db685784499ef8c SHA512 ef65b265e74e549c9525da9247a1c81a4fca2b47f49c80b155e8065f0191039b6c56be3ed92fd9dd7a88c36954039a5c1a613e2bfb45599eb9a79d06503a8587 WHIRLPOOL 792c0c6cd45324a9c930aed276189908ed053429a8bc36337c6f6df59bfaa84ae92682b8d8131df9839911ec586cd445875e32c022be03f4da78b101ac235aa5
+DIST rpm-4.11.2.tar.bz2 3988837 SHA256 403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4 SHA512 de3d8e6ca4981bcbf48f9db5f74c03afcc14a3f100a74a721a351183be8c5cc6052be6dce5809976b9aa348a79bfb5bc04b41930f75df4d6fc4021311301ef0e WHIRLPOOL 6bcc13e81a2bd6c4611d341bd0b3e1380f2fbdc2737d1c6526fc79da23525d1c75e64bafb6092a35dad560a5e40df205c191ebed31c774d4b4baa0dc729ecd7a
+DIST rpm-4.12.0.1.tar.bz2 4129093 SHA256 77ddd228fc332193c874aa0b424f41db1ff8b7edbb6a338703ef747851f50229 SHA512 ae751b04cec2463f1f259aec4b4750fca1e4cef6144b7e612d0c94f7b6a2864ed119547568f6acebb7fefddb7b040b6021c1f32cf465963db0b627f524c5760f WHIRLPOOL a6ba52bc98082f24b15d86da24545e5cff9cf5b63f5a0328c274decc554a1f97a8b82cf29e726f3ab2d0a594ded8e1dc919e84f83c3e955f67cca2dc1dae56bb
+EBUILD rpm-4.11.0.1.ebuild 2735 SHA256 d99cb7b11016af6f63398c3eca9c94f4cb3a9f2718524b207353e61cdee81715 SHA512 04dbbe9f9b6c35ee588fb8468007bace3254ef878ae0a41f9fbe9f2ac278f5b190ffe271b7b301e0c9006e2c30e519ea69c234f3cfbdeb0886ca6e8919415a51 WHIRLPOOL 438f7e723864b8ba4e8206e41a4a27dc50e1201714a951b927f22765c783fd11d93acce7083b48a467f03e6fbee90adafbf212ade60974c164f7fc7a0cfe787b
+EBUILD rpm-4.11.1.ebuild 2746 SHA256 314dfb4030e88a859da991ce70e19b25ae5fb17b00d1992b365b568c9fddda7c SHA512 2f7a4c98629bacbea6e9fe86bdce208a00418e2487f43b86a8b32c636a2c9687e2ec6c364ed49e22fca5a8e5ab51605afc4bd88564d236cfd801b9aa1e69c0f5 WHIRLPOOL 3861105e0fcbf2e85db87507e18ed47b83a397290c4470539496cca58bc5e611a47a55472ce0720a12bcbfdbcd265eebe10ff30b91a508e20246e465153b2223
+EBUILD rpm-4.11.2-r1.ebuild 2845 SHA256 3cdb6dd03fd45418fc96d052ad1fdc81ced941a523331a128348fad05438e932 SHA512 6db765d2670d7db18b5ee21136bae31af65d3ba1bf4862032ba7b40eed1515fe5e8bbf6b182995d551bfe16ed99e709d805041c817279a4c92bec7df86e1f453 WHIRLPOOL 33b39817a4f7f0b6e3df084908348a4574ccb644c93b7bee0b13783578aadb0917266b06ab34315839fa45a7753206f61f2cbfa59aa507aa6f18522bfd440a0a
+EBUILD rpm-4.11.2.ebuild 2746 SHA256 314dfb4030e88a859da991ce70e19b25ae5fb17b00d1992b365b568c9fddda7c SHA512 2f7a4c98629bacbea6e9fe86bdce208a00418e2487f43b86a8b32c636a2c9687e2ec6c364ed49e22fca5a8e5ab51605afc4bd88564d236cfd801b9aa1e69c0f5 WHIRLPOOL 3861105e0fcbf2e85db87507e18ed47b83a397290c4470539496cca58bc5e611a47a55472ce0720a12bcbfdbcd265eebe10ff30b91a508e20246e465153b2223
+EBUILD rpm-4.12.0.1.ebuild 2875 SHA256 19e5c134cd317db530f24d4501ceb8b7975432cd3e6e41711f670215b051be81 SHA512 b5040fc95f1fd142e57462257b32009d1d9f3da2797b4290f914a2c47d952dd5c6e7a703d7def9ad09c60195c3b9c0b39c945d7e4c9fca38a981c0d5ef2826cf WHIRLPOOL ba8d81acf84c2cb5e5d38f07c2ceb84c3f07a74b371ffb3a71b3d2781bfa7471c64a788e9e114ec6818ced18e49d9502d518acfa6939b09ef480234991364ea7
+MISC ChangeLog 2842 SHA256 3e168ac705100adf64251b16307bde473db3f2e6686c20cfec1b0abdda1d68b1 SHA512 4d82c973a0fc87ff97ee949f5d46100764d1a62bcbee77710fe4ca4e846e2185260d0bbe6c87c12709d8060ca4b1deb1ed18f7b0b5f69f85cffb96e8daa5d44d WHIRLPOOL 4cf49f2fd5e823f5e91dad3c38aca5e5e45f404603b26115bb6d0302b66ea7bad7dededd5087cbc5e49ea8e029107f2ac4990adacf7f74673bf409bbe874b354
+MISC ChangeLog-2015 29318 SHA256 84578d2af8ed4c27571145c34a5a459f2d5dfa31bf87d4b0396ed4fc378afd3c SHA512 ffcaea44f31351b880b0e4ce1c7633e6359dcc3c2f0e8cb9fcb42b16a6bacc93303e6027a87eaa3b7e255163cdbc5ccfbbc76d703a4ee84c2d8ebb12e25bb70e WHIRLPOOL 7306fd94feaf597f299a2665e894a20ca7a8ae641cdef74a1e79d79a0a64d36ca4581ca786c6738e6be34a6178111ed0d8ae29bd7d21b2c0d07e0451c96a9cc1
+MISC metadata.xml 232 SHA256 cae43e94e79a01960721d205a44935817243a3778791d1ba4c8c041c4a9d501b SHA512 23824ca618f16dec558197c0c853f3ebf5c0f1b034635242282bd40f01beea59cbac3b416e86f2eb4337942d9db945a2e1fd4fe52c88762b65749855762769fa WHIRLPOOL 774b24967a2336d4cc213a21ac9c89d0b11c17d626a93badaf1e98dec218db09edc4b73a30e47121a1f1cdd588c7ee9859da00b319d09707b05d802dcb134891
diff --git a/app-arch/rpm/files/rpm-4.11.0-autotools.patch b/app-arch/rpm/files/rpm-4.11.0-autotools.patch
new file mode 100644
index 000000000000..2a2dcb129de3
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.11.0-autotools.patch
@@ -0,0 +1,14 @@
+diff -urN rpm-4.11.0.1.old/configure.ac rpm-4.11.0.1/configure.ac
+--- rpm-4.11.0.1.old/configure.ac 2013-03-26 18:38:35.137667450 +0100
++++ rpm-4.11.0.1/configure.ac 2013-03-26 18:44:08.632673258 +0100
+@@ -824,10 +810,6 @@
+
+ AC_SUBST(OBJDUMP)
+
+-if test "$with_external_db" = no; then
+- AC_CONFIG_SUBDIRS(db3)
+-fi
+-
+ AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no])
+ AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no])
+ AM_CONDITIONAL([HACKINGDOCS],[test "$with_hackingdocs" = yes])
diff --git a/app-arch/rpm/files/rpm-4.8.1-db-path.patch b/app-arch/rpm/files/rpm-4.8.1-db-path.patch
new file mode 100644
index 000000000000..634dd2373ab8
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.8.1-db-path.patch
@@ -0,0 +1,26 @@
+diff --git a/Makefile.am b/Makefile.am
+index 587cfa7..498abfb 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -177,7 +177,7 @@ EXTRA_DIST += rpmpopt.in
+
+ usrsrcdir = $(prefix)/src
+
+-rpmvardir = $(localstatedir)/lib/rpm
++rpmvardir = $(localstatedir)/rpm
+ rpmvar_DATA =
+
+ install-exec-hook:
+diff --git a/macros.in b/macros.in
+index ae46fcb..213b53c 100644
+--- a/macros.in
++++ b/macros.in
+@@ -155,7 +155,7 @@
+ %_bzip2bin %{__bzip2}
+
+ # The location of the rpm database file(s).
+-%_dbpath %{_var}/lib/rpm
++%_dbpath %{_var}/rpm
+
+ # The location of the rpm database file(s) after "rpm --rebuilddb".
+ %_dbpath_rebuild %{_dbpath}
diff --git a/app-arch/rpm/files/rpm-4.9.1.2-libdir.patch b/app-arch/rpm/files/rpm-4.9.1.2-libdir.patch
new file mode 100644
index 000000000000..221926494411
--- /dev/null
+++ b/app-arch/rpm/files/rpm-4.9.1.2-libdir.patch
@@ -0,0 +1,31 @@
+diff -urN rpm-4.9.1.2.old/configure.ac rpm-4.9.1.2/configure.ac
+--- rpm-4.9.1.2.old/configure.ac 2012-04-19 12:18:27.584725220 +0200
++++ rpm-4.9.1.2/configure.ac 2012-04-19 12:34:50.302722933 +0200
+@@ -846,13 +846,7 @@
+ AC_SUBST(RPMCANONGNU)
+ AC_DEFINE_UNQUOTED([RPMCANONVENDOR],["${RPMCANONVENDOR}"],[canonical vendor])
+
+-if test X"$prefix" = XNONE ; then
+- usrprefix="$ac_default_prefix"
+-else
+- usrprefix=$prefix
+-fi
+-
+-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
++RPMCONFIGDIR="`echo ${libexecdir}/rpm/`"
+ AC_SUBST(RPMCONFIGDIR)
+
+ AC_SUBST(OBJDUMP)
+diff -urN rpm-4.9.1.2.old/rpm.am rpm-4.9.1.2/rpm.am
+--- rpm-4.9.1.2.old/rpm.am 2012-04-19 12:18:27.584725220 +0200
++++ rpm-4.9.1.2/rpm.am 2012-04-19 12:24:49.035724332 +0200
+@@ -1,7 +1,5 @@
+ # Internal binaries
+-## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
+-rpmlibexecdir = $(prefix)/lib/rpm
++rpmlibexecdir = $(pkglibexecdir)
+
+ # Host independent config files
+-## HACK: it probably should be $(datadir)/rpm
+-rpmconfigdir = $(prefix)/lib/rpm
++rpmconfigdir = $(pkglibexecdir)
diff --git a/app-arch/rpm/metadata.xml b/app-arch/rpm/metadata.xml
new file mode 100644
index 000000000000..c78052713743
--- /dev/null
+++ b/app-arch/rpm/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>suse@gentoo.org</email>
+ <name>SUSE</name>
+</maintainer>
+</pkgmetadata>
diff --git a/app-arch/rpm/rpm-4.11.0.1.ebuild b/app-arch/rpm/rpm-4.11.0.1.ebuild
new file mode 100644
index 000000000000..dedb3ff2cf00
--- /dev/null
+++ b/app-arch/rpm/rpm-4.11.0.1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm/rpm-4.11.1.ebuild b/app-arch/rpm/rpm-4.11.1.ebuild
new file mode 100644
index 000000000000..cbbff6316874
--- /dev/null
+++ b/app-arch/rpm/rpm-4.11.1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm/rpm-4.11.2-r1.ebuild b/app-arch/rpm/rpm-4.11.2-r1.ebuild
new file mode 100644
index 000000000000..a660f79bdd30
--- /dev/null
+++ b/app-arch/rpm/rpm-4.11.2-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+ # fix #492642
+ sed -i 's:@__PYTHON@:/usr/bin/python2:' macros.in || die "Fixing %__python failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm/rpm-4.11.2.ebuild b/app-arch/rpm/rpm-4.11.2.ebuild
new file mode 100644
index 000000000000..cbbff6316874
--- /dev/null
+++ b/app-arch/rpm/rpm-4.11.2.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}
diff --git a/app-arch/rpm/rpm-4.12.0.1.ebuild b/app-arch/rpm/rpm-4.12.0.1.ebuild
new file mode 100644
index 000000000000..1c8029fe8dc8
--- /dev/null
+++ b/app-arch/rpm/rpm-4.12.0.1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils autotools flag-o-matic perl-module python-single-r1 versionator
+
+DESCRIPTION="Red Hat Package Management Utils"
+HOMEPAGE="http://www.rpm.org"
+SRC_URI="http://rpm.org/releases/rpm-$(get_version_component_range 1-2).x/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="nls python doc caps lua acl selinux"
+
+CDEPEND="!app-arch/rpm5
+ app-arch/libarchive
+ >=sys-libs/db-4.5
+ >=sys-libs/zlib-1.2.3-r1
+ >=app-arch/bzip2-1.0.1
+ >=dev-libs/popt-1.7
+ >=app-crypt/gnupg-1.2
+ dev-libs/elfutils
+ virtual/libintl
+ >=dev-lang/perl-5.8.8
+ dev-libs/nss
+ python? ( ${PYTHON_DEPS} )
+ nls? ( virtual/libintl )
+ lua? ( >=dev-lang/lua-5.1.0[deprecated] )
+ acl? ( virtual/acl )
+ caps? ( >=sys-libs/libcap-2.0 )"
+
+DEPEND="${CDEPEND}
+ nls? ( sys-devel/gettext )
+ doc? ( app-doc/doxygen )"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpm )"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.11.0-autotools.patch \
+ "${FILESDIR}"/${PN}-4.8.1-db-path.patch \
+ "${FILESDIR}"/${PN}-4.9.1.2-libdir.patch
+
+ # fix #356769
+ sed -i 's:%{_var}/tmp:/var/tmp:' macros.in || die "Fixing tmppath failed"
+ # fix #492642
+ sed -i 's:@__PYTHON@:/usr/bin/python2:' macros.in || die "Fixing %__python failed"
+
+ eautoreconf
+
+ # Prevent automake maintainer mode from kicking in (#450448).
+ touch -r Makefile.am preinstall.am
+}
+
+src_configure() {
+ append-cppflags -I"${EPREFIX}/usr/include/nss" -I"${EPREFIX}/usr/include/nspr"
+ econf \
+ --without-selinux \
+ --with-external-db \
+ --without-beecrypt \
+ $(use_enable python) \
+ $(use_with doc hackingdocs) \
+ $(use_enable nls) \
+ $(use_with lua) \
+ $(use_with caps cap) \
+ $(use_with acl)
+}
+
+src_compile() {
+ default
+}
+
+src_install() {
+ default
+
+ # remove la files
+ prune_libtool_files --all
+
+ mv "${ED}"/bin/rpm "${ED}"/usr/bin
+ rmdir "${ED}"/bin
+ # fix symlinks to /bin/rpm (#349840)
+ for binary in rpmquery rpmverify;do
+ ln -sf rpm "${ED}"/usr/bin/${binary}
+ done
+
+ use nls || rm -rf "${ED}"/usr/share/man/??
+
+ keepdir /usr/src/rpm/{SRPMS,SPECS,SOURCES,RPMS,BUILD}
+
+ dodoc CHANGES CREDITS GROUPS README*
+ if use doc; then
+ pushd doc/hacking/html
+ dohtml -p hacking -r .
+ popd
+ pushd doc/librpm/html
+ dohtml -p librpm -r .
+ popd
+ fi
+
+ # Fix perllocal.pod file collision
+ perl_delete_localpod
+}
+
+pkg_postinst() {
+ if [[ -f "${EROOT}"/var/lib/rpm/Packages ]] ; then
+ einfo "RPM database found... Rebuilding database (may take a while)..."
+ "${EROOT}"/usr/bin/rpmdb --rebuilddb --root="${EROOT}"
+ else
+ einfo "No RPM database found... Creating database..."
+ "${EROOT}"/usr/bin/rpmdb --initdb --root="${EROOT}"
+ fi
+}