Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [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/" |
| 5 | DESCRIPTION = "Opkg is a lightweight package management system based on Ipkg." |
| 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 | |
| 21 | SRC_URI[sha256sum] = "559c3e1b893abaa1dd473ce3a9a5f7dd3f60ceb6cd14caaef76ddf0f7721ad1c" |
| 22 | |
| 23 | # This needs to be before ptest inherit, otherwise all ptest files end packaged |
| 24 | # in libopkg package if OPKGLIBDIR == libdir, because default |
| 25 | # PTEST_PATH ?= "${libdir}/${BPN}/ptest" |
| 26 | PACKAGES =+ "libopkg" |
| 27 | |
| 28 | inherit autotools pkgconfig ptest |
| 29 | |
| 30 | target_localstatedir := "${localstatedir}" |
| 31 | OPKGLIBDIR ??= "${target_localstatedir}/lib" |
| 32 | |
| 33 | PACKAGECONFIG ??= "libsolv" |
| 34 | |
| 35 | PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\ |
| 36 | gnupg gpgme libgpg-error,\ |
| 37 | ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\ |
| 38 | " |
| 39 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" |
| 40 | PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" |
| 41 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" |
| 42 | PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv" |
| 43 | |
| 44 | EXTRA_OECONF:class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" |
| 45 | |
| 46 | do_install:append () { |
| 47 | install -d ${D}${sysconfdir}/opkg |
| 48 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf |
| 49 | echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf |
| 50 | |
| 51 | # We need to create the lock directory |
| 52 | install -d ${D}${OPKGLIBDIR}/opkg |
| 53 | } |
| 54 | |
| 55 | do_install_ptest () { |
| 56 | sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile |
| 57 | sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile |
| 58 | } |
| 59 | |
| 60 | RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" |
| 61 | RDEPENDS:${PN}:class-native = "" |
| 62 | RDEPENDS:${PN}:class-nativesdk = "" |
| 63 | RDEPENDS:${PN}-ptest += "make binutils python3-core python3-compression" |
| 64 | RREPLACES:${PN} = "opkg-nogpg opkg-collateral" |
| 65 | RCONFLICTS:${PN} = "opkg-collateral" |
| 66 | RPROVIDES:${PN} = "opkg-collateral" |
| 67 | |
| 68 | FILES:libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" |
| 69 | |
| 70 | BBCLASSEXTEND = "native nativesdk" |
| 71 | |
| 72 | CONFFILES:${PN} = "${sysconfdir}/opkg/opkg.conf" |