blob: 210c9433da064016c6881295b6e6a8d44645fd8e [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "The RPM package management system"
2DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
3package management system capable of installing, uninstalling, \
4verifying, querying, and updating software packages. Each software \
5package consists of an archive of files along with information about \
6the package like its version, a description, etc."
7
8SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
9DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
10development files will simplify the process of writing programs that \
11manipulate RPM packages and databases. These files are intended to \
12simplify the process of creating graphical package managers or any \
13other tools that need an intimate knowledge of RPM packages in order \
14to function."
15
16SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
17DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
18written in the Python programming language to use the interface \
19supplied by the RPM Package Manager libraries."
20
21HOMEPAGE = "http://www.rpm.org"
22LICENSE = "GPL-2.0+"
23LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
24
25DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils patch attr zlib acl gzip make binutils python"
26
27SRC_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
41SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173"
42SRC_URI[sha256sum] = "403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4"
43
44PR = "r1"
45
46inherit autotools
47inherit pythonnative
48inherit pkgconfig
49inherit gettext
50
51EXTRA_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
75CPPFLAGS_append = " `pkg-config --cflags nss`"
76LDFLAGS_append = " -Wl,-Bsymbolic-functions -ffunction-sections"
77CCFLAGS_append = " -fPIC "
78CXXFLAGS_append = " -fPIC "
79CFLAGS_append = " -fPIC -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE "
80
81do_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
88do_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
102pkg_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
113pkg_postrm_${PN}() {
114 [ "x\$D" == "x" ] && ldconfig
115
116}
117
118PACKAGES += "python-${PN}"
119PROVIDES += "python-rpm"
120
121FILES_${PN} += "${libdir}/rpm \
122 ${libdir}/rpm-plugins/exec.so \
123 "
124RDEPENDS_${PN} = "base-files run-postinsts"
125RDEPENDS_${PN}_class-native = ""
126
127FILES_${PN}-dbg += "${libdir}/rpm/.debug/* \
128 ${libdir}/rpm-plugins/.debug/* \
129 ${libdir}/python2.7/site-packages/rpm/.debug/* \
130 "
131
132FILES_${PN}-dev += "${libdir}/python2.7/site-packages/rpm/*.la"
133
134FILES_python-${PN} = "${libdir}/python2.7/site-packages/rpm/*"
135RDEPENDS_python-${PN} = "${PN} python"
136
137BBCLASSEXTEND = "native"