1 DISTDEBIAN=$(shell grep -qi Debian /etc/issue && echo debian)
2 DISTREDHAT=$(shell grep -qi 'Red Hat' /etc/issue && echo rh)
3 DISTSUSE=$(shell grep -qi 'SuSE' /etc/issue && echo rh)
4 DIST=$(DISTDEBIAN)$(DISTREDHAT)$(DISTSUSE)
6 ARCHIVE=$(CURDIR)/depot
7 BUILDRESULT=$(CURDIR)/result
9 VER=$(shell LANG=C grep '>software_version' gforge/common/include/FusionForge.class.php | cut -d\' -f2)
10 TAG=$(shell LANG=C svn log -r HEAD -l 1 | awk '{ if ($$1=="Tag-Release") print $$2}')
12 VERSION=fusionforge-$(VER)-$(shell LANG=C svn info | grep Revision | cut -d: -f2| sed 's/ //g')
14 VERSION=fusionforge-$(VER)
18 @echo "=========================================================================="
19 @echo "Use one of the following target with "
20 @echo "make -f Makefile.$(DIST) <target>"
21 @echo "=========================================================================="
22 @make -f Makefile.$(DIST)
25 cd tests ; php AllTests.php
28 rm -fr /tmp/$(VERSION)
29 cd gforge; find . -type f -or -type l | grep -v '/.svn/' | grep -v '^./debian' | grep -v '^./deb-specific' | grep -v '^./rpm-specific' | grep -v '^./contrib' | grep -v '^./gforge.spec' | grep -v '^./README.setup' | grep -v '^./setup' | cpio -pdumB /tmp/$(VERSION)
30 cd /tmp/$(VERSION); utils/manage-translations.sh build
31 cd /tmp/; tar jcf $(BUILDRESULT)/$(VERSION).tar.bz2 $(VERSION)
32 cd /tmp/$(VERSION); tar zxf $(ARCHIVE)/libphp-jpgraph_1.5.2.orig.tar.gz
33 cd /tmp/$(VERSION); patch -p0 < $(ARCHIVE)/jpgraph-1.5.2-php5_and_liberation_fonts.patch
34 cd /tmp/$(VERSION); mkdir jpgraph; mv jpgraph-1.5.2/src/* jpgraph; rm -fr jpgraph-1.5.2
35 cd /tmp; tar jcf $(BUILDRESULT)/$(VERSION)-allinone.tar.bz2 $(VERSION)
36 rm -fr /tmp/$(VERSION)
39 @make -f Makefile.$(DIST) $@