diff options
Diffstat (limited to 'meta/packages')
-rw-r--r-- | meta/packages/opkg/opkg-0.1.8/add_vercmp.patch | 34 | ||||
-rw-r--r-- | meta/packages/opkg/opkg-0.1.8/headerfix.patch | 17 | ||||
-rw-r--r-- | meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch | 17 | ||||
-rw-r--r-- | meta/packages/opkg/opkg-nogpg_0.1.8.bb | 8 | ||||
-rw-r--r-- | meta/packages/opkg/opkg.inc | 18 | ||||
-rw-r--r-- | meta/packages/opkg/opkg_0.1.8.bb | 53 | ||||
-rw-r--r-- | meta/packages/opkg/opkg_svn.bb | 11 |
7 files changed, 146 insertions, 12 deletions
diff --git a/meta/packages/opkg/opkg-0.1.8/add_vercmp.patch b/meta/packages/opkg/opkg-0.1.8/add_vercmp.patch new file mode 100644 index 000000000..540be8395 --- /dev/null +++ b/meta/packages/opkg/opkg-0.1.8/add_vercmp.patch @@ -0,0 +1,34 @@ +Index: trunk/libopkg/opkg.c +=================================================================== +--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000 ++++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000 +@@ -876,3 +876,18 @@ + + return ret; + } ++ ++int ++opkg_compare_versions (const char *ver1, const char *ver2) ++{ ++ pkg_t *pkg1, *pkg2; ++ ++ pkg1 = pkg_new(); ++ pkg2 = pkg_new(); ++ ++ parse_version(pkg1, ver1); ++ parse_version(pkg2, ver2); ++ ++ return pkg_compare_versions(pkg1, pkg2); ++} ++ +Index: trunk/libopkg/opkg.h +=================================================================== +--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000 ++++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000 +@@ -58,4 +58,6 @@ + + int opkg_repository_accessibility_check(void); + ++int opkg_compare_versions (const char *ver1, const char *ver2); ++ + #endif /* OPKG_H */ diff --git a/meta/packages/opkg/opkg-0.1.8/headerfix.patch b/meta/packages/opkg/opkg-0.1.8/headerfix.patch new file mode 100644 index 000000000..d0711ecd0 --- /dev/null +++ b/meta/packages/opkg/opkg-0.1.8/headerfix.patch @@ -0,0 +1,17 @@ +Without this, the FILE reference in this header can cause compile issues. + +RP - 29/1/10 + +Index: trunk/libopkg/pkg_dest.h +=================================================================== +--- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000 ++++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000 +@@ -18,6 +18,8 @@ + #ifndef PKG_DEST_H + #define PKG_DEST_H + ++#include <stdio.h> ++ + typedef struct pkg_dest pkg_dest_t; + struct pkg_dest + { diff --git a/meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch b/meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch new file mode 100644 index 000000000..4b1244815 --- /dev/null +++ b/meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch @@ -0,0 +1,17 @@ +Rebase for the latest version +Dongxiao Xu <dongxiao.xu@intel.com> + +diff -ruN opkg-0.1.8-orig/libbb/unarchive.c opkg-0.1.8/libbb/unarchive.c +--- opkg-0.1.8-orig/libbb/unarchive.c 2010-07-20 09:39:02.266424893 +0800 ++++ opkg-0.1.8/libbb/unarchive.c 2010-07-20 09:39:50.474435569 +0800 +@@ -523,6 +523,10 @@ + } + } + ++ if (strlen(tar_entry->name) > 100) { ++ tar_entry->name[100] = 0; ++ } ++ + // tar_entry->name = xstrdup(tar.formated.name); + + /* diff --git a/meta/packages/opkg/opkg-nogpg_0.1.8.bb b/meta/packages/opkg/opkg-nogpg_0.1.8.bb new file mode 100644 index 000000000..259a60ebc --- /dev/null +++ b/meta/packages/opkg/opkg-nogpg_0.1.8.bb @@ -0,0 +1,8 @@ +require opkg_${PV}.bb + +DEPENDS = "curl" +PROVIDES += "opkg" + +EXTRA_OECONF += "--disable-gpg" + +DEFAULT_PREFERENCE = "-1" diff --git a/meta/packages/opkg/opkg.inc b/meta/packages/opkg/opkg.inc index 84ce74c93..a602a6ff8 100644 --- a/meta/packages/opkg/opkg.inc +++ b/meta/packages/opkg/opkg.inc @@ -2,26 +2,22 @@ DESCRIPTION = "Open Package Manager" DESCRIPTION_libopkg = "Open Package Manager Library" DESCRIPTION_update-alternatives-cworth = "Update alternatives" SECTION = "base" -LICENSE = "GPL" +HOMEPAGE = "http://code.google.com/p/opkg/" +BUGTRACKER = "http://code.google.com/p/opkg/issues/list" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba" DEPENDS = "curl gpgme openssl" DEPENDS_virtclass-native = "curl-native" DEPENDS_virtclass-nativesdk = "curl-nativesdk" -PV = "0.0+svnr${SRCREV}" -PE = "1" - -SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \ - file://opkg_unarchive.patch;patch=1;maxrev=201 \ - file://add_vercmp.patch;patch=1 \ - file://headerfix.patch;patch=1 \ - file://logfix.patch;patch=1 " -S = "${WORKDIR}/trunk" +PE = "1" FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg" # Werror gives all kinds bounds issuses with gcc 4.3.3 do_configure_prepend() { - sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am + sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am } inherit autotools pkgconfig diff --git a/meta/packages/opkg/opkg_0.1.8.bb b/meta/packages/opkg/opkg_0.1.8.bb new file mode 100644 index 000000000..dcd6fb62e --- /dev/null +++ b/meta/packages/opkg/opkg_0.1.8.bb @@ -0,0 +1,53 @@ +require opkg.inc + +PROVIDES += "virtual/update-alternatives" +RPROVIDES_update-alternatives-cworth += "update-alternatives" +RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg" +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base" +RDEPENDS_${PN}_virtclass-native = "" +RDEPENDS_${PN}_virtclass-nativesdk = "" +PACKAGE_ARCH_update-alternatives-cworth = "all" + +SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \ + file://opkg_unarchive.patch \ + file://add_vercmp.patch \ + file://headerfix.patch" + +PR = "r0" + +PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth" + +FILES_update-alternatives-cworth = "${bindir}/update-alternatives" +FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so" +FILES_libopkg = "${libdir}/*.so.* ${libdir}/opkg/" + +# We need to create the lock directory +do_install_append() { + install -d ${D}${libdir}/opkg +} + +# Define a variable to allow distros to run configure earlier. +# (for example, to enable loading of ethernet kernel modules before networking starts) +OPKG_INIT_POSITION = "98" +OPKG_INIT_POSITION_slugos = "41" + +pkg_postinst_${PN} () { +#!/bin/sh +if [ "x$D" != "x" ]; then + install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d + # this happens at S98 where our good 'ole packages script used to run + echo "#!/bin/sh +opkg-cl configure +rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure +" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure + chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure +fi + +update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100 +} + +pkg_postrm_${PN} () { +#!/bin/sh +update-alternatives --remove opkg ${bindir}/opkg-cl +} + diff --git a/meta/packages/opkg/opkg_svn.bb b/meta/packages/opkg/opkg_svn.bb index c3192bea5..73bde7766 100644 --- a/meta/packages/opkg/opkg_svn.bb +++ b/meta/packages/opkg/opkg_svn.bb @@ -8,6 +8,15 @@ RDEPENDS_${PN}_virtclass-native = "" RDEPENDS_${PN}_virtclass-nativesdk = "" PACKAGE_ARCH_update-alternatives-cworth = "all" +SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \ + file://opkg_unarchive.patch \ + file://add_vercmp.patch \ + file://headerfix.patch \ + file://logfix.patch" + +S = "${WORKDIR}/trunk" + +PV = "0.0+svnr${SRCREV}" PR = "r13" PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth" @@ -18,7 +27,7 @@ FILES_libopkg = "${libdir}/*.so.* ${libdir}/opkg/" # We need to create the lock directory do_install_append() { - install -d ${D}${libdir}/opkg + install -d ${D}${libdir}/opkg } # Define a variable to allow distros to run configure earlier. |