Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "Open Package Manager" |
| 2 | SUMMARY:libopkg = "Open Package Manager library" |
| 3 | SECTION = "base" |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 4 | HOMEPAGE = "https://git.yoctoproject.org/opkg/" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 5 | DESCRIPTION = "Opkg is a lightweight package management system based on Ipkg." |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 6 | BUGTRACKER = "https://bugzilla.yoctoproject.org/buglist.cgi?quicksearch=Product%3Aopkg" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 7 | LICENSE = "GPL-2.0-or-later" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ |
| 9 | file://src/opkg.c;beginline=4;endline=18;md5=d6200b0f2b41dee278aa5fad333eecae" |
| 10 | |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 11 | DEPENDS = "libarchive zstd" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 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 \ |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 18 | file://0001-libopkg-Use-libgen.h-to-provide-basename-API.patch \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 19 | file://run-ptest \ |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 20 | " |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 21 | |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 22 | SRC_URI[sha256sum] = "f3938e359646b406c40d5d442a1467c7e72357f91ab822e442697529641e06de" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [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[sha256] = "--enable-sha256,--disable-sha256" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 43 | PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv" |
| 44 | |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 45 | EXTRA_OECONF = "--enable-zstd" |
| 46 | EXTRA_OECONF:append:class-native = " --localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 47 | |
| 48 | do_install:append () { |
| 49 | install -d ${D}${sysconfdir}/opkg |
| 50 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf |
| 51 | echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf |
| 52 | echo "option info_dir ${OPKGLIBDIR}/opkg/info" >>${D}${sysconfdir}/opkg/opkg.conf |
| 53 | echo "option status_file ${OPKGLIBDIR}/opkg/status" >>${D}${sysconfdir}/opkg/opkg.conf |
| 54 | |
| 55 | # We need to create the lock directory |
| 56 | install -d ${D}${OPKGLIBDIR}/opkg |
| 57 | } |
| 58 | |
| 59 | do_install_ptest () { |
| 60 | sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile |
| 61 | sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile |
| 62 | } |
| 63 | |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 64 | WARN_QA:append = " internal-solver-deprecation" |
| 65 | QARECIPETEST[internal-solver-deprecation] = "qa_check_solver_deprecation" |
| 66 | def qa_check_solver_deprecation (pn, d, messages): |
| 67 | pkgconfig = (d.getVar("PACKAGECONFIG") or "").split() |
| 68 | |
| 69 | if "libsolv" not in pkgconfig: |
| 70 | oe.qa.handle_error("internal-solver-deprecation", "The opkg internal solver will be deprecated in future opkg releases. Consider enabling \"libsolv\" in PACKAGECONFIG.", d) |
| 71 | |
| 72 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 73 | RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" |
| 74 | RDEPENDS:${PN}:class-native = "" |
| 75 | RDEPENDS:${PN}:class-nativesdk = "" |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 76 | RDEPENDS:${PN}-ptest += "make binutils python3-core python3-compression bash python3-crypt python3-io" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 77 | RREPLACES:${PN} = "opkg-nogpg opkg-collateral" |
| 78 | RCONFLICTS:${PN} = "opkg-collateral" |
| 79 | RPROVIDES:${PN} = "opkg-collateral" |
| 80 | |
| 81 | FILES:libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" |
| 82 | |
| 83 | BBCLASSEXTEND = "native nativesdk" |
| 84 | |
| 85 | CONFFILES:${PN} = "${sysconfdir}/opkg/opkg.conf" |