~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/buildd/debian/rules

  • Committer: Brad Crittenden
  • Date: 2011-11-17 19:41:24 UTC
  • mto: This revision was merged to the branch mainline in revision 14317.
  • Revision ID: bac@canonical.com-20111117194124-x834v6jscsknkl6y
RevertĀ 14311

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
#
 
3
# Copyright 2009, 2010 Canonical Ltd.  This software is licensed under the
 
4
# GNU Affero General Public License version 3 (see the file LICENSE).
 
5
 
 
6
export DH_OPTIONS
 
7
 
 
8
# This is an incomplete debian rules file for making the launchpad-buildd deb
 
9
# Only ever invoke this as debian/rules package, which will build the source
 
10
# package in the parent directory, after copying in the files that live above
 
11
# this directory, so that the source package is valid.
 
12
# after that, build the source package found in the parent directory.
 
13
 
 
14
target = debian/launchpad-buildd
 
15
topdir = ../../..
 
16
 
 
17
buildd = $(topdir)/lib/canonical/buildd
 
18
 
 
19
targetshare = $(target)/usr/share/launchpad-buildd
 
20
pytarget = $(targetshare)/canonical/buildd
 
21
 
 
22
pyfiles = debian.py slave.py binarypackage.py utils.py __init__.py \
 
23
    sourcepackagerecipe.py translationtemplates.py
 
24
slavebins = unpack-chroot mount-chroot update-debian-chroot sbuild-package \
 
25
    scan-for-processes umount-chroot remove-build override-sources-list \
 
26
    buildrecipe generate-translation-templates
 
27
 
 
28
BUILDDUID=65500
 
29
BUILDDGID=65500
 
30
 
 
31
install: DH_OPTIONS=-plaunchpad-buildd
 
32
install:
 
33
        dh_testdir
 
34
        dh_clean
 
35
        dh_testroot
 
36
        dh_installdirs usr/bin etc usr/share/launchpad-buildd/slavebin \
 
37
          usr/share/launchpad-buildd/canonical/buildd \
 
38
          var/run/launchpad-buildd var/log/launchpad-buildd  \
 
39
          etc/launchpad-buildd \
 
40
          usr/share/launchpad-buildd/canonical/launchpad/daemons \
 
41
          usr/share/doc/launchpad-buildd
 
42
        dh_installexamples
 
43
 
 
44
        # Do installs here
 
45
        touch $(pytarget)/../launchpad/__init__.py
 
46
        touch $(pytarget)/../launchpad/daemons/__init__.py
 
47
        install -m644 buildd-slave.tac $(targetshare)/buildd-slave.tac
 
48
        cp -r pottery $(pytarget)
 
49
        for pyfile in $(pyfiles); do \
 
50
          install -m644 ./$$pyfile $(pytarget)/$$pyfile; \
 
51
          done
 
52
        for slavebin in $(slavebins); do \
 
53
          install -m755 ./$$slavebin $(targetshare)/slavebin/$$slavebin; \
 
54
        done
 
55
        install -m755 ./sbuild $(target)/usr/bin/sbuild
 
56
        touch $(targetshare)/canonical/__init__.py
 
57
        install -m644 template-buildd-slave.conf $(targetshare)/template-buildd-slave.conf
 
58
        install -m755 buildd-config.py $(target)/usr/bin/buildd-genconfig
 
59
        install -m644 sbuildrc $(targetshare)/sbuildrc
 
60
        install -m644 sbuild.conf $(target)/etc/sbuild.conf
 
61
        install -m755 debian/upgrade-config $(targetshare)/upgrade-config
 
62
        install -m755 check-implicit-pointer-functions $(target)/usr/bin/check-implicit-pointer-functions
 
63
        # Okay, that's installed all the slave-related files
 
64
 
 
65
 
 
66
binary-arch:
 
67
        @echo No arch-specific binaries to make
 
68
 
 
69
binary-indep: DH_OPTIONS=-plaunchpad-buildd
 
70
binary-indep: install
 
71
        dh_installdocs
 
72
        dh_installchangelogs
 
73
        dh_installinit
 
74
        dh_installcron
 
75
        dh_strip
 
76
        dh_compress
 
77
        dh_fixperms
 
78
        dh_installdeb
 
79
        dh_gencontrol
 
80
        dh_md5sums
 
81
        dh_builddeb
 
82
 
 
83
binary: binary-indep
 
84
 
 
85
.PHONY: binary binary-indep binary-arch install clean build
 
86
 
 
87
clean:
 
88
        dh_clean
 
89
 
 
90
prepare:
 
91
 
 
92
package: prepare
 
93
        debuild -uc -us -S
 
94
 
 
95
build:
 
96
        @echo Mmm builders