blob: 4cd589cd29e4ec1a05b7a64a7b1d785128ed7cbf [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "Open Package Manager"
2SUMMARY:libopkg = "Open Package Manager library"
3SECTION = "base"
4HOMEPAGE = "http://code.google.com/p/opkg/"
5DESCRIPTION = "Opkg is a lightweight package management system based on Ipkg."
6BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00007LICENSE = "GPL-2.0-or-later"
Andrew Geissler595f6302022-01-24 19:11:47 +00008LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://src/opkg.c;beginline=4;endline=18;md5=d6200b0f2b41dee278aa5fad333eecae"
10
11DEPENDS = "libarchive"
12
13PE = "1"
14
15SRC_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 Geissler78b72792022-06-14 06:47:25 -050021SRC_URI[sha256sum] = "56844722eff237daf14aa6e681436f3245213c5590ed0cda37a79df637ff3a4c"
Andrew Geissler595f6302022-01-24 19:11:47 +000022
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"
26PACKAGES =+ "libopkg"
27
28inherit autotools pkgconfig ptest
29
30target_localstatedir := "${localstatedir}"
31OPKGLIBDIR ??= "${target_localstatedir}/lib"
32
33PACKAGECONFIG ??= "libsolv"
34
35PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
36 gnupg gpgme libgpg-error,\
37 ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
38 "
39PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
40PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
41PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050042PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd"
Andrew Geissler595f6302022-01-24 19:11:47 +000043PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
44
45EXTRA_OECONF:class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
46
47do_install:append () {
48 install -d ${D}${sysconfdir}/opkg
49 install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
50 echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
51
52 # We need to create the lock directory
53 install -d ${D}${OPKGLIBDIR}/opkg
54}
55
56do_install_ptest () {
57 sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile
58 sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
59}
60
61RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
62RDEPENDS:${PN}:class-native = ""
63RDEPENDS:${PN}:class-nativesdk = ""
64RDEPENDS:${PN}-ptest += "make binutils python3-core python3-compression"
65RREPLACES:${PN} = "opkg-nogpg opkg-collateral"
66RCONFLICTS:${PN} = "opkg-collateral"
67RPROVIDES:${PN} = "opkg-collateral"
68
69FILES:libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
70
71BBCLASSEXTEND = "native nativesdk"
72
73CONFFILES:${PN} = "${sysconfdir}/opkg/opkg.conf"