Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "The RPM package management system" |
| 2 | DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ |
| 3 | package management system capable of installing, uninstalling, \ |
| 4 | verifying, querying, and updating software packages. Each software \ |
| 5 | package consists of an archive of files along with information about \ |
| 6 | the package like its version, a description, etc." |
| 7 | |
| 8 | SUMMARY_${PN}-dev = "Development files for manipulating RPM packages" |
| 9 | DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \ |
| 10 | development files will simplify the process of writing programs that \ |
| 11 | manipulate RPM packages and databases. These files are intended to \ |
| 12 | simplify the process of creating graphical package managers or any \ |
| 13 | other tools that need an intimate knowledge of RPM packages in order \ |
| 14 | to function." |
| 15 | |
| 16 | SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages" |
| 17 | DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ |
| 18 | written in the Python programming language to use the interface \ |
| 19 | supplied by the RPM Package Manager libraries." |
| 20 | |
| 21 | HOMEPAGE = "http://www.rpm.org" |
| 22 | LICENSE = "GPL-2.0+" |
| 23 | LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" |
| 24 | |
| 25 | DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils patch attr zlib acl gzip make binutils python" |
| 26 | |
| 27 | SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \ |
| 28 | file://use-pkgconfig-for-python.patch \ |
| 29 | file://remove-db3-from-configure.patch \ |
| 30 | file://add_RPMSENSE_MISSINGOK_to_rpmmodule.patch \ |
| 31 | file://support-suggests-tag.patch \ |
| 32 | file://remove-dir-check.patch \ |
| 33 | file://disable_shortcircuited.patch \ |
| 34 | file://fix_libdir.patch \ |
| 35 | file://rpm-scriptetexechelp.patch \ |
| 36 | file://pythondeps.sh \ |
| 37 | file://rpm-CVE-2014-8118.patch \ |
| 38 | file://rpm-CVE-2013-6435.patch \ |
| 39 | " |
| 40 | |
| 41 | SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173" |
| 42 | SRC_URI[sha256sum] = "403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4" |
| 43 | |
| 44 | PR = "r1" |
| 45 | |
| 46 | inherit autotools |
| 47 | inherit pythonnative |
| 48 | inherit pkgconfig |
| 49 | inherit gettext |
| 50 | |
| 51 | EXTRA_OECONF += "--host=${HOST_SYS} \ |
| 52 | --program-prefix= \ |
| 53 | --prefix=${prefix} \ |
| 54 | --exec-prefix=${prefix} \ |
| 55 | --bindir=${prefix}/bin \ |
| 56 | --sbindir=${prefix}/sbin \ |
| 57 | --sysconfdir=${sysconfdir} \ |
| 58 | --datadir=${prefix}/share \ |
| 59 | --includedir=${prefix}/include \ |
| 60 | --libdir=${prefix}/lib \ |
| 61 | --libexecdir=${prefix}/libexec \ |
| 62 | --localstatedir=${localstatedir} \ |
| 63 | --sharedstatedir=${prefix}/com \ |
| 64 | --mandir=${mandir} \ |
| 65 | --infodir=${infodir} \ |
| 66 | --disable-dependency-tracking \ |
| 67 | --with-acl \ |
| 68 | --without-lua \ |
| 69 | --without-cap \ |
| 70 | --enable-shared \ |
| 71 | --enable-python \ |
| 72 | --with-external-db \ |
| 73 | " |
| 74 | |
| 75 | CPPFLAGS_append = " `pkg-config --cflags nss`" |
| 76 | LDFLAGS_append = " -Wl,-Bsymbolic-functions -ffunction-sections" |
| 77 | CCFLAGS_append = " -fPIC " |
| 78 | CXXFLAGS_append = " -fPIC " |
| 79 | CFLAGS_append = " -fPIC -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE " |
| 80 | |
| 81 | do_configure_prepend() { |
| 82 | rm -rf sqlite |
| 83 | rm -f m4/libtool.m4 |
| 84 | rm -f m4/lt*.m4 |
| 85 | rm -rf db3/configure* |
| 86 | } |
| 87 | |
| 88 | do_install_append() { |
| 89 | mv ${D}/${base_bindir}/rpm ${D}/${bindir}/ |
| 90 | rmdir ${D}/${base_bindir} |
| 91 | rm -f ${D}${prefix}/lib/*.la |
| 92 | rm -f ${D}${prefix}/lib/rpm-plugins/*.la |
| 93 | rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la} |
| 94 | rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la} |
| 95 | rm -fr ${D}/var |
| 96 | install -d ${D}${prefix}/lib/rpm/bin |
| 97 | ln -s ../debugedit ${D}${prefix}/lib/rpm/bin/debugedit |
| 98 | ln -s ../rpmdeps ${D}${prefix}/lib/rpm/bin/rpmdeps-oecore |
| 99 | install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh |
| 100 | } |
| 101 | |
| 102 | pkg_postinst_${PN}() { |
| 103 | |
| 104 | [ "x\$D" == "x" ] && ldconfig |
| 105 | test -f ${localstatedir}/lib/rpm/Packages || rpm --initdb |
| 106 | rm -f ${localstatedir}/lib/rpm/Filemd5s \ |
| 107 | ${localstatedir}/lib/rpm/Filedigests \ |
| 108 | ${localstatedir}/lib/rpm/Requireversion \ |
| 109 | ${localstatedir}/lib/rpm/Provideversion |
| 110 | |
| 111 | } |
| 112 | |
| 113 | pkg_postrm_${PN}() { |
| 114 | [ "x\$D" == "x" ] && ldconfig |
| 115 | |
| 116 | } |
| 117 | |
| 118 | PACKAGES += "python-${PN}" |
| 119 | PROVIDES += "python-rpm" |
| 120 | |
| 121 | FILES_${PN} += "${libdir}/rpm \ |
| 122 | ${libdir}/rpm-plugins/exec.so \ |
| 123 | " |
| 124 | RDEPENDS_${PN} = "base-files run-postinsts" |
| 125 | RDEPENDS_${PN}_class-native = "" |
| 126 | |
| 127 | FILES_${PN}-dbg += "${libdir}/rpm/.debug/* \ |
| 128 | ${libdir}/rpm-plugins/.debug/* \ |
| 129 | ${libdir}/python2.7/site-packages/rpm/.debug/* \ |
| 130 | " |
| 131 | |
| 132 | FILES_${PN}-dev += "${libdir}/python2.7/site-packages/rpm/*.la" |
| 133 | |
| 134 | FILES_python-${PN} = "${libdir}/python2.7/site-packages/rpm/*" |
| 135 | RDEPENDS_python-${PN} = "${PN} python" |
| 136 | |
| 137 | BBCLASSEXTEND = "native" |