Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Open Package Manager" |
| 2 | SUMMARY_libopkg = "Open Package Manager library" |
| 3 | SECTION = "base" |
| 4 | HOMEPAGE = "http://code.google.com/p/opkg/" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 5 | DESCRIPTION = "Opkg is a lightweight package management system based on Ipkg." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 6 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" |
| 7 | LICENSE = "GPLv2+" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ |
| 9 | file://src/opkg.c;beginline=4;endline=18;md5=d6200b0f2b41dee278aa5fad333eecae" |
| 10 | |
| 11 | DEPENDS = "libarchive" |
| 12 | |
| 13 | PE = "1" |
| 14 | |
| 15 | SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ |
| 16 | file://opkg.conf \ |
| 17 | file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 18 | file://0001-tests-let-the-OS-negotiate-relative-package-dirs.patch \ |
| 19 | file://sourcedateepoch.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 20 | file://run-ptest \ |
| 21 | " |
| 22 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 23 | SRC_URI[md5sum] = "345900c1d4747d58455867f9fe88ca43" |
| 24 | SRC_URI[sha256sum] = "2217acc58b8eb31300631ebae75e222ebc700c9c1cf6408088705d19a472c839" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | |
| 26 | # This needs to be before ptest inherit, otherwise all ptest files end packaged |
| 27 | # in libopkg package if OPKGLIBDIR == libdir, because default |
| 28 | # PTEST_PATH ?= "${libdir}/${BPN}/ptest" |
| 29 | PACKAGES =+ "libopkg" |
| 30 | |
| 31 | inherit autotools pkgconfig ptest |
| 32 | |
| 33 | target_localstatedir := "${localstatedir}" |
| 34 | OPKGLIBDIR ??= "${target_localstatedir}/lib" |
| 35 | |
| 36 | PACKAGECONFIG ??= "libsolv" |
| 37 | |
| 38 | PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\ |
| 39 | gnupg gpgme libgpg-error,\ |
| 40 | ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\ |
| 41 | " |
| 42 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" |
| 43 | PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" |
| 44 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" |
| 45 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" |
| 46 | PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv" |
| 47 | |
| 48 | EXTRA_OECONF += " --disable-pathfinder" |
| 49 | EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" |
| 50 | |
| 51 | do_install_append () { |
| 52 | install -d ${D}${sysconfdir}/opkg |
| 53 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf |
| 54 | echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf |
| 55 | |
| 56 | # We need to create the lock directory |
| 57 | install -d ${D}${OPKGLIBDIR}/opkg |
| 58 | } |
| 59 | |
| 60 | do_install_ptest () { |
| 61 | sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile |
| 62 | sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile |
| 63 | } |
| 64 | |
| 65 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" |
| 66 | RDEPENDS_${PN}_class-native = "" |
| 67 | RDEPENDS_${PN}_class-nativesdk = "" |
| 68 | RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression" |
| 69 | RREPLACES_${PN} = "opkg-nogpg opkg-collateral" |
| 70 | RCONFLICTS_${PN} = "opkg-collateral" |
| 71 | RPROVIDES_${PN} = "opkg-collateral" |
| 72 | |
| 73 | FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" |
| 74 | |
| 75 | BBCLASSEXTEND = "native nativesdk" |
| 76 | |
| 77 | CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf" |