opkg: sync with poky, based on patches from http://blog.haerwu.biz/download/diffs...
authorMarcin Juszkiewicz <hrw@openembedded.org>
Mon, 17 Mar 2008 23:40:48 +0000 (23:40 +0000)
committerKoen Kooi <koen@openembedded.org>
Mon, 17 Mar 2008 23:40:48 +0000 (23:40 +0000)
packages/opkg/opkg-collateral.bb [new file with mode: 0644]
packages/opkg/opkg-collateral/.mtn2git_empty [new file with mode: 0644]
packages/opkg/opkg-collateral/dest [new file with mode: 0644]
packages/opkg/opkg-collateral/lists [new file with mode: 0644]
packages/opkg/opkg-collateral/opkg.conf.comments [new file with mode: 0644]
packages/opkg/opkg-native_svn.bb
packages/opkg/opkg-sdk_svn.bb [new file with mode: 0644]
packages/opkg/opkg.inc [new file with mode: 0644]
packages/opkg/opkg_svn.bb

diff --git a/packages/opkg/opkg-collateral.bb b/packages/opkg/opkg-collateral.bb
new file mode 100644 (file)
index 0000000..79c741d
--- /dev/null
@@ -0,0 +1,22 @@
+DESCRIPTION = "opkg configuration files"
+SECTION = "base"
+LICENSE = "MIT"
+
+SRC_URI = "file://opkg.conf.comments \
+          file://lists \
+          file://dest \
+          file://src "
+
+do_compile () {
+       cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf
+       cat ${WORKDIR}/src      >>${WORKDIR}/opkg.conf
+       cat ${WORKDIR}/dest     >>${WORKDIR}/opkg.conf
+       cat ${WORKDIR}/lists    >>${WORKDIR}/opkg.conf
+}
+
+do_install () {
+       install -d ${D}${sysconfdir}/
+       install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg.conf
+}
+
+CONFFILES_${PN} = "${sysconfdir}/opkg.conf"
diff --git a/packages/opkg/opkg-collateral/.mtn2git_empty b/packages/opkg/opkg-collateral/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/opkg/opkg-collateral/dest b/packages/opkg/opkg-collateral/dest
new file mode 100644 (file)
index 0000000..088ca40
--- /dev/null
@@ -0,0 +1 @@
+dest root /
diff --git a/packages/opkg/opkg-collateral/lists b/packages/opkg/opkg-collateral/lists
new file mode 100644 (file)
index 0000000..f8aecd8
--- /dev/null
@@ -0,0 +1,2 @@
+lists_dir ext /var/lib/opkg
+
diff --git a/packages/opkg/opkg-collateral/opkg.conf.comments b/packages/opkg/opkg-collateral/opkg.conf.comments
new file mode 100644 (file)
index 0000000..51623f4
--- /dev/null
@@ -0,0 +1,23 @@
+# Must have one or more source entries of the form:
+#
+#   src <src-name> <source-url>
+#
+# and one or more destination entries of the form:
+#
+#   dest <dest-name> <target-path>
+#
+# where <src-name> and <dest-names> are identifiers that
+# should match [a-zA-Z0-9._-]+, <source-url> should be a
+# URL that points to a directory containing a Familiar
+# Packages file, and <target-path> should be a directory
+# that exists on the target system.
+
+# Proxy Support
+#option http_proxy http://proxy.tld:3128
+#option ftp_proxy http://proxy.tld:3128
+#option proxy_username <username>
+#option proxy_password <password>
+
+# Offline mode (for use in constructing flash images offline)
+#option offline_root target
+
index c90c91d..176a623 100644 (file)
@@ -1,10 +1,10 @@
-require opkg_svn.bb
+require opkg.inc
 
 DEPENDS = "curl-native"
+PR = "r1"
 
 target_libdir := "${libdir}"
 
 inherit native
 
-EXTRA_OECONF += "--with-opkglibdir=${target_libdir}/opkg -disable-gpg"
-
+EXTRA_OECONF += "--with-opkglibdir=${target_libdir} -disable-gpg"
diff --git a/packages/opkg/opkg-sdk_svn.bb b/packages/opkg/opkg-sdk_svn.bb
new file mode 100644 (file)
index 0000000..5838192
--- /dev/null
@@ -0,0 +1,7 @@
+require opkg.inc
+
+DEPENDS = "curl-sdk"
+
+inherit sdk
+
+EXTRA_OECONF += "--with-opkglibdir=${target_libdir}/opkg -disable-gpg"
diff --git a/packages/opkg/opkg.inc b/packages/opkg/opkg.inc
new file mode 100644 (file)
index 0000000..2179f55
--- /dev/null
@@ -0,0 +1,15 @@
+DESCRIPTION = "Open Package Manager"
+DESCRIPTION_libopkg = "Open Package Manager Library"
+SECTION = "base"
+LICENSE = "GPL"
+DEPENDS = "curl gpgme"
+PV = "0.0+svnr${SRCREV}"
+
+SRC_URI = "svn://svn.openmoko.org/trunk/src/target/;module=opkg;proto=http"
+S = "${WORKDIR}/opkg"
+
+inherit autotools pkgconfig
+
+do_stage() {
+       autotools_stage_all
+}
index 149f305..30461ea 100644 (file)
@@ -1,21 +1,33 @@
-DESCRIPTION = "Open Package Manager"
-DESCRIPTION_libopkg = "Open Package Manager Library"
-SECTION = "base"
-LICENSE = "GPL"
-DEPENDS = "curl gpgme"
-PV = "0.0+svnr${SRCREV}"
-PR = "r1"
+require opkg.inc
 
-SRC_URI = "svn://svn.openmoko.org/trunk/src/target/;module=opkg;proto=http"
-S = "${WORKDIR}/opkg"
-
-inherit autotools pkgconfig
-
-do_stage() {
-       autotools_stage_all
-}
+PR = "r2"
 
 PACKAGES =+ "libopkg-dev libopkg"
 
 FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
 FILES_libopkg = "${libdir}/*.so.*"
+
+# 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_opkg () {
+#!/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
+" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+       chmod 0755 ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+fi
+
+update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
+}
+
+pkg_postrm_opkg () {
+#!/bin/sh
+update-alternatives --remove opkg ${bindir}/opkg-cl
+}
+