blob: 548e81962d7fa527cff187e305bd4f6372d4c798 [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/"
5BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
8 file://src/opkg.c;beginline=4;endline=18;md5=d6200b0f2b41dee278aa5fad333eecae"
9
10DEPENDS = "libarchive"
11
12PE = "1"
13
14SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
15 file://opkg.conf \
16 file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060017 file://0001-tests-let-the-OS-negotiate-relative-package-dirs.patch \
18 file://sourcedateepoch.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050019 file://run-ptest \
20"
21
Andrew Geisslerd1e89492021-02-12 15:35:20 -060022SRC_URI[md5sum] = "345900c1d4747d58455867f9fe88ca43"
23SRC_URI[sha256sum] = "2217acc58b8eb31300631ebae75e222ebc700c9c1cf6408088705d19a472c839"
Andrew Geissler82c905d2020-04-13 13:39:40 -050024
25# This needs to be before ptest inherit, otherwise all ptest files end packaged
26# in libopkg package if OPKGLIBDIR == libdir, because default
27# PTEST_PATH ?= "${libdir}/${BPN}/ptest"
28PACKAGES =+ "libopkg"
29
30inherit autotools pkgconfig ptest
31
32target_localstatedir := "${localstatedir}"
33OPKGLIBDIR ??= "${target_localstatedir}/lib"
34
35PACKAGECONFIG ??= "libsolv"
36
37PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
38 gnupg gpgme libgpg-error,\
39 ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
40 "
41PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
42PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
43PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
44PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
45PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
46
47EXTRA_OECONF += " --disable-pathfinder"
48EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
49
50do_install_append () {
51 install -d ${D}${sysconfdir}/opkg
52 install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
53 echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
54
55 # We need to create the lock directory
56 install -d ${D}${OPKGLIBDIR}/opkg
57}
58
59do_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
64RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
65RDEPENDS_${PN}_class-native = ""
66RDEPENDS_${PN}_class-nativesdk = ""
67RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression"
68RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
69RCONFLICTS_${PN} = "opkg-collateral"
70RPROVIDES_${PN} = "opkg-collateral"
71
72FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
73
74BBCLASSEXTEND = "native nativesdk"
75
76CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"