summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/opkg/opkg-collateral.bb22
-rw-r--r--packages/opkg/opkg-collateral/.mtn2git_empty0
-rw-r--r--packages/opkg/opkg-collateral/dest1
-rw-r--r--packages/opkg/opkg-collateral/lists2
-rw-r--r--packages/opkg/opkg-collateral/opkg.conf.comments23
-rw-r--r--packages/opkg/opkg-native_svn.bb6
-rw-r--r--packages/opkg/opkg-sdk_svn.bb7
-rw-r--r--packages/opkg/opkg.inc15
-rw-r--r--packages/opkg/opkg_svn.bb42
9 files changed, 100 insertions, 18 deletions
diff --git a/packages/opkg/opkg-collateral.bb b/packages/opkg/opkg-collateral.bb
new file mode 100644
index 0000000000..79c741d7be
--- /dev/null
+++ b/packages/opkg/opkg-collateral.bb
@@ -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
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/opkg/opkg-collateral/.mtn2git_empty
diff --git a/packages/opkg/opkg-collateral/dest b/packages/opkg/opkg-collateral/dest
new file mode 100644
index 0000000000..088ca403da
--- /dev/null
+++ b/packages/opkg/opkg-collateral/dest
@@ -0,0 +1 @@
+dest root /
diff --git a/packages/opkg/opkg-collateral/lists b/packages/opkg/opkg-collateral/lists
new file mode 100644
index 0000000000..f8aecd8e15
--- /dev/null
+++ b/packages/opkg/opkg-collateral/lists
@@ -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
index 0000000000..51623f4d53
--- /dev/null
+++ b/packages/opkg/opkg-collateral/opkg.conf.comments
@@ -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
+
diff --git a/packages/opkg/opkg-native_svn.bb b/packages/opkg/opkg-native_svn.bb
index c90c91dae5..176a62359e 100644
--- a/packages/opkg/opkg-native_svn.bb
+++ b/packages/opkg/opkg-native_svn.bb
@@ -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
index 0000000000..58381921b2
--- /dev/null
+++ b/packages/opkg/opkg-sdk_svn.bb
@@ -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
index 0000000000..2179f5595e
--- /dev/null
+++ b/packages/opkg/opkg.inc
@@ -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
+}
diff --git a/packages/opkg/opkg_svn.bb b/packages/opkg/opkg_svn.bb
index 149f3050cf..30461ead4d 100644
--- a/packages/opkg/opkg_svn.bb
+++ b/packages/opkg/opkg_svn.bb
@@ -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
+}
+