File: rules-buildd

package info (click to toggle)
sbuild 0.60.0-2squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,136 kB
  • ctags: 640
  • sloc: perl: 14,039; sh: 1,173; sql: 772; makefile: 406
file content (131 lines) | stat: -rwxr-xr-x 4,911 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# debian/rules file - for wanna-build.
# Based on sample debian/rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# Copyright 1998,1999 by James Troup.
# Copyright 2004,2005 by Ryan Murray.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
#
# $Id$

STRIP=strip --remove-section=.comment --remove-section=.note

build:
	$(checkdir)
	$(MAKE)
	touch build

clean:
	$(checkdir)
	$(MAKE) clean
	-rm -f build buildd-mail-wrapper wanna-build-mail *~
	-rm -rf debian/tmp/ debian/*~ debian/files debian/substvars

binary-arch: binary-buildd binary-wanna-build

binary-buildd: checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp/DEBIAN
	install -m 755 debian/buildd.postinst debian/tmp/DEBIAN/postinst

	install -d debian/tmp/usr/bin
	install -m 755 buildd buildd-mail buildd-mail-wrapper buildd-uploader \
		buildd-watcher debian/tmp/usr/bin
	$(STRIP) debian/tmp/usr/bin/buildd-mail-wrapper
	install -m 755 buildd-vlog debian/tmp/usr/bin/buildd-vlog
	install -m 755 buildd-abort debian/tmp/usr/bin/buildd-abort
	install -m 755 buildd-update-chroots debian/tmp/usr/bin/buildd-update-chroots

	install -d debian/tmp/etc/cron.d
	install -m 644 buildd.conf.global debian/tmp/etc

	install -d debian/tmp/usr/share/perl5/
	install -m 644 Buildd.pm debian/tmp/usr/share/perl5/

	install -d debian/tmp/usr/share/emacs/site-lisp
	install -m 644 buildd-reply.el debian/tmp/usr/share/emacs/site-lisp/
	# XXX: still need /usr/lib/emacsen-common/packages/{install,remove} !

	install -d debian/tmp/usr/share/man/man1/
	install -m 644 buildd.1 buildd-mail-wrapper.1 buildd-uploader.1 \
		debian/tmp/usr/share/man/man1	
	gzip -9v debian/tmp/usr/share/man/man1/*

	install -d debian/tmp/usr/share/doc/buildd/examples
	install -m 644 README.buildd-admin debian/tmp/usr/share/doc/buildd/README.admin
	install -m 644 crontab debian/tmp/usr/share/doc/buildd/examples/crontab
	install -m 644 NEWS debian/tmp/usr/share/doc/buildd/changelog
	install -m 644 buildd.conf debian/tmp/usr/share/doc/buildd/examples
	install -m 644 setup_system debian/tmp/usr/share/doc/buildd/examples/buildd-setup-system
	install -m 644 debian/changelog debian/tmp/usr/share/doc/buildd/changelog.Debian
	find debian/tmp/usr/share/doc/buildd/ -type f | xargs gzip -9v
	install -m 644 debian/copyright debian/tmp/usr/share/doc/buildd/

	dpkg-shlibdeps buildd-mail-wrapper
	dpkg-gencontrol -pbuildd -isp
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

binary-wanna-build: checkroot
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp/DEBIAN

	install -d debian/tmp/usr/bin/wb-short
	install -m 755 wanna-build wanna-build-mail wanna-build-mail.pl \
		wanna-build-statistics check-old-builds do-merge-packages \
		do-merge-quinn debian/tmp/usr/bin 
	$(STRIP) debian/tmp/usr/bin/wanna-build-mail
	install -m 755 wanna-build-catdb debian/tmp/usr/bin/wanna-build-catdb
	ln -s wanna-build-catdb debian/tmp/usr/bin/wanna-build-catgdbm
	set -e; for link in dep-wait-build failed-build forget-build \
	                    give-back-build merge-packages merge-quinn \
	                    no-build uploaded-build list-all list-building \
	                    list-dep-wait list-failed list-installed \
	                    list-needs-build list-not-for-us list-uploaded; do \
		ln -s ../wanna-build debian/tmp/usr/bin/wb-short/$$link; \
	done
	ln -s ../wanna-build-catdb debian/tmp/usr/bin/wb-short/catdb
	ln -s ../wanna-build-catgdbm debian/tmp/usr/bin/wb-short/catgdbm

	install -d debian/tmp/etc/buildd
	install -m 644 wanna-build.conf debian/tmp/etc/buildd

	install -d debian/tmp/usr/share/perl5/WannaBuild
	install -m 644 WannaBuild.pm debian/tmp/usr/share/perl5/
	install -m 644 WannaBuild/Conf.pm debian/tmp/usr/share/perl5/WannaBuild

	install -d debian/tmp/usr/share/doc/wanna-build/
	install -m 644 README README.mail README.failcat debian/tmp/usr/share/doc/wanna-build/
	install -m 644 NEWS debian/tmp/usr/share/doc/wanna-build/changelog
	install -m 644 debian/changelog debian/tmp/usr/share/doc/wanna-build/changelog.Debian
	find debian/tmp/usr/share/doc/wanna-build/ -type f | xargs gzip -9v
	install -m 644 debian/copyright debian/tmp/usr/share/doc/wanna-build/

	dpkg-shlibdeps wanna-build-mail
	dpkg-gencontrol -pwanna-build -isp
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f buildd-mail-wrapper.c -a -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot