blob: 5ad3e92cffeeaed300fbbcdb8e6a258e96c5ce91 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -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=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
9
10DEPENDS = "libarchive"
11
12PE = "1"
13
14SRC_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 Williamsf1e5d692016-03-30 15:21:19 -050018 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 Williamsc124f4f2015-09-15 14:41:29 -050024"
25
26SRC_URI[md5sum] = "3412cdc71d78b98facc84b19331ec64e"
27SRC_URI[sha256sum] = "7f735d1cdb8ef3718fb0f9fba44ca0d9a5c90d3a7f014f37a6d2f9474f54988f"
28
29inherit autotools pkgconfig systemd
30
31SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
32
33target_localstatedir := "${localstatedir}"
34OPKGLIBDIR = "${target_localstatedir}/lib"
35
36PACKAGECONFIG ??= ""
37
38PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
39PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
40PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
41PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
42PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
43PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
44
45do_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
64RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive"
65RDEPENDS_${PN}_class-native = ""
66RDEPENDS_${PN}_class-nativesdk = ""
67RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
68RCONFLICTS_${PN} = "opkg-collateral"
69RPROVIDES_${PN} = "opkg-collateral"
70
71PACKAGES =+ "libopkg"
72
73FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
74FILES_${PN} += "${systemd_unitdir}/system/"
75
76BBCLASSEXTEND = "native nativesdk"
77
78CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"