diff options
author | Paul Barker <paul@paulbarker.me.uk> | 2014-12-19 17:57:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-03 14:53:56 +0000 |
commit | 3d18626bf0bad0ef41629a38ba2b788fdf255a18 (patch) | |
tree | ef398314a133cc7349c1c5e6bf732d988dc9cd8e /meta/recipes-devtools | |
parent | d07c9addee2a97af3e8fb0985d2f0c00323e5d3f (diff) | |
download | poky-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.inc | 76 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_0.2.4.bb | 77 |
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 @@ | |||
1 | SUMMARY = "Open Package Manager" | ||
2 | SUMMARY_libopkg = "Open Package Manager library" | ||
3 | SECTION = "base" | ||
4 | HOMEPAGE = "http://code.google.com/p/opkg/" | ||
5 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" | ||
6 | LICENSE = "GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
8 | file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba" | ||
9 | |||
10 | PE = "1" | ||
11 | |||
12 | # Werror gives all kinds bounds issuses with gcc 4.3.3 | ||
13 | do_configure_prepend() { | ||
14 | sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am | ||
15 | } | ||
16 | |||
17 | inherit autotools pkgconfig systemd | ||
18 | |||
19 | python () { | ||
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 | |||
25 | target_localstatedir := "${localstatedir}" | ||
26 | OPKGLIBDIR = "${target_localstatedir}/lib" | ||
27 | |||
28 | PACKAGECONFIG ??= "" | ||
29 | |||
30 | PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg" | ||
31 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" | ||
32 | PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" | ||
33 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
34 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" | ||
35 | PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder" | ||
36 | |||
37 | EXTRA_OECONF = "\ | ||
38 | --with-opkglibdir=${OPKGLIBDIR} \ | ||
39 | " | ||
40 | |||
41 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts" | ||
42 | RDEPENDS_${PN}_class-native = "" | ||
43 | RDEPENDS_${PN}_class-nativesdk = "" | ||
44 | RREPLACES_${PN} = "opkg-nogpg" | ||
45 | |||
46 | PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg" | ||
47 | |||
48 | FILES_libopkg-dev = "${libdir}/*.la ${libdir}/*.so ${includedir}/libopkg" | ||
49 | FILES_libopkg-staticdev = "${libdir}/*.a" | ||
50 | FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" | ||
51 | FILES_${PN} += "${systemd_unitdir}/system/" | ||
52 | |||
53 | do_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 | |||
72 | do_install_append() { | ||
73 | rm ${D}${bindir}/update-alternatives | ||
74 | } | ||
75 | |||
76 | BBCLASSEXTEND = "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 @@ | |||
1 | require opkg.inc | 1 | SUMMARY = "Open Package Manager" |
2 | SUMMARY_libopkg = "Open Package Manager library" | ||
3 | SECTION = "base" | ||
4 | HOMEPAGE = "http://code.google.com/p/opkg/" | ||
5 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" | ||
6 | LICENSE = "GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
8 | file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba" | ||
9 | |||
10 | PE = "1" | ||
2 | 11 | ||
3 | SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ | 12 | SRC_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 | ||
11 | S = "${WORKDIR}/${BPN}-${PV}" | 20 | S = "${WORKDIR}/${BPN}-${PV}" |
12 | 21 | ||
13 | SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd" | 22 | SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd" |
14 | SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086" | 23 | SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086" |
24 | |||
25 | inherit autotools pkgconfig systemd | ||
26 | |||
27 | python () { | ||
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 | |||
33 | target_localstatedir := "${localstatedir}" | ||
34 | OPKGLIBDIR = "${target_localstatedir}/lib" | ||
35 | |||
36 | PACKAGECONFIG ??= "" | ||
37 | |||
38 | PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg" | ||
39 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" | ||
40 | PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" | ||
41 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" | ||
42 | PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256" | ||
43 | PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder" | ||
44 | |||
45 | EXTRA_OECONF = "\ | ||
46 | --with-opkglibdir=${OPKGLIBDIR} \ | ||
47 | " | ||
48 | |||
49 | # Werror gives all kinds bounds issuses with gcc 4.3.3 | ||
50 | do_configure_prepend() { | ||
51 | sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am | ||
52 | } | ||
53 | |||
54 | do_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 | |||
75 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts" | ||
76 | RDEPENDS_${PN}_class-native = "" | ||
77 | RDEPENDS_${PN}_class-nativesdk = "" | ||
78 | RREPLACES_${PN} = "opkg-nogpg" | ||
79 | |||
80 | PACKAGES =+ "libopkg-dev libopkg-staticdev libopkg" | ||
81 | |||
82 | FILES_libopkg-dev = "${libdir}/*.la ${libdir}/*.so ${includedir}/libopkg" | ||
83 | FILES_libopkg-staticdev = "${libdir}/*.a" | ||
84 | FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/" | ||
85 | FILES_${PN} += "${systemd_unitdir}/system/" | ||
86 | |||
87 | BBCLASSEXTEND = "native nativesdk" | ||