Merge pull request #3 from freifunkMUC/build-automation

Build system and git versioning
This commit is contained in:
Franz Pletz
2014-11-15 19:33:31 +01:00
5 changed files with 45 additions and 4 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
gluon-build

31
Makefile Normal file
View File

@@ -0,0 +1,31 @@
GLUON_BUILD_DIR := gluon-build
GLUON_GIT_URL := git://github.com/freifunk-gluon/gluon.git
GLUON_GIT_REF := a8b7c39078aa70291cf5af022f520b624b8f58aa
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} \
&& make manifest
${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}

12
README.md Normal file
View File

@@ -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.

View File

@@ -1,3 +0,0 @@
See
https://github.com/freifunk-gluon/gluon/blob/master/docs/user/site.rst
for Documentation and examples from other communities.

View File

@@ -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 cd ../../../.. && git describe --always --abbrev=8)
# Allow overriding the release number from the command line
GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)