summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg_0.2.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg_0.2.4.bb')
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.4.bb77
1 files changed, 75 insertions, 2 deletions
diff --git a/meta/recipes-devtools/opkg/opkg_0.2.4.bb b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
index 0d08bf9e7e..be8394a361 100644
--- a/meta/recipes-devtools/opkg/opkg_0.2.4.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.2.4.bb
@@ -1,14 +1,87 @@
1require opkg.inc 1SUMMARY = "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-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba"
9
10PE = "1"
2 11
3SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ 12SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
4 file://no-install-recommends.patch \ 13 file://no-install-recommends.patch \
5 file://add-exclude.patch \ 14 file://add-exclude.patch \
6 file://opkg-configure.service \
7 file://libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch \ 15 file://libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch \
8 file://remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch \ 16 file://remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch \
17 file://opkg-configure.service \
9" 18"
10 19
11S = "${WORKDIR}/${BPN}-${PV}" 20S = "${WORKDIR}/${BPN}-${PV}"
12 21
13SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd" 22SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd"
14SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086" 23SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086"
24
25inherit autotools pkgconfig systemd
26
27python () {
28 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
29 pn = d.getVar('PN', True)
30 d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'opkg-configure.service')
31}
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
45EXTRA_OECONF = "\
46 --with-opkglibdir=${OPKGLIBDIR} \
47"
48
49# Werror gives all kinds bounds issuses with gcc 4.3.3
50do_configure_prepend() {
51 sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
52}
53
54do_install_append () {
55 # We need to create the lock directory
56 install -d ${D}${OPKGLIBDIR}/opkg
57
58 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
59 install -d ${D}${systemd_unitdir}/system
60 install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
61 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
62 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
63 -e 's,@BINDIR@,${bindir},g' \
64 -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
65 ${D}${systemd_unitdir}/system/opkg-configure.service
66 fi
67
68 # The installed binary is 'opkg-cl' but people and scripts often expect
69 # it to just be 'opkg'
70 ln -sf opkg-cl ${D}${bindir}/opkg
71
72 rm ${D}${bindir}/update-alternatives
73}
74
75RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts"
76RDEPENDS_${PN}_class-native = ""
77RDEPENDS_${PN}_class-nativesdk = ""
78RREPLACES_${PN} = "opkg-nogpg"
79
80PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg"
81
82FILES_libopkg-dev = "${libdir}/*.la ${libdir}/*.so ${includedir}/libopkg"
83FILES_libopkg-staticdev = "${libdir}/*.a"
84FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
85FILES_${PN} += "${systemd_unitdir}/system/"
86
87BBCLASSEXTEND = "native nativesdk"