Nicer feed specification

This commit is contained in:
Matthias Schiffer 2014-01-02 15:16:32 +01:00
parent 59adcccab3
commit 7537464262
8 changed files with 32 additions and 41 deletions

5
.gitignore vendored
View File

@ -3,8 +3,5 @@
/images
/site
/openwrt
/packages/openwrt
/packages/gluon
/packages/routing
/packages/luci
/packages
/modules.local

View File

@ -129,22 +129,11 @@ clean: FORCE
rm -rf $(GLUON_BUILDDIR)
refresh_feeds: FORCE
( \
export MAKEFLAGS=V=s$(OPENWRT_VERBOSE) \
export SCAN_COOKIE=; \
scripts/feeds uninstall -a; \
scripts/feeds update -a; \
scripts/feeds install -a; \
)
define FEEDS
src-link gluon ../../packages/gluon
src-link packages ../../packages/openwrt
src-link routing ../../packages/routing
src-link luci ../../packages/luci
endef
export FEEDS
export MAKEFLAGS=V=s$(OPENWRT_VERBOSE); \
export SCAN_COOKIE=; \
scripts/feeds uninstall -a; \
scripts/feeds update -a; \
scripts/feeds install -a
export GLUON_GENERATE := $(GLUONDIR)/scripts/generate.sh
@ -152,8 +141,7 @@ export GLUON_CONFIGURE := $(GLUONDIR)/scripts/configure.pl
feeds: FORCE
rm -f feeds.conf
echo "$$FEEDS" > feeds.conf
. $(GLUONDIR)/modules && for feed in $$GLUON_FEEDS; do echo src-link $$feed ../../packages/$$feed; done > feeds.conf
+$(GLUONMAKE) refresh_feeds V=s$(OPENWRT_VERBOSE)
config: FORCE

22
modules
View File

@ -1,19 +1,19 @@
GLUON_MODULES='openwrt packages/openwrt packages/gluon packages/routing packages/luci'
GLUON_FEEDS='openwrt gluon routing luci'
MODULE_OPENWRT_REPO=git://nbd.name/attitude_adjustment.git
MODULE_OPENWRT_COMMIT=f22d159c5ccb289125a9299c178236b075a73eaf
OPENWRT_REPO=git://nbd.name/attitude_adjustment.git
OPENWRT_COMMIT=f22d159c5ccb289125a9299c178236b075a73eaf
MODULE_PACKAGES_OPENWRT_REPO=git://nbd.name/packages_12.09.git
MODULE_PACKAGES_OPENWRT_COMMIT=c67cd451ac28058a4992ba9eb2eb5551f6cd1adb
PACKAGES_OPENWRT_REPO=git://nbd.name/packages_12.09.git
PACKAGES_OPENWRT_COMMIT=c67cd451ac28058a4992ba9eb2eb5551f6cd1adb
MODULE_PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
MODULE_PACKAGES_GLUON_COMMIT=c045ce17dac418c69135ed40ac1a06ea1d6b3885
PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=c045ce17dac418c69135ed40ac1a06ea1d6b3885
MODULE_PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git
MODULE_PACKAGES_ROUTING_COMMIT=0e4201a983df967e88e6ce5451f5f5f99bab2370
PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_COMMIT=0e4201a983df967e88e6ce5451f5f5f99bab2370
MODULE_PACKAGES_LUCI_REPO=https://github.com/freifunk-gluon/luci.git
MODULE_PACKAGES_LUCI_COMMIT=bed710786d8a3a63f5908823e6382a51efc91003
PACKAGES_LUCI_REPO=https://github.com/freifunk-gluon/luci.git
PACKAGES_LUCI_COMMIT=bed710786d8a3a63f5908823e6382a51efc91003
# It is possible to change the values defined in this file in a new file `modules.local`
if [ -f modules.local ]; then . ./modules.local; fi

7
scripts/modules.sh Normal file
View File

@ -0,0 +1,7 @@
. "$1"/modules
GLUON_MODULES=openwrt
for feed in $GLUON_FEEDS; do
GLUON_MODULES="$GLUON_MODULES packages/$feed"
done

View File

@ -3,7 +3,7 @@
set -e
shopt -s nullglob
. "$1"/modules
. "$1"/scripts/modules.sh
for module in $GLUON_MODULES; do
cd "$1"/$module
@ -17,6 +17,5 @@ for module in $GLUON_MODULES; do
false
)
fi
git checkout -B patched
git branch -d patching
git branch -M patched
done

View File

@ -2,7 +2,7 @@
set -e
. "$1"/modules
. "$1"/scripts/modules.sh
for module in $GLUON_MODULES; do
cd "$1"/$module

View File

@ -3,7 +3,7 @@
set -e
shopt -s nullglob
. "$1"/modules
. "$1"/scripts/modules.sh
for module in $GLUON_MODULES; do
rm -f "$1"/patches/$module/*.patch

View File

@ -2,12 +2,12 @@
set -e
. "$1"/modules
. "$1"/scripts/modules.sh
for module in $GLUON_MODULES; do
var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
eval repo=\${MODULE_${var}_REPO}
eval commit=\${MODULE_${var}_COMMIT}
eval repo=\${${var}_REPO}
eval commit=\${${var}_COMMIT}
mkdir -p "$1"/$module
cd "$1"/$module