summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg.inc')
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc76
1 files changed, 76 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
new file mode 100644
index 0000000..9f87df5
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -0,0 +1,76 @@
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"
11
12# Werror gives all kinds bounds issuses with gcc 4.3.3
13do_configure_prepend() {
14 sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
15}
16
17inherit autotools pkgconfig systemd
18
19python () {
20 if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
21 pn = d.getVar('PN', True)
22 d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'opkg-configure.service')
23}
24
25target_localstatedir := "${localstatedir}"
26OPKGLIBDIR = "${target_localstatedir}/lib"
27
28PACKAGECONFIG ??= ""
29
30PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error"
31PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
32PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
33PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
34PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
35PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
36
37EXTRA_OECONF = "\
38 --with-opkglibdir=${OPKGLIBDIR} \
39"
40
41RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base run-postinsts"
42RDEPENDS_${PN}_class-native = ""
43RDEPENDS_${PN}_class-nativesdk = ""
44RREPLACES_${PN} = "opkg-nogpg"
45
46PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg"
47
48FILES_libopkg-dev = "${libdir}/*.la ${libdir}/*.so ${includedir}/libopkg"
49FILES_libopkg-staticdev = "${libdir}/*.a"
50FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
51FILES_${PN} += "${systemd_unitdir}/system/"
52
53do_install_append() {
54 # We need to create the lock directory
55 install -d ${D}${OPKGLIBDIR}/opkg
56
57 if ${@base_contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
58 install -d ${D}${systemd_unitdir}/system
59 install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
60 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
61 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
62 -e 's,@BINDIR@,${bindir},g' \
63 -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
64 ${D}${systemd_unitdir}/system/opkg-configure.service
65 fi
66
67 # The installed binary is 'opkg-cl' but people and scripts often expect
68 # it to just be 'opkg'
69 ln -sf opkg-cl ${D}${bindir}/opkg
70}
71
72do_install_append() {
73 rm ${D}${bindir}/update-alternatives
74}
75
76BBCLASSEXTEND = "native nativesdk"