Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Open Package Manager" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 2 | SUMMARY:libopkg = "Open Package Manager library" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 \ |
| 18 | file://run-ptest \ |
| 19 | " |
| 20 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 21 | SRC_URI[md5sum] = "5dc41ad37d88803b5e0f456a9c5a0811" |
| 22 | SRC_URI[sha256sum] = "a1214a75fa34fb9228db8da47308e0e711b1c93fd8938cf164c10fd28eb50f1e" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | |
| 24 | # This needs to be before ptest inherit, otherwise all ptest files end packaged |
| 25 | # in libopkg package if OPKGLIBDIR == libdir, because default |
| 26 | # PTEST_PATH ?= "${libdir}/${BPN}/ptest" |
| 27 | PACKAGES =+ "libopkg" |
| 28 | |
| 29 | inherit autotools pkgconfig ptest |
| 30 | |
| 31 | target_localstatedir := "${localstatedir}" |
| 32 | OPKGLIBDIR ??= "${target_localstatedir}/lib" |
| 33 | |
| 34 | PACKAGECONFIG ??= "libsolv" |
| 35 | |
| 36 | PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\ |
| 37 | gnupg gpgme libgpg-error,\ |
| 38 | ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\ |
| 39 | " |
| 40 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" |
| 41 | PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" |
| 42 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" |
| 43 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" |
| 44 | PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv" |
| 45 | |
| 46 | EXTRA_OECONF += " --disable-pathfinder" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | EXTRA_OECONF:class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 48 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 49 | do_install:append () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | install -d ${D}${sysconfdir}/opkg |
| 51 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf |
| 52 | echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf |
| 53 | |
| 54 | # We need to create the lock directory |
| 55 | install -d ${D}${OPKGLIBDIR}/opkg |
| 56 | } |
| 57 | |
| 58 | do_install_ptest () { |
| 59 | sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile |
| 60 | sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile |
| 61 | } |
| 62 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | WARN_QA:append += "openssl-deprecation" |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 64 | QAPKGTEST[openssl-deprecation] = "package_qa_check_openssl_deprecation" |
| 65 | def package_qa_check_openssl_deprecation (package, d, messages): |
| 66 | sane = True |
| 67 | |
| 68 | pkgconfig = (d.getVar("PACKAGECONFIG") or "").split() |
| 69 | if pkgconfig and 'openssl' in pkgconfig: |
| 70 | package_qa_add_message(messages, 'openssl-deprecation', '"openssl" in opkg.bb PACKAGECONFIG. Feed signature checking with OpenSSL will be deprecated in the next opkg release. Consider using GPG checking instead.') |
| 71 | sane = False |
| 72 | |
| 73 | return sane |
| 74 | |
| 75 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" |
| 77 | RDEPENDS:${PN}:class-native = "" |
| 78 | RDEPENDS:${PN}:class-nativesdk = "" |
| 79 | RDEPENDS:${PN}-ptest += "make binutils python3-core python3-compression" |
| 80 | RREPLACES:${PN} = "opkg-nogpg opkg-collateral" |
| 81 | RCONFLICTS:${PN} = "opkg-collateral" |
| 82 | RPROVIDES:${PN} = "opkg-collateral" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 83 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 84 | FILES:libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 85 | |
| 86 | BBCLASSEXTEND = "native nativesdk" |
| 87 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 88 | CONFFILES:${PN} = "${sysconfdir}/opkg/opkg.conf" |