Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [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-configure.service \ |
| 16 | file://opkg.conf \ |
| 17 | file://0001-opkg_archive-add-support-for-empty-compressed-files.patch \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 18 | file://0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch \ |
| 19 | file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ |
| 20 | file://0001-string_util-New-file-with-bin_to_hex-function.patch \ |
| 21 | file://0002-md5-Add-md5_to_string-function.patch \ |
| 22 | file://0003-sha256-Add-sha256_to_string-function.patch \ |
| 23 | file://0004-opkg_download-Use-short-cache-file-name.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 24 | " |
| 25 | |
| 26 | SRC_URI[md5sum] = "3412cdc71d78b98facc84b19331ec64e" |
| 27 | SRC_URI[sha256sum] = "7f735d1cdb8ef3718fb0f9fba44ca0d9a5c90d3a7f014f37a6d2f9474f54988f" |
| 28 | |
| 29 | inherit autotools pkgconfig systemd |
| 30 | |
| 31 | SYSTEMD_SERVICE_${PN} = "opkg-configure.service" |
| 32 | |
| 33 | target_localstatedir := "${localstatedir}" |
| 34 | OPKGLIBDIR = "${target_localstatedir}/lib" |
| 35 | |
| 36 | PACKAGECONFIG ??= "" |
| 37 | |
| 38 | PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg" |
| 39 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" |
| 40 | PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" |
| 41 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" |
| 42 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" |
| 43 | PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder" |
| 44 | |
| 45 | do_install_append () { |
| 46 | install -d ${D}${sysconfdir}/opkg |
| 47 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf |
| 48 | echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf |
| 49 | |
| 50 | # We need to create the lock directory |
| 51 | install -d ${D}${OPKGLIBDIR}/opkg |
| 52 | |
| 53 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then |
| 54 | install -d ${D}${systemd_unitdir}/system |
| 55 | install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/ |
| 56 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ |
| 57 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ |
| 58 | -e 's,@BINDIR@,${bindir},g' \ |
| 59 | -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \ |
| 60 | ${D}${systemd_unitdir}/system/opkg-configure.service |
| 61 | fi |
| 62 | } |
| 63 | |
| 64 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive" |
| 65 | RDEPENDS_${PN}_class-native = "" |
| 66 | RDEPENDS_${PN}_class-nativesdk = "" |
| 67 | RREPLACES_${PN} = "opkg-nogpg opkg-collateral" |
| 68 | RCONFLICTS_${PN} = "opkg-collateral" |
| 69 | RPROVIDES_${PN} = "opkg-collateral" |
| 70 | |
| 71 | PACKAGES =+ "libopkg" |
| 72 | |
| 73 | FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" |
| 74 | FILES_${PN} += "${systemd_unitdir}/system/" |
| 75 | |
| 76 | BBCLASSEXTEND = "native nativesdk" |
| 77 | |
| 78 | CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf" |