blob: f4dbb2dd4d0939dfe979a54cb2727690bfa853a0 [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 \
18"
19
20SRC_URI[md5sum] = "3412cdc71d78b98facc84b19331ec64e"
21SRC_URI[sha256sum] = "7f735d1cdb8ef3718fb0f9fba44ca0d9a5c90d3a7f014f37a6d2f9474f54988f"
22
23inherit autotools pkgconfig systemd
24
25SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
26
27target_localstatedir := "${localstatedir}"
28OPKGLIBDIR = "${target_localstatedir}/lib"
29
30PACKAGECONFIG ??= ""
31
32PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
33PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
34PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
35PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
36PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
37PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
38
39do_install_append () {
40 install -d ${D}${sysconfdir}/opkg
41 install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
42 echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
43
44 # We need to create the lock directory
45 install -d ${D}${OPKGLIBDIR}/opkg
46
47 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
48 install -d ${D}${systemd_unitdir}/system
49 install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
50 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
51 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
52 -e 's,@BINDIR@,${bindir},g' \
53 -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
54 ${D}${systemd_unitdir}/system/opkg-configure.service
55 fi
56}
57
58RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive"
59RDEPENDS_${PN}_class-native = ""
60RDEPENDS_${PN}_class-nativesdk = ""
61RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
62RCONFLICTS_${PN} = "opkg-collateral"
63RPROVIDES_${PN} = "opkg-collateral"
64
65PACKAGES =+ "libopkg"
66
67FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
68FILES_${PN} += "${systemd_unitdir}/system/"
69
70BBCLASSEXTEND = "native nativesdk"
71
72CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"