1 SUMMARY_python2-rpm = "Python bindings for apps which will manupulate RPM packages"
2 DESCRIPTION_python2-rpm = "The python2-rpm package contains a module that permits applications \
3 written in the Python programming language to use the interface \
4 supplied by the RPM Package Manager libraries."
6 HOMEPAGE = "http://www.rpm.org"
8 # libraries are also LGPL - how to express this?
10 LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
12 SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
13 file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
14 file://0001-Do-not-read-config-files-from-HOME.patch \
15 file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
16 file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
17 file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
18 file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
19 file://0001-Fix-build-with-musl-C-library.patch \
20 file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
21 file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
22 file://0001-Split-binary-package-building-into-a-separate-functi.patch \
23 file://0002-Run-binary-package-creation-via-thread-pools.patch \
24 file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
25 file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
26 file://0001-perl-disable-auto-reqs.patch \
27 file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
31 SRCREV = "753f6941dc32e94047b7cfe713ddd604a810b4db"
35 DEPENDS = "nss libarchive db file popt xz bzip2 dbus elfutils python"
36 DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
38 inherit autotools gettext pkgconfig pythonnative
41 # OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
42 EXTRA_AUTORECONF_append = " --exclude=gnu-configize"
44 EXTRA_OECONF_append = " --without-lua --enable-python"
45 EXTRA_OECONF_append_libc-musl = " --disable-nls"
47 # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
49 # --localstatedir prevents rpm from writing its database to native sysroot when building images
51 # Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
52 # Also disable plugins by default for native.
53 EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
54 EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
56 BBCLASSEXTEND = "native nativesdk"
59 PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
63 do_compile_append () {
65 cp -r ../../git/python/* ./
69 do_install_append () {
70 sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
71 ${D}/${libdir}/rpm/macros
73 sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
74 ${D}${libdir}/rpm/pythondistdeps.py \
75 ${D}${libdir}/rpm/python-macro-helper
77 # remove all contents except python2-rpm
80 rm -r ${D}/usr/include
81 rm -r ${D}/usr/lib/librpm*
82 rm -r ${D}/usr/lib/pkgconfig
84 rm -r ${D}/usr/lib/rpm
85 rm -r ${D}/usr/lib/rpm-plugins
86 # rm -r ${D}/usr/lib/.debug
90 python setup.py install \
91 --root=${D} --prefix=/usr \
92 --install-lib=${PYTHON_SITEPACKAGES_DIR}/ --install-data=${datadir}
95 PACKAGES = "python2-rpm rpm2-dbg"
96 PROVIDES = "python2-rpm rpm2-dbg"
97 FILES_python2-rpm = " \
98 ${PYTHON_SITEPACKAGES_DIR}/rpm/ \
99 ${PYTHON_SITEPACKAGES_DIR}/rpm-${PV}-py${PYTHON_BASEVERSION}.egg-info \
102 # rpm 5.x was packaging the rpm build tools separately
103 #RPROVIDES_${PN} += "rpm-build"
105 RDEPENDS_${PN} = "bash perl python-core"
106 RDEPENDS_python2-rpm = "rpm"
107 DEPENDS_python2-rpm = "rpm"