3 FUSIONFORGE=FusionForge
4 ORIGIN=debian.fusionforge.org
5 BUILDPLACE=$(CURDIR)/cowbuilder/buildplace
6 BUILDFILES=$(CURDIR)/cowbuilder/buildfiles
7 BUILDRESULT=$(CURDIR)/result
8 TARBALLS=$(CURDIR)/tarballs
9 APTCACHE=$(CURDIR)/cowbuilder/cache
10 DISTRIB=$(shell echo $(XDISTRIB) | cut -c2-)
11 LOCALREPODEB=/var/www/debian-fusionforge
12 LOCALREPOUBU=/var/www/ubuntu-fusionforge
13 DEBIANLIST=1lenny 2squeeze 3sid
14 UBUNTULIST=1gutsy 1hardy 1intrepid
15 UBUNTUOP=--mirror http://archive.ubuntu.com/ubuntu --debootstrap debootstrap
16 UBUNTUOP=--mirror http://localhost/ubuntu --debootstrap debootstrap
18 gfversion=$(shell head -1 gforge/debian/changelog | sed 's/.*(\(.[^+-]*\).*).*/\1/')
19 gfminor=$(shell head -1 gforge/debian/changelog | sed 's/.*(.[^+-]*[+-]\(.*\)).*/\1/')
20 svnrev=$(shell LANG=C svn info | grep Revision | cut -d: -f2| sed 's/ //g')
24 #make -f Makefile.debian cowbuilddist XDISTRIB=2squeeze LOCALREPO=$(LOCALREPODEB)
27 @echo ======================================================================================
28 @echo '= Available target are listed below ='
29 @echo ======================================================================================
30 @cat Makefile.debian | grep '^.*:.*#$$' | sed 's/FUSIONFORGE/$(FUSIONFORGE)/' | sed 's/^\(.*:\).*#\(.*\)#$$/\1 \2/'
31 @echo ======================================================================================
34 documentor_vers=phpdocumentor-1.3.0rc3
40 orig: $(TARBALLS)/gforge_$(gfversion).orig.tar.gz # Make FUSIONFORGE orig file #
45 phpdoc: phpdocumentor_get phpdocumentor_unpack $(documentor_path)/$(documentor_vers)/patched gforge/docs/phpdoc/docs # Get phpdocumentor, install phpdocumentor, build gforge phpdoc #
48 [ ! -f $(documentor_path)/$(documentor_vers).tar.gz ] && cd $(documentor_path) && wget http://heanet.dl.sourceforge.net/sourceforge/phpdocu/$(documentor_vers).tar.gz || true
50 [ ! -d $(documentor_path)/$(documentor_vers) ] && cd $(documentor_path) && tar xvzf $(documentor_vers).tar.gz || true
51 $(documentor_path)/$(documentor_vers)/patched:
52 cd $(documentor_path)/ && patch -p2 < $(CURDIR)/gforge/docs/phpdoc/manageclass.patch && touch $(documentor_path)/$(documentor_vers)/patched
53 gforge/docs/phpdoc/docs:
54 cd gforge/docs/phpdoc/ && ./makedoc.sh
57 # Build with cowbuilder
61 DEBBUILDOPTS=--debbuildopts -sa
65 @echo "Will build gforge_$(gfversion)$(MINOR)$(DISTRIB)"
67 cowbuilddeb: # ***** This is the one to build debian packages ***** #
68 for dist in $(DEBIANLIST); do \
69 make -f Makefile.debian cowbuilddist XDISTRIB=$$dist DISTROOP="$(DEBIANOP)" LOCALREPO=$(LOCALREPODEB) DISTRIBLIST="$(DEBIANLIST)"; \
72 cowbuildubu: # ***** This is the one to build ubuntu packages ***** #
73 for dist in $(UBUNTULIST); do \
74 make -f Makefile.debian svnbuilddist XDISTRIB=$$dist DISTROOP="$(UBUNTUOP)" LOCALREPO=$(LOCALREPOUBU) DISTRIBLIST="$(UBUNTULIST)" ; \
77 cowbuilddist: cowbuilderenv localrepo $(BUILDFILES) $(BUILDRESULT)/gforge_$(gfversion)$(MINOR)$(XDISTRIB)_i386.changes
79 $(BUILDRESULT)/gforge_$(gfversion)$(MINOR)$(XDISTRIB)_i386.changes: $(BUILDFILES)/gforge_$(gfversion)$(MINOR)$(XDISTRIB).dsc
80 cd $(BUILDFILES) ; sudo cowbuilder --build --basepath $(CURDIR)/cowbuilder/base-$(DISTRIB).cow --configfile $(CURDIR)/cowbuilder/config $(BUILDFILES)/gforge_$(gfversion)$(MINOR)$(XDISTRIB).dsc
81 # Install in repository
82 #cd result; reprepro -Vb $(LOCALREPO) include $(DISTRIB) gforge_$(gfversion)$(MINOR)$(XDISTRIB)_i386.changes
84 $(BUILDFILES)/gforge_$(gfversion)$(MINOR)$(XDISTRIB).dsc: $(BUILDFILES)/gforge_$(gfversion).orig.tar.gz
85 debclean; find gforge -type f -or -type l | grep -v '/CVS/' | grep -v '/.svn/' | grep -v rpm-specific | grep -v docs/phpdoc/docs | grep -v ^./debian/ | cpio -pdumB $(BUILDFILES)/
86 # Set version for given distrib
87 cd $(BUILDFILES)/gforge; dch -b -v $(gfversion)$(MINOR)$(XDISTRIB) -D UNRELEASED "This is $(DISTRIB) autobuild"
88 perl -pi -e "s/UNRELEASED/$(DISTRIB)/" $(BUILDFILES)/gforge/debian/changelog
89 cd $(BUILDFILES) ; dpkg-source -b gforge
90 rm -rf $(BUILDFILES)/gforge
92 $(BUILDFILES)/gforge_$(gfversion).orig.tar.gz: $(TARBALLS)/gforge_$(gfversion).orig.tar.gz
93 cp $(TARBALLS)/gforge_$(gfversion).orig.tar.gz $(BUILDFILES)
95 $(TARBALLS)/gforge_$(gfversion).orig.tar.gz: $(TARBALLS)
96 debclean; find gforge -type f -or -type l | grep -v '/CVS/' | grep -v '/.svn/' | grep -v rpm-specific | grep -v docs/phpdoc/docs | grep -v ^./debian/ | cpio -o -H ustar | gzip > $(TARBALLS)/gforge_$(gfversion).orig.tar.gz
99 cowbuilderenv: cowbuilder cowbuilder/base-$(DISTRIB).stamp
100 @echo "Ready for $(DISTRIB)"
102 cowbuilder/base-$(DISTRIB).stamp: cowbuilder/config
103 -sudo /usr/sbin/cowbuilder --create --distribution $(DISTRIB) --basepath $(CURDIR)/cowbuilder/base-$(DISTRIB).cow --configfile $(CURDIR)/cowbuilder/config $(DISTROOP)
104 touch cowbuilder/base-$(DISTRIB).stamp
106 cowbuilder/config: /usr/sbin/cowbuilder
107 echo "APTCACHE=$(APTCACHE)" > $(CURDIR)/cowbuilder/config
108 echo "BUILDPLACE=$(BUILDPLACE)" >> $(CURDIR)/cowbuilder/config
109 echo "BUILDRESULT=$(BUILDRESULT)" >> $(CURDIR)/cowbuilder/config
111 /usr/sbin/cowbuilder:
112 sudo apt-get install cowdancer
117 localrepo: $(LOCALREPO) $(LOCALREPO)/conf $(LOCALREPO)/conf/distributions
119 $(LOCALREPO)/conf/distributions:
120 for dist in $(DISTRIBLIST); do \
121 echo "Codename: $$dist" ; \
122 echo "Suite: $$dist" ; \
123 echo "Components: main" ; \
124 echo "UDebComponents: main" ; \
125 echo "Architectures: i386 source" ; \
126 echo "Origin: $(ORIGIN)" ; \
127 echo "Version: 4.7" ; \
128 echo "Description: My $(FUSIONFORGE) $$dist repository" ; \
129 echo "SignWith: yes" ; \
130 echo "" ; done >> $(LOCALREPO)/conf/distributions
133 mkdir $(LOCALREPO)/conf
139 mkdir -p $(BUILDFILES)
142 sudo mkdir $(LOCALREPO)
143 sudo chown `id -u`.`id -g` $(LOCALREPO)