/etc/opkg/opkg.conf can now be installed on the target. Signed-off-by: George McCollister <george.mccollis...@gmail.com> --- generic/etc/opkg/opkg.conf | 12 ++++++++++++ rules/opkg.in | 35 +++++++++++++++++++++++++++++++++++ rules/opkg.make | 8 ++++++++ 3 files changed, 55 insertions(+), 0 deletions(-) create mode 100644 generic/etc/opkg/opkg.conf
diff --git a/generic/etc/opkg/opkg.conf b/generic/etc/opkg/opkg.conf new file mode 100644 index 0000000..e9c75c1 --- /dev/null +++ b/generic/etc/opkg/opkg.conf @@ -0,0 +1,12 @@ +# +# /etc/opkg/opkg.conf +# + +# src: <url-of-opkg-repository> +@SRC@ + +dest root / + +arch @ARCH@ 10 +arch all 1 +arch noarch 1 diff --git a/rules/opkg.in b/rules/opkg.in index bcff209..25412e1 100644 --- a/rules/opkg.in +++ b/rules/opkg.in @@ -51,4 +51,39 @@ config OPKG_GPG help FIXME +config OPKG_OPKG_CONF + bool + prompt "install /etc/opkg/opkg.conf" + default y + help + Installs a generic /etc/opkg/opkg.conf file. + + Important: To make opkg work at runtime, you must install this + configuration file. Without it you can't install new packages. + +if OPKG_OPKG_CONF + +config OPKG_OPKG_CONF_HOST + prompt "OPKG Update Site Host" + default "www.example.org" + string + help + Enter the hostname of your update site here. You can + use it as part of the opkg.conf URL below. + +config OPKG_OPKG_CONF_URL + string + prompt "OPKG Update Site URL" + default "src ptxdist http://${PTXCONF_OPKG_OPKG_CONF_HOST}/ptxdist/${PTXCONF_PROJECT}/dists/${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}" + help + This path is put into the /etc/opkg/opkg.conf file and specifies + where to find an OPKG packet feed. + + Note: Keep the "src" in front of the URL, its required if the + URL should be used. + + If you don't want to use this feature, keep the whole entry empty. + +endif + endif diff --git a/rules/opkg.make b/rules/opkg.make index 4c80d1d..6c18619 100644 --- a/rules/opkg.make +++ b/rules/opkg.make @@ -98,6 +98,14 @@ endif # # opkg tries to write to the OPKG_STATE_DIR_PREFIX, which is /usr/lib/opkg @$(call install_link, opkg, ../../tmp, /usr/lib/opkg) +ifdef PTXCONF_OPKG_OPKG_CONF + @$(call install_alternative, opkg, 0, 0, 0644, /etc/opkg/opkg.conf) + @$(call install_replace, opkg, /etc/opkg/opkg.conf, @SRC@, \ + $(PTXCONF_OPKG_OPKG_CONF_URL)) + @$(call install_replace, opkg, /etc/opkg/opkg.conf, @ARCH@, \ + $(PTXDIST_IPKG_ARCH_STRING)) +endif + @$(call install_finish, opkg) @$(call touch) -- 1.7.1 -- ptxdist mailing list ptxdist@pengutronix.de