2 FUSIONFORGE=FusionForge
3 ORIGIN=debian.fusionforge.org
6 @echo ======================================================================================
7 @echo '= Available target are listed below ='
8 @echo '= Today only to build debian pakages and orig tarballs ='
9 @echo ======================================================================================
10 @cat Makefile.debian | grep '^.*:.*#$$' | sed 's/FUSIONFORGE/$(FUSIONFORGE)/' | sed 's/^\(.*:\).*#\(.*\)#$$/\1 \2/'
11 @echo ======================================================================================
13 clean: cleangf # Clean FUSIONFORGE #
14 allor: orig origcvs origsvn # Build FUSIONFORGE orig tarball #
15 clnor: # Clean FUSIONFORGE orig tarball #
16 rm -f gforge*orig.tar.gz
17 allgf: orig cleangf build # Build FUSIONFORGE and orig tarballs #
18 allup: upload # Upload all using dput and optional where=<server> #
20 dchcmd=dch -v 4.5.6-1 -D unstable "New Upstream version"
25 debuildopts=-sa -us -uc
27 gfversion=$(shell head -1 gforge/debian/changelog | sed 's/.*(\(.*\)-.*).*/\1/'| sed 's/+something/+z/')
28 gfminor=$(shell head -1 gforge/debian/changelog | sed 's/.*(.*-\(.*\)).*/\1/')
31 documentor_vers=phpdocumentor-1.3.0rc3
36 clngf: # Clean debian files of FUSIONFORGE build #
37 @rm -f gforge*.deb sourceforge*.deb gforge*.changes gforge*.upload gforge*.build gforge*.dsc gforge*[^g].tar.gz gforge*.diff.gz gforge*.asc
39 build: # Build debian FUSIONFORGE packages #
40 cd gforge ; debclean; $(dchcmd) ; find . -type f -or -type l | grep -v '/CVS/' | grep -v '/.svn/' | grep -v rpm-specific | grep -v docs/phpdoc/docs | cpio -pdumvB ../gforge-$(gfversion)
41 cd gforge-$(gfversion); debuild $(debuildopts); fakeroot debian/rules clean
42 rm -rf gforge-$(gfversion)
43 upload: # Upload FUSIONFORGE packages on where=<server> using dput #
44 dput $(where) gforge*.changes
46 orig: gforge_$(gfversion).orig.tar.gz # Make FUSIONFORGE orig file #
47 gforge_$(gfversion).orig.tar.gz:
48 cd gforge ; debclean; find . -type f -or -type l | grep -v '/CVS/' | grep -v '/.svn/' | grep -v rpm-specific | grep -v docs/phpdoc/docs | grep -v ^./debian/ | cpio -pdumvB ../gforge-$(gfversion)
49 tar cvzf gforge_$(gfversion).orig.tar.gz gforge-$(gfversion)
50 rm -rf gforge-$(gfversion)
54 phpdoc: phpdocumentor_get phpdocumentor_unpack $(documentor_path)/$(documentor_vers)/patched gforge/docs/phpdoc/docs # Get phpdocumentor, install phpdocumentor, build gforge phpdoc #
57 [ ! -f $(documentor_path)/$(documentor_vers).tar.gz ] && cd $(documentor_path) && wget http://heanet.dl.sourceforge.net/sourceforge/phpdocu/$(documentor_vers).tar.gz || true
59 [ ! -d $(documentor_path)/$(documentor_vers) ] && cd $(documentor_path) && tar xvzf $(documentor_vers).tar.gz || true
60 $(documentor_path)/$(documentor_vers)/patched:
61 cd $(documentor_path)/ && patch -p2 < $(CURDIR)/gforge/docs/phpdoc/manageclass.patch && touch $(documentor_path)/$(documentor_vers)/patched
62 gforge/docs/phpdoc/docs:
63 cd gforge/docs/phpdoc/ && ./makedoc.sh
70 LOCALREPO=/var/www/debian-fusionforge
71 LOCALREPOUBU=/var/www/ubuntu-fusionforge
72 DISTRIBLIST=etch lenny sid
73 UBUNTULIST=gutsy hardy intrepid
74 UBUNTUOP=--mirror http://archive.ubuntu.com/ubuntu --debootstrap debootstrap
75 UBUNTUOP=--mirror http://localhost/ubuntu --debootstrap debootstrap
80 @echo "Will build gforge_$(gfversion)-$(MINOR)$(DISTRIB)"
82 svnbuild: # ***** This is the one you should use ***** #
83 for dist in $(DISTRIBLIST); do \
84 make -f Makefile.debian svnbuilddist DISTRIB=$$dist ; \
87 svnbuildubu: # ***** This is the one to build ubuntu packages ***** #
88 for dist in $(UBUNTULIST); do \
89 make -f Makefile.debian svnbuilddist DISTRIB=$$dist DISTROOP="$(UBUNTUOP)" LOCALREPO=$(LOCALREPOUBU) DISTRIBLIST="$(UBUNTULIST)" ; \
92 svnbuilddist: pbuilderenv localrepo result/gforge_$(gfversion)-$(MINOR)$(DISTRIB)_i386.changes
94 result/gforge_$(gfversion)-$(MINOR)$(DISTRIB)_i386.changes: tarballs/gforge_$(gfversion).orig.tar.gz
96 cp gforge/debian/changelog .
97 # Set version for given distrib
98 cd gforge; dch -v $(gfversion)-$(MINOR)$(DISTRIB) -D UNRELEASED "This is $(DISTRIB) autobuild"
99 perl -pi -e "s/UNRELEASED/$(DISTRIB)/" gforge/debian/changelog
101 cd gforge; svn-buildpackage --svn-ignore --svn-builder="pdebuild --debbuildopts -sa --buildresult $(CURDIR)/result -- --basetgz $(CURDIR)/pbuilder/base-$(DISTRIB).tgz"
103 mv changelog gforge/debian/changelog
104 # Install in repository
105 cd result; reprepro -Vb $(LOCALREPO) include $(DISTRIB) gforge_$(gfversion)-$(MINOR)$(DISTRIB)_i386.changes
107 tarballs/gforge_$(gfversion).orig.tar.gz: tarballs
108 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
113 pbuilderenv: pbuilder pbuilder/base-$(DISTRIB).tgz
114 @echo "Ready for $(DISTRIB)"
116 pbuilder/base-$(DISTRIB).tgz: /usr/sbin/pbuilder
117 sudo /usr/sbin/pbuilder create $(DEBUG) --distribution $(DISTRIB) --basetgz $(CURDIR)/pbuilder/base-$(DISTRIB).tgz $(DISTROOP)
120 sudo apt-get install pbuilder
125 localrepo: $(LOCALREPO) $(LOCALREPO)/conf $(LOCALREPO)/conf/distributions
127 $(LOCALREPO)/conf/distributions:
128 for dist in $(DISTRIBLIST); do \
129 echo "Codename: $$dist" ; \
130 echo "Suite: $$dist" ; \
131 echo "Components: main" ; \
132 echo "UDebComponents: main" ; \
133 echo "Architectures: i386 source" ; \
134 echo "Origin: $(ORIGIN)" ; \
135 echo "Version: 4.7" ; \
136 echo "Description: My $(FUSIONFORGE) $$dist repository" ; \
137 echo "SignWith: yes" ; \
138 echo "" ; done >> $(LOCALREPO)/conf/distributions
141 mkdir $(LOCALREPO)/conf
144 sudo mkdir $(LOCALREPO)
145 sudo chown `id -u`.`id -g` $(LOCALREPO)