diff options
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg_svn.bb')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_svn.bb | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb new file mode 100644 index 0000000000..518c767354 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg_svn.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | require opkg.inc | ||
2 | |||
3 | PROVIDES += "virtual/update-alternatives" | ||
4 | RPROVIDES_update-alternatives-cworth += "update-alternatives" | ||
5 | RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg" | ||
6 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base" | ||
7 | RDEPENDS_${PN}_virtclass-native = "" | ||
8 | RDEPENDS_${PN}_virtclass-nativesdk = "" | ||
9 | PACKAGE_ARCH_update-alternatives-cworth = "all" | ||
10 | |||
11 | SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \ | ||
12 | file://opkg_unarchive.patch \ | ||
13 | file://add_vercmp.patch \ | ||
14 | file://headerfix.patch \ | ||
15 | file://logfix.patch" | ||
16 | |||
17 | S = "${WORKDIR}/trunk" | ||
18 | |||
19 | PV = "0.0+svnr${SRCREV}" | ||
20 | PR = "r15" | ||
21 | |||
22 | PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth" | ||
23 | |||
24 | FILES_update-alternatives-cworth = "${bindir}/update-alternatives" | ||
25 | FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so" | ||
26 | FILES_libopkg = "${libdir}/*.so.* ${localstatedir}/lib/opkg/" | ||
27 | |||
28 | # We need to create the lock directory | ||
29 | do_install_append() { | ||
30 | install -d ${D}${localstatedir}/lib/opkg | ||
31 | } | ||
32 | |||
33 | # Define a variable to allow distros to run configure earlier. | ||
34 | # (for example, to enable loading of ethernet kernel modules before networking starts) | ||
35 | OPKG_INIT_POSITION = "98" | ||
36 | OPKG_INIT_POSITION_slugos = "41" | ||
37 | |||
38 | pkg_postinst_${PN} () { | ||
39 | #!/bin/sh | ||
40 | if [ "x$D" != "x" ]; then | ||
41 | install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d | ||
42 | # this happens at S98 where our good 'ole packages script used to run | ||
43 | echo "#!/bin/sh | ||
44 | opkg-cl configure | ||
45 | rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure | ||
46 | " > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure | ||
47 | chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure | ||
48 | fi | ||
49 | |||
50 | update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100 | ||
51 | } | ||
52 | |||
53 | pkg_postrm_${PN} () { | ||
54 | #!/bin/sh | ||
55 | update-alternatives --remove opkg ${bindir}/opkg-cl | ||
56 | } | ||
57 | |||