diff options
Diffstat (limited to 'meta/recipes-devtools/opkg')
17 files changed, 380 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg-0.1.8/add_vercmp.patch b/meta/recipes-devtools/opkg/opkg-0.1.8/add_vercmp.patch new file mode 100644 index 0000000000..540be83950 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-0.1.8/add_vercmp.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | Index: trunk/libopkg/opkg.c | ||
| 2 | =================================================================== | ||
| 3 | --- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000 | ||
| 4 | +++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000 | ||
| 5 | @@ -876,3 +876,18 @@ | ||
| 6 | |||
| 7 | return ret; | ||
| 8 | } | ||
| 9 | + | ||
| 10 | +int | ||
| 11 | +opkg_compare_versions (const char *ver1, const char *ver2) | ||
| 12 | +{ | ||
| 13 | + pkg_t *pkg1, *pkg2; | ||
| 14 | + | ||
| 15 | + pkg1 = pkg_new(); | ||
| 16 | + pkg2 = pkg_new(); | ||
| 17 | + | ||
| 18 | + parse_version(pkg1, ver1); | ||
| 19 | + parse_version(pkg2, ver2); | ||
| 20 | + | ||
| 21 | + return pkg_compare_versions(pkg1, pkg2); | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | Index: trunk/libopkg/opkg.h | ||
| 25 | =================================================================== | ||
| 26 | --- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000 | ||
| 27 | +++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000 | ||
| 28 | @@ -58,4 +58,6 @@ | ||
| 29 | |||
| 30 | int opkg_repository_accessibility_check(void); | ||
| 31 | |||
| 32 | +int opkg_compare_versions (const char *ver1, const char *ver2); | ||
| 33 | + | ||
| 34 | #endif /* OPKG_H */ | ||
diff --git a/meta/recipes-devtools/opkg/opkg-0.1.8/headerfix.patch b/meta/recipes-devtools/opkg/opkg-0.1.8/headerfix.patch new file mode 100644 index 0000000000..d0711ecd0e --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-0.1.8/headerfix.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Without this, the FILE reference in this header can cause compile issues. | ||
| 2 | |||
| 3 | RP - 29/1/10 | ||
| 4 | |||
| 5 | Index: trunk/libopkg/pkg_dest.h | ||
| 6 | =================================================================== | ||
| 7 | --- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000 | ||
| 8 | +++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000 | ||
| 9 | @@ -18,6 +18,8 @@ | ||
| 10 | #ifndef PKG_DEST_H | ||
| 11 | #define PKG_DEST_H | ||
| 12 | |||
| 13 | +#include <stdio.h> | ||
| 14 | + | ||
| 15 | typedef struct pkg_dest pkg_dest_t; | ||
| 16 | struct pkg_dest | ||
| 17 | { | ||
diff --git a/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch b/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch new file mode 100644 index 0000000000..4b12448155 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-0.1.8/opkg_unarchive.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Rebase for the latest version | ||
| 2 | Dongxiao Xu <dongxiao.xu@intel.com> | ||
| 3 | |||
| 4 | diff -ruN opkg-0.1.8-orig/libbb/unarchive.c opkg-0.1.8/libbb/unarchive.c | ||
| 5 | --- opkg-0.1.8-orig/libbb/unarchive.c 2010-07-20 09:39:02.266424893 +0800 | ||
| 6 | +++ opkg-0.1.8/libbb/unarchive.c 2010-07-20 09:39:50.474435569 +0800 | ||
| 7 | @@ -523,6 +523,10 @@ | ||
| 8 | } | ||
| 9 | } | ||
| 10 | |||
| 11 | + if (strlen(tar_entry->name) > 100) { | ||
| 12 | + tar_entry->name[100] = 0; | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | // tar_entry->name = xstrdup(tar.formated.name); | ||
| 16 | |||
| 17 | /* | ||
diff --git a/meta/recipes-devtools/opkg/opkg-collateral.bb b/meta/recipes-devtools/opkg/opkg-collateral.bb new file mode 100644 index 0000000000..79c741d7be --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-collateral.bb | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | DESCRIPTION = "opkg configuration files" | ||
| 2 | SECTION = "base" | ||
| 3 | LICENSE = "MIT" | ||
| 4 | |||
| 5 | SRC_URI = "file://opkg.conf.comments \ | ||
| 6 | file://lists \ | ||
| 7 | file://dest \ | ||
| 8 | file://src " | ||
| 9 | |||
| 10 | do_compile () { | ||
| 11 | cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf | ||
| 12 | cat ${WORKDIR}/src >>${WORKDIR}/opkg.conf | ||
| 13 | cat ${WORKDIR}/dest >>${WORKDIR}/opkg.conf | ||
| 14 | cat ${WORKDIR}/lists >>${WORKDIR}/opkg.conf | ||
| 15 | } | ||
| 16 | |||
| 17 | do_install () { | ||
| 18 | install -d ${D}${sysconfdir}/ | ||
| 19 | install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg.conf | ||
| 20 | } | ||
| 21 | |||
| 22 | CONFFILES_${PN} = "${sysconfdir}/opkg.conf" | ||
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/dest b/meta/recipes-devtools/opkg/opkg-collateral/dest new file mode 100644 index 0000000000..088ca403da --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-collateral/dest | |||
| @@ -0,0 +1 @@ | |||
| dest root / | |||
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/lists b/meta/recipes-devtools/opkg/opkg-collateral/lists new file mode 100644 index 0000000000..3c524f8c77 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-collateral/lists | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | lists_dir ext /var/lib/ipkg | ||
| 2 | |||
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments b/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments new file mode 100644 index 0000000000..51623f4d53 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-collateral/opkg.conf.comments | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # Must have one or more source entries of the form: | ||
| 2 | # | ||
| 3 | # src <src-name> <source-url> | ||
| 4 | # | ||
| 5 | # and one or more destination entries of the form: | ||
| 6 | # | ||
| 7 | # dest <dest-name> <target-path> | ||
| 8 | # | ||
| 9 | # where <src-name> and <dest-names> are identifiers that | ||
| 10 | # should match [a-zA-Z0-9._-]+, <source-url> should be a | ||
| 11 | # URL that points to a directory containing a Familiar | ||
| 12 | # Packages file, and <target-path> should be a directory | ||
| 13 | # that exists on the target system. | ||
| 14 | |||
| 15 | # Proxy Support | ||
| 16 | #option http_proxy http://proxy.tld:3128 | ||
| 17 | #option ftp_proxy http://proxy.tld:3128 | ||
| 18 | #option proxy_username <username> | ||
| 19 | #option proxy_password <password> | ||
| 20 | |||
| 21 | # Offline mode (for use in constructing flash images offline) | ||
| 22 | #option offline_root target | ||
| 23 | |||
diff --git a/meta/recipes-devtools/opkg/opkg-collateral/src b/meta/recipes-devtools/opkg/opkg-collateral/src new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-collateral/src | |||
diff --git a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb new file mode 100644 index 0000000000..9e27e9343f --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | DESCRIPTION = "Base configuration files for opkg" | ||
| 2 | LICENSE = "MIT" | ||
| 3 | |||
| 4 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 5 | |||
| 6 | do_compile() { | ||
| 7 | mkdir -p ${S}/${sysconfdir}/opkg/ | ||
| 8 | |||
| 9 | archconf=${S}/${sysconfdir}/opkg/arch.conf | ||
| 10 | |||
| 11 | rm -f $archconf | ||
| 12 | ipkgarchs="${PACKAGE_ARCHS}" | ||
| 13 | priority=1 | ||
| 14 | for arch in $ipkgarchs; do | ||
| 15 | echo "arch $arch $priority" >> $archconf | ||
| 16 | priority=$(expr $priority + 5) | ||
| 17 | done | ||
| 18 | } | ||
| 19 | |||
| 20 | |||
| 21 | do_install () { | ||
| 22 | install -d ${D}${sysconfdir}/opkg | ||
| 23 | install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/ | ||
| 24 | } | ||
| 25 | |||
| 26 | FILES_${PN} = "${sysconfdir}/opkg/ " | ||
| 27 | |||
| 28 | CONFFILES_${PN} += "${sysconfdir}/opkg/arch.conf" | ||
| 29 | |||
diff --git a/meta/recipes-devtools/opkg/opkg-nogpg_0.1.8.bb b/meta/recipes-devtools/opkg/opkg-nogpg_0.1.8.bb new file mode 100644 index 0000000000..259a60ebc9 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-nogpg_0.1.8.bb | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | require opkg_${PV}.bb | ||
| 2 | |||
| 3 | DEPENDS = "curl" | ||
| 4 | PROVIDES += "opkg" | ||
| 5 | |||
| 6 | EXTRA_OECONF += "--disable-gpg" | ||
| 7 | |||
| 8 | DEFAULT_PREFERENCE = "-1" | ||
diff --git a/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb b/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb new file mode 100644 index 0000000000..aa16b551fe --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg-nogpg_svn.bb | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | require opkg_svn.bb | ||
| 2 | |||
| 3 | DEPENDS = "curl" | ||
| 4 | PROVIDES += "opkg" | ||
| 5 | |||
| 6 | SRCREV = "${SRCREV_pn-opkg}" | ||
| 7 | |||
| 8 | EXTRA_OECONF += "--disable-gpg" | ||
| 9 | |||
| 10 | DEFAULT_PREFERENCE = "-1" | ||
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc new file mode 100644 index 0000000000..add1563c47 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg.inc | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | DESCRIPTION = "Open Package Manager" | ||
| 2 | DESCRIPTION_libopkg = "Open Package Manager Library" | ||
| 3 | DESCRIPTION_update-alternatives-cworth = "Update alternatives" | ||
| 4 | SECTION = "base" | ||
| 5 | HOMEPAGE = "http://code.google.com/p/opkg/" | ||
| 6 | BUGTRACKER = "http://code.google.com/p/opkg/issues/list" | ||
| 7 | LICENSE = "GPLv2+" | ||
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
| 9 | file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba" | ||
| 10 | DEPENDS = "curl gpgme openssl" | ||
| 11 | DEPENDS_virtclass-native = "curl-native" | ||
| 12 | DEPENDS_virtclass-nativesdk = "curl-nativesdk" | ||
| 13 | |||
| 14 | PE = "1" | ||
| 15 | |||
| 16 | FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg" | ||
| 17 | |||
| 18 | # Werror gives all kinds bounds issuses with gcc 4.3.3 | ||
| 19 | do_configure_prepend() { | ||
| 20 | sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am | ||
| 21 | } | ||
| 22 | |||
| 23 | inherit autotools pkgconfig | ||
| 24 | |||
| 25 | target_localstatedir := "${localstatedir}" | ||
| 26 | EXTRA_OECONF = "--with-opkglibdir=${localstatedir}/lib" | ||
| 27 | EXTRA_OECONF_virtclass-native = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl" | ||
| 28 | EXTRA_OECONF_virtclass-nativesdk = "--with-opkglibdir=${target_localstatedir}/lib --disable-gpg --disable-curl --disable-openssl" | ||
| 29 | |||
| 30 | #PROVIDES_append_virtclass-native = "virtual/update-alternatives-native" | ||
| 31 | #RPROVIDES_${PN} += "update-alternatives-native" | ||
| 32 | |||
| 33 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-devtools/opkg/opkg/add_vercmp.patch b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch new file mode 100644 index 0000000000..540be83950 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg/add_vercmp.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | Index: trunk/libopkg/opkg.c | ||
| 2 | =================================================================== | ||
| 3 | --- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000 | ||
| 4 | +++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000 | ||
| 5 | @@ -876,3 +876,18 @@ | ||
| 6 | |||
| 7 | return ret; | ||
| 8 | } | ||
| 9 | + | ||
| 10 | +int | ||
| 11 | +opkg_compare_versions (const char *ver1, const char *ver2) | ||
| 12 | +{ | ||
| 13 | + pkg_t *pkg1, *pkg2; | ||
| 14 | + | ||
| 15 | + pkg1 = pkg_new(); | ||
| 16 | + pkg2 = pkg_new(); | ||
| 17 | + | ||
| 18 | + parse_version(pkg1, ver1); | ||
| 19 | + parse_version(pkg2, ver2); | ||
| 20 | + | ||
| 21 | + return pkg_compare_versions(pkg1, pkg2); | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | Index: trunk/libopkg/opkg.h | ||
| 25 | =================================================================== | ||
| 26 | --- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000 | ||
| 27 | +++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000 | ||
| 28 | @@ -58,4 +58,6 @@ | ||
| 29 | |||
| 30 | int opkg_repository_accessibility_check(void); | ||
| 31 | |||
| 32 | +int opkg_compare_versions (const char *ver1, const char *ver2); | ||
| 33 | + | ||
| 34 | #endif /* OPKG_H */ | ||
diff --git a/meta/recipes-devtools/opkg/opkg/headerfix.patch b/meta/recipes-devtools/opkg/opkg/headerfix.patch new file mode 100644 index 0000000000..d0711ecd0e --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg/headerfix.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Without this, the FILE reference in this header can cause compile issues. | ||
| 2 | |||
| 3 | RP - 29/1/10 | ||
| 4 | |||
| 5 | Index: trunk/libopkg/pkg_dest.h | ||
| 6 | =================================================================== | ||
| 7 | --- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000 | ||
| 8 | +++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000 | ||
| 9 | @@ -18,6 +18,8 @@ | ||
| 10 | #ifndef PKG_DEST_H | ||
| 11 | #define PKG_DEST_H | ||
| 12 | |||
| 13 | +#include <stdio.h> | ||
| 14 | + | ||
| 15 | typedef struct pkg_dest pkg_dest_t; | ||
| 16 | struct pkg_dest | ||
| 17 | { | ||
diff --git a/meta/recipes-devtools/opkg/opkg/logfix.patch b/meta/recipes-devtools/opkg/opkg/logfix.patch new file mode 100644 index 0000000000..da06f00bd0 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg/logfix.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | Patch to remove "duplicate" bits of logs from opkg output, which | ||
| 2 | massively simplifies do_rootfs logs. The reason is we get unflushed | ||
| 3 | data passed to the children and duplicated. | ||
| 4 | |||
| 5 | RP - 26/1/10 | ||
| 6 | |||
| 7 | Index: trunk/libbb/gz_open.c | ||
| 8 | =================================================================== | ||
| 9 | --- trunk.orig/libbb/gz_open.c 2010-01-26 23:12:10.000000000 +0000 | ||
| 10 | +++ trunk/libbb/gz_open.c 2010-01-26 23:12:17.000000000 +0000 | ||
| 11 | @@ -38,6 +38,12 @@ | ||
| 12 | perror_msg("pipe"); | ||
| 13 | return(NULL); | ||
| 14 | } | ||
| 15 | + | ||
| 16 | + /* If we don't flush, we end up with two copies of anything pending, | ||
| 17 | + one from the parent, one from the child */ | ||
| 18 | + fflush(stdout); | ||
| 19 | + fflush(stderr); | ||
| 20 | + | ||
| 21 | if ((*pid = fork()) == -1) { | ||
| 22 | perror_msg("fork"); | ||
| 23 | return(NULL); | ||
diff --git a/meta/recipes-devtools/opkg/opkg_0.1.8.bb b/meta/recipes-devtools/opkg/opkg_0.1.8.bb new file mode 100644 index 0000000000..4eb3ff9a11 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg_0.1.8.bb | |||
| @@ -0,0 +1,53 @@ | |||
| 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 = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \ | ||
| 12 | file://add_vercmp.patch \ | ||
| 13 | file://headerfix.patch \ | ||
| 14 | " | ||
| 15 | |||
| 16 | PR = "r3" | ||
| 17 | |||
| 18 | PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth" | ||
| 19 | |||
| 20 | FILES_update-alternatives-cworth = "${bindir}/update-alternatives" | ||
| 21 | FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so" | ||
| 22 | FILES_libopkg = "${libdir}/*.so.* ${localstatedir}/lib/opkg/" | ||
| 23 | |||
| 24 | # We need to create the lock directory | ||
| 25 | do_install_append() { | ||
| 26 | install -d ${D}${localstatedir}/lib/opkg | ||
| 27 | } | ||
| 28 | |||
| 29 | # Define a variable to allow distros to run configure earlier. | ||
| 30 | # (for example, to enable loading of ethernet kernel modules before networking starts) | ||
| 31 | OPKG_INIT_POSITION = "98" | ||
| 32 | OPKG_INIT_POSITION_slugos = "41" | ||
| 33 | |||
| 34 | pkg_postinst_${PN} () { | ||
| 35 | #!/bin/sh | ||
| 36 | if [ "x$D" != "x" ]; then | ||
| 37 | install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d | ||
| 38 | # this happens at S98 where our good 'ole packages script used to run | ||
| 39 | echo "#!/bin/sh | ||
| 40 | opkg-cl configure | ||
| 41 | rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure | ||
| 42 | " > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure | ||
| 43 | chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure | ||
| 44 | fi | ||
| 45 | |||
| 46 | update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100 | ||
| 47 | } | ||
| 48 | |||
| 49 | pkg_postrm_${PN} () { | ||
| 50 | #!/bin/sh | ||
| 51 | update-alternatives --remove opkg ${bindir}/opkg-cl | ||
| 52 | } | ||
| 53 | |||
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 | |||
