From fdb0e57a3aecd1709457277f4d0e203e86178c09 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 8 Nov 2014 23:48:37 +0100 Subject: [PATCH 1/6] Add Makefile to build the firmware We need an automated way to build our firmware. For example, it isn't clear from this repository which version of gluon we're using. --- .gitignore | 1 + Makefile | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b2a8ab --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +gluon-build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0948f86 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +GLUON_BUILD_DIR := gluon-build +GLUON_GIT_URL := git://github.com/freifunk-gluon/gluon.git +GLUON_GIT_REF := v2014.3.1 + +JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l) + +_GIT_DESCRIBE = $(shell git describe --tags 2>&1) +ifneq (,${_GIT_DESCRIBE}) + GLUON_RELEASE := ${_GIT_DESCRIBE} +endif + +all: build + +build: gluon-prepare + (cd ${GLUON_BUILD_DIR} && make update && make -j ${JOBS}) + +${GLUON_BUILD_DIR}: + git clone ${GLUON_GIT_URL} ${GLUON_BUILD_DIR} + +gluon-prepare: ${GLUON_BUILD_DIR} + (cd ${GLUON_BUILD_DIR} && git checkout -q ${GLUON_GIT_REF}) + ln -sfT .. ${GLUON_BUILD_DIR}/site + +clean: + rm -rf ${GLUON_BUILD_DIR} From 3cf899a37936cba1fdc21265233a2c9934b3ba65 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 9 Nov 2014 00:22:32 +0100 Subject: [PATCH 2/6] Default to nightly versioning scheme --- site.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site.mk b/site.mk index dd6e7d4..f677e3b 100644 --- a/site.mk +++ b/site.mk @@ -23,7 +23,7 @@ GLUON_SITE_PACKAGES := \ haveged -DEFAULT_GLUON_RELEASE := 0.6~stable$(shell date '+%Y%m%d') +DEFAULT_GLUON_RELEASE := nightly~$(shell date '+%Y%m%d')~$(shell git describe --always --abbrev) # Allow overriding the release number from the command line GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE) From 194be8ee3efc2e88aa1f0b1a4bd46a7f8292939b Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 9 Nov 2014 00:44:05 +0100 Subject: [PATCH 3/6] Update README.md --- README.md | 12 ++++++++++++ Readme.md | 3 --- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 README.md delete mode 100644 Readme.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ef5eb12 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +## Building + +Check out this repository and execute `make`, i.e. like this: + + git clone https://github.com/freifunkMUC/site-ffm.git site-ffm + cd site-ffm + make + +## Further Resources + +Look at the [site configuration related Gluon documentation](http://gluon.readthedocs.org/en/v2014.3.1/user/site.html) +for information on site configuration options and examples from other communities. diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 1df7c53..0000000 --- a/Readme.md +++ /dev/null @@ -1,3 +0,0 @@ -See -https://github.com/freifunk-gluon/gluon/blob/master/docs/user/site.rst -for Documentation and examples from other communities. From 29692fcf71c7d5552e147f4d91c9361075574cb6 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 9 Nov 2014 14:01:32 +0100 Subject: [PATCH 4/6] Pick a commit from master as Gluon 2013.3.1 won't build --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0948f86..b63c6c0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ GLUON_BUILD_DIR := gluon-build GLUON_GIT_URL := git://github.com/freifunk-gluon/gluon.git -GLUON_GIT_REF := v2014.3.1 +GLUON_GIT_REF := a8b7c39078aa70291cf5af022f520b624b8f58aa JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l) From 2660147596b9f52e54f8f098e0350ee4722c0f05 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 9 Nov 2014 15:00:56 +0100 Subject: [PATCH 5/6] Add support for GLUON_BRANCH and build manifest --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b63c6c0..8ca21d0 100644 --- a/Makefile +++ b/Makefile @@ -7,12 +7,18 @@ JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l) _GIT_DESCRIBE = $(shell git describe --tags 2>&1) ifneq (,${_GIT_DESCRIBE}) GLUON_RELEASE := ${_GIT_DESCRIBE} + GLUON_BRANCH ?= stable +else + GLUON_BRANCH ?= nightly endif all: build build: gluon-prepare - (cd ${GLUON_BUILD_DIR} && make update && make -j ${JOBS}) + cd ${GLUON_BUILD_DIR} \ + && make update \ + && make -j ${JOBS} \ + && make manifest ${GLUON_BUILD_DIR}: git clone ${GLUON_GIT_URL} ${GLUON_BUILD_DIR} From fb0cc95169ed4c63574b7a3d3ab63bb57f5a475b Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 15 Nov 2014 01:00:45 +0100 Subject: [PATCH 6/6] Fix git rev in default nightly version --- site.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site.mk b/site.mk index f677e3b..71c3209 100644 --- a/site.mk +++ b/site.mk @@ -23,7 +23,7 @@ GLUON_SITE_PACKAGES := \ haveged -DEFAULT_GLUON_RELEASE := nightly~$(shell date '+%Y%m%d')~$(shell git describe --always --abbrev) +DEFAULT_GLUON_RELEASE := nightly~$(shell date '+%Y%m%d')~$(shell cd ../../../.. && git describe --always --abbrev=8) # Allow overriding the release number from the command line GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)