blob: 2a3231b3a4a37665c844ee70112cb150c481dbf9 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Creates metadata indexes for RPM package repositories"
2HOMEPAGE = "http://createrepo.baseurl.org/"
3
4RECIPE_NO_UPDATE_REASON = "Versions after 0.9.* use YUM, so we hold at 0.4.11"
5
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
8
9DEPENDS_class-native += "libxml2-native rpm-native"
10RDEPENDS_${PN}_class-target = "libxml2-python"
11
12PR = "r9"
13
14SRC_URI = "http://createrepo.baseurl.org/download/${BP}.tar.gz \
15 file://fix-native-install.patch \
16 file://python-scripts-should-use-interpreter-from-env.patch \
17 file://createrepo-rpm549.patch \
18 file://recommends.patch \
19 file://createrepo-dbpath.patch \
20 file://dumpMetadata-disable-signature-validation.patch \
21 file://rpm-createsolvedb.py \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050022 file://fixstat.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023 "
24
25SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2"
26SRC_URI[sha256sum] = "a73ae11a0dcde8bde36d900bc3f7f8f1083ba752c70a5c61b72d1e1e7608f21b"
27
28BBCLASSEXTEND = "native"
29
30do_install () {
31 oe_runmake -e 'DESTDIR=${D}' install
32 install -m 0755 ${WORKDIR}/rpm-createsolvedb.py ${D}${bindir}/
33}
34
35# Wrap the python script since the native python is
36# ${bindir}/python-native/python, and the "#! /usr/bin/env python" can't
37# find it since it is not in PATH.
38do_install_append_class-native () {
39 # Not all the python scripts should be wrapped since some of
40 # them are modules (be imported).
41 for i in ${D}${datadir}/createrepo/genpkgmetadata.py \
42 ${D}${datadir}/createrepo/modifyrepo.py \
43 ${D}${bindir}/rpm-createsolvedb.py ; do
44 sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' $i
45 done
46
47 create_wrapper ${D}/${bindir}/createrepo \
48 RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \
49 RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
50 RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
51}