diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-08-05 11:24:24 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-08-05 11:24:24 +0000 |
commit | a720dd209f8b345cdfa5d2432287520389404445 (patch) | |
tree | f94fed2f4802eff85078645f20a7f829d55026c1 /package/Makefile | |
parent | 1e6ab23098fd8dc49ba005dc0c477671a5ddb500 (diff) | |
download | mtk-20170518-a720dd209f8b345cdfa5d2432287520389404445.zip mtk-20170518-a720dd209f8b345cdfa5d2432287520389404445.tar.gz mtk-20170518-a720dd209f8b345cdfa5d2432287520389404445.tar.bz2 |
build: introduce per feed repository support
This changeset implements a new menuconfig option to generate separate
repositories for each enabled package feed instead of one monolithic one.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 42002
Diffstat (limited to 'package/Makefile')
-rw-r--r-- | package/Makefile | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/package/Makefile b/package/Makefile index 1930d27..bf1b16f 100644 --- a/package/Makefile +++ b/package/Makefile @@ -7,6 +7,8 @@ curdir:=package +include $(INCLUDE_DIR)/feeds.mk + -include $(TMP_DIR)/.packagedeps $(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m)) $(curdir)/builddirs-install:=. @@ -127,11 +129,19 @@ ifndef CONFIG_OPKGSMIME_PASSPHRASE endif endif +PACKAGE_SUBDIRS=. +ifneq ($(CONFIG_PER_FEED_REPO),) + PACKAGE_SUBDIRS=base $(FEEDS_ENABLED) +endif + $(curdir)/index: FORCE @echo Generating package index... - @(cd $(PACKAGE_DIR); \ + @for d in $(PACKAGE_SUBDIRS); do ( \ + [ -d $(PACKAGE_DIR)/$$d ] && \ + cd $(PACKAGE_DIR)/$$d || continue; \ $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \ - gzip -9c Packages > Packages.gz ) + gzip -9c Packages > Packages.gz; \ + ); done ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_KEY)),) @echo Signing key has not been configured else @@ -139,12 +149,15 @@ ifeq ($(call qstrip,$(CONFIG_OPKGSMIME_CERT)),) @echo Certificate has not been configured else @echo Signing package index... - @(cd $(PACKAGE_DIR); \ + @for d in $(PACKAGE_SUBDIRS); do ( \ + [ -d $(PACKAGE_DIR)/$$d ] && \ + cd $(PACKAGE_DIR)/$$d || continue; \ openssl smime -binary -in Packages.gz \ -out Packages.sig -outform PEM -sign \ -signer $(CONFIG_OPKGSMIME_CERT) \ -inkey $(CONFIG_OPKGSMIME_KEY) \ - $(PASSOPT) $(PASSARG) ) + $(PASSOPT) $(PASSARG); \ + ); done endif endif |