summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorPaul Barker <paul@paulbarker.me.uk>2014-12-19 17:57:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-03 14:53:56 +0000
commit3d18626bf0bad0ef41629a38ba2b788fdf255a18 (patch)
treeef398314a133cc7349c1c5e6bf732d988dc9cd8e /meta/recipes-devtools
parentd07c9addee2a97af3e8fb0985d2f0c00323e5d3f (diff)
downloadpoky-3d18626bf0bad0ef41629a38ba2b788fdf255a18.tar.gz
opkg: Merge opkg.inc into recipe and tidy up
There is no benefit to having a separate .inc file when we only support one version of opkg. The .inc file had multiple do_install_append functions and several variables were defined out of the usual order. This arrangement should be better. (From OE-Core rev: ab3cc175649dbea6f434bb0f6ee1346f5f0e701a) Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc76
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.2.4.bb77
2 files changed, 75 insertions, 78 deletions
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
deleted file mode 100644
index 991c114fd4..0000000000
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ /dev/null
@@ -1,76 +0,0 @@
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 bb.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,gnupg"
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-arch-config 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 ${@bb.utils.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"
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"