Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Creates metadata indexes for RPM package repositories" |
| 2 | HOMEPAGE = "http://createrepo.baseurl.org/" |
| 3 | |
| 4 | RECIPE_NO_UPDATE_REASON = "Versions after 0.9.* use YUM, so we hold at 0.4.11" |
| 5 | |
| 6 | LICENSE = "GPLv2+" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" |
| 8 | |
| 9 | DEPENDS_class-native += "libxml2-native rpm-native" |
| 10 | RDEPENDS_${PN}_class-target = "libxml2-python" |
| 11 | |
| 12 | PR = "r9" |
| 13 | |
| 14 | SRC_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 \ |
| 22 | " |
| 23 | |
| 24 | SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2" |
| 25 | SRC_URI[sha256sum] = "a73ae11a0dcde8bde36d900bc3f7f8f1083ba752c70a5c61b72d1e1e7608f21b" |
| 26 | |
| 27 | BBCLASSEXTEND = "native" |
| 28 | |
| 29 | do_install () { |
| 30 | oe_runmake -e 'DESTDIR=${D}' install |
| 31 | install -m 0755 ${WORKDIR}/rpm-createsolvedb.py ${D}${bindir}/ |
| 32 | } |
| 33 | |
| 34 | # Wrap the python script since the native python is |
| 35 | # ${bindir}/python-native/python, and the "#! /usr/bin/env python" can't |
| 36 | # find it since it is not in PATH. |
| 37 | do_install_append_class-native () { |
| 38 | # Not all the python scripts should be wrapped since some of |
| 39 | # them are modules (be imported). |
| 40 | for i in ${D}${datadir}/createrepo/genpkgmetadata.py \ |
| 41 | ${D}${datadir}/createrepo/modifyrepo.py \ |
| 42 | ${D}${bindir}/rpm-createsolvedb.py ; do |
| 43 | sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' $i |
| 44 | done |
| 45 | |
| 46 | create_wrapper ${D}/${bindir}/createrepo \ |
| 47 | RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \ |
| 48 | RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \ |
| 49 | RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale |
| 50 | } |