forked from neymanna/fusionforge
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.debian
467 lines (386 loc) · 17.3 KB
/
Makefile.debian
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
#! /usr/bin/make -f
#
# TODO : document the role of this Makefile
# Uses cowbuilder to build packages inside ./builder/, for different
# distributions
# Packages are versioned ...
# Built packages will be put into ./result/
#
# ATTENTION : it requires you to run cowbuilder with sudo
#
FUSIONFORGE=FusionForge
PKGDIR=src
PKGNAME=$(shell head -1 $(PKGDIR)/debian/changelog | sed 's/ .*//')
PKGLETTER=$(shell echo $(PKGNAME) | cut -c1)
ORIGIN=debian.fusionforge.org
# BRANCH set to 'svn' if checkout from trunk or 'brc' otherwise
BRANCH=$(shell [ "$(shell echo $(basename $(CURDIR)) | sed 's/.*runk.*/trunk/')" = "trunk" ] && echo svn || echo brc)
#
ifeq (,$(shell echo "$$BUILDERDIR"))
BUILDERDIR=$(CURDIR)/builder
else
BUILDERDIR=$(shell echo $$BUILDERDIR)
endif
ifeq (,$(shell echo "$$BUILDRESULT"))
BUILDRESULT=$(CURDIR)/result
else
BUILDRESULT=$(shell echo $$BUILDRESULT)
endif
#
ifeq (,$(shell echo "$$UBUMIRROR"))
UBUMIRROR=http://archive.ubuntu.com/ubuntu
else
UBUMIRROR=$(shell echo $$UBUMIRROR)
endif
ifeq (,$(shell echo "$$DEBMIRROR"))
DEBMIRROR=http://ftp.fr.debian.org/debian
else
DEBMIRROR=$(shell echo $$DEBMIRROR)
endif
ifeq (,$(shell echo "$$DEBEMAIL"))
DEBEMAIL=buildbot@$(shell hostname -f)
else
DEBEMAIL=$(shell echo $$DEBEMAIL)
endif
#
TARBALLS=$(CURDIR)/tarballs
#
# Local customization
ifeq (../../3rd-party,$(shell ls -d ../../3rd-party 2>/dev/null))
-include ../../config/local.$(shell hostname)
else
-include $(CURDIR)/config/local.$(shell hostname)
endif
#
BUILDPLACE=$(BUILDERDIR)/buildplace
BUILDFILES=$(BUILDERDIR)/buildfiles
COWBUILDERBASE=$(BUILDERDIR)/cow
PBUILDERTGZ=$(BUILDERDIR)/tgz
APTCACHE=$(BUILDERDIR)/cache
#
LOCALREPODEB=/var/www/debian-fusionforge-$(BRANCH)
LOCALREPOUBU=/var/www/ubuntu-fusionforge-$(BRANCH)
#
XDISTRIB:=3sid
DISTRIB=$(shell echo $(XDISTRIB) | cut -c2-)
SIGNKEY=$(DEBEMAIL)
BOTKEY=botkey
DEBIANLIST=1lenny 2squeeze 3sid
DEBIANLISTP=1etch
DEBLIST=$(DEBIANLIST) $(DEBIANLISTP)
UBUNTULIST=1hardy 1intrepid 1jaunty 1karmic
UBUNTULIST=1jaunty 1karmic 1lucid
UBUNTULISTP=1gutsy
UBULIST=$(UBUNTULIST) $(UBUNTULISTP)
# I had to add keyring: see https://bugs.launchpad.net/ubuntu/+source/pbuilder/+bug/599695, requires to install ubuntu-keyring package
# wget http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-keyring/ubuntu-keyring_2010.11.09_all.deb ; dpkg -i ubuntu-keyring_2010.11.09_all.deb
UBUNTUOP=--mirror $(UBUMIRROR) --debootstrapopts --keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg --debootstrap debootstrap
DEBIANOP=--mirror $(DEBMIRROR) --debootstrapopts --include=apt --debootstrap debootstrap
ASKPASS=--ask-passphrase
ASKPASS=
MAJOR=$(shell head -1 $(PKGDIR)/debian/changelog | sed 's/.*(\(.*\)-[^-]*).*/\1/')
# SMAJOR is MAJOR without epoch if any
SMAJOR=$(shell echo $(MAJOR) | sed 's/^.://')
in_svn_repo:= $(wildcard .svn/)
ifeq ($(strip $(in_svn_repo)),)
in_bzr_repo:= $(wildcard .bzr/)
ifeq ($(strip $(in_bzr_repo)),)
in_git_repo:= $(wildcard .git/)
ifeq ($(strip $(in_git_repo)),)
svnrev=unknown
else
svnrev=git$(shell git describe --always)
endif # git
else
svnrev=bzr$(shell bzr revno)
endif # bzr
else
svnrev=$(shell LANG=C svn info 2>&1 | grep Revision | cut -d: -f2| sed 's/ //g')
endif # svn
MINOR=-1
MINOR=-$(BRANCH)$(svnrev)+$(XDISTRIB)
DEBUG=--debug
DEBUG=
DEBBUILDOPTS=--debbuildopts -sa
ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
# Some doc found there http://wiki.debian.org/cowbuilder
# Hook are not anymore necessary, but I keep as an example
UBUHOOK="--components 'main universe' --debootstrapopts --exclude=udev,pcmciautils,initramfs-tools"
UBUHOOK=--components "main universe" --hookdir $(CURDIR)/hook/ubuntu
UBUHOOK=--components "main universe"
DEBHOOK=
ORIGFILE=$(PKGNAME)_$(SMAJOR).orig.tar.gz
DSCFILE=$(PKGNAME)_$(SMAJOR)$(MINOR).dsc
PDSCFILE=$(PKGNAME)_$(SMAJOR)$(MINOR)+p.dsc
CHANGEFILE=$(PKGNAME)_$(SMAJOR)$(MINOR)_$(ARCH).changes
PCHANGEFILE=$(PKGNAME)_$(SMAJOR)$(MINOR)+p_$(ARCH).changes
# Quite heavy version, but still requires to be root
COWBUILDERCMD=cd $(BUILDPLACE) && dpkg-source -x $(BUILDFILES)/$(DSCFILE) ; cd $(BUILDPLACE)/$(PKGNAME)-$(SMAJOR) && pdebuild --pbuilder cowbuilder --buildresult $(BUILDRESULT) -- --basepath $(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).cow --buildplace $(BUILDPLACE) --aptcache $(APTCACHE) ; rm -rf $(BUILDPLACE)/$(PKGNAME)-$(SMAJOR)
# This one is with sudo and probably faster
COWBUILDERCMD=sudo /usr/sbin/cowbuilder --build --basepath $(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).cow --configfile $(COWBUILDERBASE)/configfile-$(ARCH) $(BUILDFILES)/$(DSCFILE) $(DEBBUILDOPTS)
# This one is with pbuilder
PBUILDERCMD=cd $(BUILDFILES) && sudo /usr/sbin/pbuilder --build --basetgz $(PBUILDERTGZ)/base-$(DISTRIB)-$(ARCH).tgz --configfile $(PBUILDERTGZ)/configfile-$(ARCH) $(BUILDFILES)/$(PDSCFILE)
default: list
list:
@echo ======================================================================================
@echo "= Available targets are listed below"
@echo "= Your current environment :"
@echo "= * checkout from : $(BRANCH)"
@echo "= (above 'checkout' meaning :"
@echo "= 'svn' for trunk"
@echo "= 'brc' for branches)"
@echo "= * PKGNAME = $(PKGNAME)"
@echo "= * PKGDIR = $(PKGDIR)"
@echo "= * major version : $(MAJOR)/$(SMAJOR)"
@echo "= * minor version : $(MINOR)"
@echo "= * architecture : $(ARCH)"
@echo "= * BUILDERDIR = $(BUILDERDIR)"
@echo "= * ORIGFILE = $(ORIGFILE)"
@echo "= * DSCFILE = $(DSCFILE)"
@echo "= * PDSCFILE = $(PDSCFILE)"
@echo "= * CHANGEFILE = $(CHANGEFILE)"
@echo "= * PCHANGEFILE = $(PCHANGEFILE)"
@echo ======================================================================================
@cat Makefile.debian | grep '^.*:.*#$$' | sed 's/FUSIONFORGE/$(FUSIONFORGE)/' | sed 's/^\(.*:\).*#\(.*\)#$$/\1 \2/'
@echo ======================================================================================
#
# Simple targets
#
#:======== Debian Builds ============#
lenny: # Simply build lenny packages #
$(MAKE) cowbuilddeb DEBIANLIST=1lenny
rlenny: # Make a lenny repository #
$(MAKE) repodeb DEBIANLIST=1lenny
squeeze: # Simply build squeeze packages #
$(MAKE) cowbuilddeb DEBIANLIST=2squeeze
rsqueeze: # Make a squeeze repository #
$(MAKE) repodeb DEBIANLIST=2squeeze
sid: # Simply build sid packages #
$(MAKE) cowbuilddeb DEBIANLIST=3sid
rsid: # Make a sid repository #
$(MAKE) repodeb DEBIANLIST=3sid
#:======== Ubuntu Builds ============#
intrepid: # Simply build intrepid packages #
$(MAKE) cowbuildubu UBUNTULIST=1intrepid
rintrepid: # Make an intrepid repository #
$(MAKE) repoubu UBUNTULIST=1intrepid
jaunty: # Simply build jaunty packages #
$(MAKE) cowbuildubu UBUNTULIST=1jaunty
rjaunty: # Make a jaunty repository #
$(MAKE) repoubu UBUNTULIST=1jaunty
karmic: # Simply build karmic packages #
$(MAKE) cowbuildubu UBUNTULIST=1karmic
rkarmic: # Make a karmic repository #
$(MAKE) repoubu UBUNTULIST=1karmic
lucid: # Simply build lucid packages #
$(MAKE) cowbuildubu UBUNTULIST=1lucid
rlucid: # Make a lucid repository #
$(MAKE) repoubu UBUNTULIST=1lucid
#:======== Other and Multiple Builds ============#
documentor_path=/tmp
documentor_url=http://downloads.sourceforge.net/project/phpdocu/PhpDoc/phpDocumentor-1.4.3/PhpDocumentor-1.4.3.tgz
documentor_file=PhpDocumentor-1.4.3.tgz
documentor_subdir=PhpDocumentor-1.4.3
#
# FUSIONFORGE
#
orig: # Make Debian package .orig tarball #
$(MAKE) $(TARBALLS)/$(ORIGFILE)
#
# PHPDOCUMENTOR
#
# Get phpdocumentor, install phpdocumentor, build $(PKGNAME) phpdoc
phpdoc: $(PKGDIR)/docs/phpdoc/docs
doc:
(cd src/docs/docbook ; make debian TARGET=$(CURDIR)/build/docs/docbook/)
cleandoc:
(cd src/docs/docbook ; make clean TARGET=$(CURDIR)/build/docs/docbook/)
phpdocumentor_get:
[ ! -f $(documentor_path)/$(documentor_file) ] && \
cd $(documentor_path) && \
wget $(documentor_url) || true
phpdocumentor_unpack: phpdocumentor_get
[ ! -d $(documentor_path)/$(documentor_subdir) ] && \
cd $(documentor_path) && \
tar -xvzf $(documentor_file) || true
$(documentor_path)/$(documentor_subdir)/patched: phpdocumentor_unpack
cd $(documentor_path)/$(documentor_subdir) && \
patch < $(CURDIR)/$(PKGDIR)/docs/phpdoc/phpDocumentor.ini.patch \
&& touch $(documentor_path)/$(documentor_subdir)/patched
$(PKGDIR)/docs/phpdoc/docs: $(documentor_path)/$(documentor_subdir)/patched
cd $(PKGDIR)/docs/phpdoc/ && ./makedoc.sh
#
# Build with cowbuilder or pbuilder
#
all: cleanorig cowbuilddeb cowbuildubu # ***** Build all package for debian and ubuntu ***** #
deploy: repodeb repoubu # ***** Deploy packages in Debian and Ubuntu repositories ***** #
repodeb: cowbuilddeb
@for dist in $(DEBIANLIST); do \
echo "$(MAKE) -f Makefile.debian localrepo reprepro XDISTRIB=$$dist LOCALREPO=$(LOCALREPODEB) DISTRIBLIST='$(DEBLIST)'" ; \
$(MAKE) -f Makefile.debian localrepo reprepro XDISTRIB=$$dist LOCALREPO=$(LOCALREPODEB) DISTRIBLIST="$(DEBLIST)" ; \
done
repoubu: cowbuildubu
@for dist in $(UBUNTULIST); do \
echo "$(MAKE) -f Makefile.debian localrepo reprepro XDISTRIB=$$dist LOCALREPO=$(LOCALREPOUBU) DISTRIBLIST='$(UBULIST)'" ; \
$(MAKE) -f Makefile.debian localrepo reprepro XDISTRIB=$$dist LOCALREPO=$(LOCALREPOUBU) DISTRIBLIST="$(UBULIST)" ; \
done
cowbuildtest:
@echo "Will build $(PKGNAME)_$(MAJOR)_$(MINOR)_$(DISTRIB)_$(ARCH)"
cowbuilddeb: # ***** This is the one to cowbuild debian packages ***** #
@for dist in $(DEBIANLIST); do \
echo "$(MAKE) -f Makefile.debian cowbuilddist XDISTRIB=$$dist DISTROOP='$(DEBIANOP)' HOOK='$(DEBHOOK)' LOCALREPO=$(LOCALREPODEB)" ; \
$(MAKE) -f Makefile.debian cowbuilddist XDISTRIB=$$dist DISTROOP="$(DEBIANOP)" HOOK='$(DEBHOOK)' LOCALREPO=$(LOCALREPODEB) ; \
done
cowbuildubu: # ***** This is the one to cowbuild ubuntu packages ***** #
@for dist in $(UBUNTULIST); do \
echo "$(MAKE) -f Makefile.debian cowbuilddist XDISTRIB=$$dist DISTROOP='$(UBUNTUOP)' HOOK='$(UBUHOOK)'" ; \
$(MAKE) -f Makefile.debian cowbuilddist XDISTRIB=$$dist DISTROOP="$(UBUNTUOP)" HOOK='$(UBUHOOK)' ; \
done
pbuilddeb: # pbuild debian packages (less recommended) #
@for dist in $(DEBIANLISTP); do \
echo "$(MAKE) -f Makefile.debian pbuilddist XDISTRIB=$$dist DISTROOP='$(DEBIANOP)' LOCALREPO=$(LOCALREPODEB)" ; \
$(MAKE) -f Makefile.debian pbuilddist XDISTRIB=$$dist DISTROOP="$(DEBIANOP)" LOCALREPO=$(LOCALREPODEB) ; \
done
pbuildubu: # pbuild ubuntu packages (less recommended) #
@for dist in $(UBUNTULISTP); do \
echo "$(MAKE) -f Makefile.debian pbuilddist XDISTRIB=$$dist DISTROOP='$(UBUNTUOP)' LOCALREPO=$(LOCALREPOUBU)" ; \
$(MAKE) -f Makefile.debian pbuilddist XDISTRIB=$$dist DISTROOP="$(UBUNTUOP)" LOCALREPO=$(LOCALREPOUBU) ; \
done
cowbuilddist: cowbuilderenv $(BUILDFILES) $(BUILDRESULT)/$(CHANGEFILE)
pbuilddist: pbuilderenv $(BUILDFILES) $(BUILDRESULT)/$(PCHANGEFILE)
$(BUILDRESULT)/$(CHANGEFILE): $(BUILDFILES)/$(DSCFILE)
@if [ -f $(LOCALREPO)/pool/main/$(PKGLETTER)/$(PKGNAME)/$(DSCFILE) ]; \
then echo "$@ already installed" ; \
else $(COWBUILDERCMD); fi
$(BUILDRESULT)/$(PCHANGEFILE): $(BUILDFILES)/$(PDSCFILE)
$(PBUILDERCMD)
$(BUILDFILES)/$(DSCFILE):
@echo "================> Have to cowbuild $@ <=================="
cd $(PKGDIR) ; debclean
find $(PKGDIR) -type f -or -type l | grep -v '/CVS/' | \
grep -v '/.svn/' | grep -v '/.testbox/' | \
grep -v rpm-specific | grep -v docs/phpdoc/docs | \
grep -v ^./debian/ | cpio -pdumB $(BUILDFILES)/
# Set version for given distrib
cd $(BUILDFILES)/$(PKGDIR); dch -b -v $(MAJOR)$(MINOR) -D UNRELEASED "This is $(DISTRIB)-$(ARCH) autobuild"
perl -pi -e "s/UNRELEASED/$(DISTRIB)/" $(BUILDFILES)/$(PKGDIR)/debian/changelog
cd $(BUILDFILES) ; dpkg-source -b $(PKGDIR)
rm -rf $(BUILDFILES)/$(PKGDIR)
$(BUILDFILES)/$(PDSCFILE):
@echo "================> Have to pbuild $@ <=================="
cd $(PKGDIR) ; debclean
find $(PKGDIR) -type f -or -type l | grep -v '/CVS/' | \
grep -v '/.svn/' | grep -v '/.testbox/' | \
grep -v rpm-specific | grep -v docs/phpdoc/docs | \
grep -v ^./debian/ | cpio -pdumB $(BUILDFILES)/
# Set version for given distrib
cd $(BUILDFILES)/$(PKGDIR); dch -b -v $(MAJOR)$(MINOR)+p -D UNRELEASED "This is $(DISTRIB)-$(ARCH) autobuild"
perl -pi -e "s/UNRELEASED/$(DISTRIB)/" $(BUILDFILES)/$(PKGDIR)/debian/changelog
cd $(BUILDFILES) ; dpkg-source -b $(PKGDIR)
rm -rf $(BUILDFILES)/$(PKGDIR)
$(BUILDFILES)/$(ORIGFILE): $(TARBALLS)/$(ORIGFILE)
cp $(TARBALLS)/$(ORIGFILE) $(BUILDFILES)
$(TARBALLS)/$(ORIGFILE): $(TARBALLS)
cd $(PKGDIR) ; debclean
find $(PKGDIR) -type f -or -type l | grep -v '/CVS/' | \
grep -v '/.svn/' | grep -v '/.testbox/' | \
grep -v rpm-specific | grep -v docs/phpdoc/docs | \
grep -v ^./debian/ | grep -v \\.jar$$ | \
grep -v \\.pdf$$ | grep -v plugins/fckeditor/www/_samples | \
grep -v plugins/wiki/www/lib/pear | \
cpio -o -H ustar | gzip > $(TARBALLS)/$(ORIGFILE)
pbuilderenv: $(PBUILDERTGZ) $(PBUILDERTGZ)/base-$(DISTRIB)-$(ARCH).tgz
@echo "=========> Ready for $(DISTRIB)-$(ARCH)"
cowbuilderenv: $(COWBUILDERBASE)/doconfig-$(ARCH) $(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).stamp.update
@echo "=========> Ready for $(DISTRIB)-$(ARCH)"
forceupdatecow: # Force update of cowbuilder env #
rm -f $(COWBUILDERBASE)/base-*.stamp.update
$(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).stamp.update: $(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).stamp
sudo /usr/sbin/cowbuilder --update $(HOOK) --distribution $(DISTRIB) --basepath $(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).cow --configfile $(COWBUILDERBASE)/configfile-$(ARCH) $(DISTROOP)
touch $@
$(PBUILDERTGZ)/base-$(DISTRIB)-$(ARCH).tgz: $(PBUILDERTGZ)/doconfig-$(ARCH)
[ -f $@ ] || sudo /usr/sbin/pbuilder --create --distribution $(DISTRIB) --basetgz $(PBUILDERTGZ)/base-$(DISTRIB).tgz --configfile $(PBUILDERTGZ)/configfile-$(ARCH) $(DISTROOP)
$(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).stamp: /usr/sbin/cowbuilder
[ -d $(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).cow ] || sudo /usr/sbin/cowbuilder --create $(HOOK) --distribution $(DISTRIB) --basepath $(COWBUILDERBASE)/base-$(DISTRIB)-$(ARCH).cow --configfile $(COWBUILDERBASE)/configfile-$(ARCH) $(DISTROOP)
touch [email protected]
touch $@
$(PBUILDERTGZ)/doconfig-$(ARCH): /usr/sbin/pbuilder
@mkdir -p $(PBUILDERTGZ)
@echo "APTCACHE=$(APTCACHE)" > $(PBUILDERTGZ)/configfile-$(ARCH)
@echo "BUILDPLACE=$(BUILDPLACE)" >> $(PBUILDERTGZ)/configfile-$(ARCH)
@echo "BUILDRESULT=$(BUILDRESULT)" >> $(PBUILDERTGZ)/configfile-$(ARCH)
$(COWBUILDERBASE)/doconfig-$(ARCH): /usr/sbin/cowbuilder
@mkdir -p $(COWBUILDERBASE)
@echo "APTCACHE=$(APTCACHE)" > $(COWBUILDERBASE)/configfile-$(ARCH)
@echo "BUILDPLACE=$(BUILDPLACE)" >> $(COWBUILDERBASE)/configfile-$(ARCH)
@echo "BUILDRESULT=$(BUILDRESULT)" >> $(COWBUILDERBASE)/configfile-$(ARCH)
/usr/sbin/pbuilder:
@echo "Error: you need to install package 'pbuilder', for instance with 'sudo apt-get install pbuilder'." ; /bin/false
ubukey:
gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -
/usr/sbin/cowbuilder:
@echo "Error: you need to install package 'cowdancer', for instance with 'sudo apt-get install cowdancer'." ; /bin/false
localrepo: $(LOCALREPO) $(LOCALREPO)/conf $(LOCALREPO)/conf/distributions
reprepro: $(LOCALREPO)/pool/main/$(PKGLETTER)/$(PKGNAME)/$(DSCFILE) # Install in repository
$(LOCALREPO)/pool/main/$(PKGLETTER)/$(PKGNAME)/$(DSCFILE): $(BUILDRESULT)/$(CHANGEFILE)
@if [ ! -f $@ ] ; then \
echo "Installing $(BUILDRESULT)/$(CHANGEFILE) in $@"; \
cd $(BUILDRESULT); reprepro $(ASKPASS) -Vb $(LOCALREPO) include $(DISTRIB) $(CHANGEFILE); \
else \
echo "$@ already installed" ; \
fi
$(LOCALREPO)/conf/distributions:
for xdist in $(DISTRIBLIST) ; do \
dist=`echo $$xdist | cut -c2-` ; \
echo "Codename: $$dist" ; \
echo "Suite: $$dist" ; \
echo "Components: main" ; \
echo "UDebComponents: main" ; \
echo "Architectures: amd64 i386 source" ; \
echo "Origin: $(ORIGIN)" ; \
echo "Version: 5.0" ; \
echo "Description: My $(FUSIONFORGE) $$dist repository" ; \
echo "SignWith: $(SIGNKEY)" ; \
echo "" ; done >> $(LOCALREPO)/conf/distributions
$(LOCALREPO)/conf:
mkdir $(LOCALREPO)/conf
$(TARBALLS):
mkdir -p $(TARBALLS)
$(BUILDFILES):
mkdir -p $(BUILDFILES)
$(COWBUILDERBASE):
mkdir -p $(COWBUILDERBASE)
$(PBUILDERTGZ):
mkdir -p $(PBUILDERTGZ)
$(LOCALREPO):
if [ -w `dirname $@` ] ; then mkdir $@ ; else sudo mkdir $@ ; sudo chown `id -u`.`id -g` $@; fi
clean: # Clean $(BUILDPLACE) $(BUILDFILES) $(TARBALLS) (intermediate files) #
rm -rf $(BUILDPLACE) $(BUILDFILES) $(TARBALLS)
cleanenv: # Clean $(COWBUILDERBASE) $(PBUILDERTGZ) (chroots)#
sudo rm -rf $(COWBUILDERBASE) $(PBUILDERTGZ)
cleancache: # Clean $(APTCACHE) (apt cache) #
sudo rm -rf $(APTCACHE)
cleanorig: # Clean $(TARBALLS)/$(ORIGFILE) #
rm -f $(TARBALLS)/$(ORIGFILE)
control:
cd src/packaging/control; $(MAKE)
gnupgkey:
echo '%echo Generating a standard key' > $(BOTKEY)
echo 'Key-Type: DSA' >> $(BOTKEY)
echo 'Key-Length: 1024' >> $(BOTKEY)
echo 'Subkey-Type: ELG-E' >> $(BOTKEY)
echo 'Subkey-Length: 1024' >> $(BOTKEY)
echo 'Name-Real: FusionForge Bot' >> $(BOTKEY)
echo 'Name-Comment: with stupid passphrase' >> $(BOTKEY)
echo 'Name-Email: $(DEBEMAIL)' >> $(BOTKEY)
echo 'Expire-Date: 0' >> $(BOTKEY)
echo '#Passphrase: abc' >> $(BOTKEY)
echo '#%pubring $(BOTKEY).pub' >> $(BOTKEY)
echo '#%secring $(BOTKEY).sec' >> $(BOTKEY)
echo '# Do a commit here, so that we can later print "done" :-)' >> $(BOTKEY)
echo '%commit' >> $(BOTKEY)
echo '%echo done' >> $(BOTKEY)
[ -d ~/.gnupg ] || gpg --batch --gen-key $(BOTKEY)
exportgnupgkey:
gpg --export --armor $(DEBEMAIL)