blob: 9eca61be2aa581ecdb1bb38a6af858899c31203e [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Open Package Manager"
2SUMMARY_libopkg = "Open Package Manager library"
3SECTION = "base"
4HOMEPAGE = "http://code.google.com/p/opkg/"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06005DESCRIPTION = "Opkg is a lightweight package management system based on Ipkg."
Andrew Geissler82c905d2020-04-13 13:39:40 -05006BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
7LICENSE = "GPLv2+"
8LIC_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 \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060018 file://0001-tests-let-the-OS-negotiate-relative-package-dirs.patch \
19 file://sourcedateepoch.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050020 file://run-ptest \
21"
22
Andrew Geisslerd1e89492021-02-12 15:35:20 -060023SRC_URI[md5sum] = "345900c1d4747d58455867f9fe88ca43"
24SRC_URI[sha256sum] = "2217acc58b8eb31300631ebae75e222ebc700c9c1cf6408088705d19a472c839"
Andrew Geissler82c905d2020-04-13 13:39:40 -050025
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"
29PACKAGES =+ "libopkg"
30
31inherit autotools pkgconfig ptest
32
33target_localstatedir := "${localstatedir}"
34OPKGLIBDIR ??= "${target_localstatedir}/lib"
35
36PACKAGECONFIG ??= "libsolv"
37
38PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
39 gnupg gpgme libgpg-error,\
40 ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
41 "
42PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
43PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
44PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
45PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
46PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
47
48EXTRA_OECONF += " --disable-pathfinder"
49EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
50
51do_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
60do_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
65RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
66RDEPENDS_${PN}_class-native = ""
67RDEPENDS_${PN}_class-nativesdk = ""
68RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression"
69RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
70RCONFLICTS_${PN} = "opkg-collateral"
71RPROVIDES_${PN} = "opkg-collateral"
72
73FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
74
75BBCLASSEXTEND = "native nativesdk"
76
77CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"