Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [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 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" |
| 6 | LICENSE = "GPLv2+" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ |
| 8 | file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0" |
| 9 | |
| 10 | DEPENDS = "libarchive" |
| 11 | |
| 12 | PE = "1" |
| 13 | |
| 14 | SRC_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 \ |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 17 | file://opkg_archive.patch \ |
| 18 | file://open_inner.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 19 | file://run-ptest \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 20 | " |
| 21 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 22 | SRC_URI[md5sum] = "ba0c21305fc93b26e844981ef100dc85" |
| 23 | SRC_URI[sha256sum] = "45ac1e037d3877f635d883f8a555e172883a25d3eeb7986c75890fdd31250a43" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 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" |
| 28 | PACKAGES =+ "libopkg" |
| 29 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 30 | inherit autotools pkgconfig ptest |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 31 | |
| 32 | target_localstatedir := "${localstatedir}" |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 33 | OPKGLIBDIR ??= "${target_localstatedir}/lib" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 34 | |
| 35 | PACKAGECONFIG ??= "libsolv" |
| 36 | |
Brad Bishop | 1d80a2e | 2019-11-15 16:35:03 -0500 | [diff] [blame] | 37 | PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\ |
| 38 | gnupg gpgme libgpg-error,\ |
| 39 | ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\ |
| 40 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 41 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" |
| 42 | PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" |
| 43 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" |
| 44 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 45 | PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv" |
| 46 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 47 | EXTRA_OECONF += " --disable-pathfinder" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 48 | EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}" |
| 49 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 50 | # Release tarball has unused binaries on the tests folder, automatically created by automake. |
| 51 | # For now, delete them to avoid packaging errors (wrong architecture) |
| 52 | do_unpack_append () { |
| 53 | bb.build.exec_func('remove_test_binaries', d) |
| 54 | } |
| 55 | |
| 56 | remove_test_binaries () { |
| 57 | rm ${WORKDIR}/opkg-${PV}/tests/libopkg_test* |
| 58 | } |
| 59 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 60 | do_install_append () { |
| 61 | install -d ${D}${sysconfdir}/opkg |
| 62 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf |
| 63 | echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf |
| 64 | |
| 65 | # We need to create the lock directory |
| 66 | install -d ${D}${OPKGLIBDIR}/opkg |
| 67 | } |
| 68 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 69 | do_install_ptest () { |
| 70 | sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile |
| 71 | sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile |
| 72 | } |
| 73 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 74 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" |
| 75 | RDEPENDS_${PN}_class-native = "" |
| 76 | RDEPENDS_${PN}_class-nativesdk = "" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 77 | RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 78 | RREPLACES_${PN} = "opkg-nogpg opkg-collateral" |
| 79 | RCONFLICTS_${PN} = "opkg-collateral" |
| 80 | RPROVIDES_${PN} = "opkg-collateral" |
| 81 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 82 | FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" |
| 83 | |
| 84 | BBCLASSEXTEND = "native nativesdk" |
| 85 | |
| 86 | CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf" |