diff --git a/.gitignore b/.gitignore index 53f839fd..7a4602a1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,5 @@ /images /site /openwrt -/packages/openwrt -/packages/gluon -/packages/routing -/packages/luci +/packages /modules.local diff --git a/Makefile b/Makefile index 54f90a4a..b54f74d2 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/modules b/modules index c6fe9ed1..730191df 100644 --- a/modules +++ b/modules @@ -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 diff --git a/scripts/modules.sh b/scripts/modules.sh new file mode 100644 index 00000000..1d0925ae --- /dev/null +++ b/scripts/modules.sh @@ -0,0 +1,7 @@ +. "$1"/modules + +GLUON_MODULES=openwrt + +for feed in $GLUON_FEEDS; do + GLUON_MODULES="$GLUON_MODULES packages/$feed" +done diff --git a/scripts/patch.sh b/scripts/patch.sh index b3ad5564..5cc79e0f 100755 --- a/scripts/patch.sh +++ b/scripts/patch.sh @@ -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 diff --git a/scripts/unpatch.sh b/scripts/unpatch.sh index 062b5cdc..a484d61a 100755 --- a/scripts/unpatch.sh +++ b/scripts/unpatch.sh @@ -2,7 +2,7 @@ set -e -. "$1"/modules +. "$1"/scripts/modules.sh for module in $GLUON_MODULES; do cd "$1"/$module diff --git a/scripts/update-patches.sh b/scripts/update-patches.sh index ee0ea15a..5e029570 100755 --- a/scripts/update-patches.sh +++ b/scripts/update-patches.sh @@ -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 diff --git a/scripts/update.sh b/scripts/update.sh index c8e98187..0f2bd505 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -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