Changelog update.
[debian_buildbot.git] / debian / rules
blobbd36f3bb4a1645e85dcfe3959022222282827401
1 #!/usr/bin/make -f
2 # -*- makefile -*-
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
7 BUILDMASTER_PKG_NAME = buildbot-master
8 BUILDMASTER_DIR = master
9 BUILDMASTER_TMP_DIR = debian/$(BUILDMASTER_PKG_NAME)
11 BUILDSLAVE_PKG_NAME = buildbot-slave
12 BUILDSLAVE_DIR = slave
13 BUILDSLAVE_TMP_DIR = debian/$(BUILDSLAVE_PKG_NAME)
15 test:
16 echo "Tests temporary disabled"
17 #(cd $(BUILDMASTER_DIR) && python setup.py test)
19 build: build-stamp
21 build-stamp:
22 dh_testdir
23 (cd $(BUILDMASTER_DIR) && python setup.py build)
24 (cd $(BUILDSLAVE_DIR) && python setup.py build)
25 make -C master/docs buildbot.info buildbot.html
26 touch build-stamp
28 clean:
29 dh_testdir
30 dh_testroot
31 rm -f build-stamp
32 rm -f master/docs/buildbot.html master/docs/buildbot.info* master/docs/version.texinfo
33 rm -fR master/build master/buildbot.egg-info
34 rm -fR slave/build slave/buildbot_slave.egg-info
35 -find -name '*.py[co]' | xargs rm -f
36 dh_clean
38 install: build test
39 dh_testdir
40 dh_testroot
41 dh_clean -k
42 dh_installdirs
43 dh_install
44 (cd $(BUILDSLAVE_DIR) && python setup.py install \
45 --root=../$(BUILDSLAVE_TMP_DIR) \
46 --install-layout=deb --no-compile)
47 (cd $(BUILDMASTER_DIR) && python setup.py install \
48 --root=../$(BUILDMASTER_TMP_DIR) \
49 --install-layout=deb --no-compile)
50 -find debian -name '*.py[co]' | xargs rm -f
52 : # Replace all '#!' calls to python with /usr/bin/python
53 : # and make them executable
54 for i in `find $(BUILDMASTER_TMP_DIR) $(BUILDSLAVE_TMP_DIR) -type f`; do \
55 sed '1s,#!.*[pj]ython[^ ]*\(.*\),#! /usr/bin/python\1,' \
56 $$i > $$i.temp; \
57 if cmp --quiet $$i $$i.temp; then \
58 rm -f $$i.temp; \
59 else \
60 mv -f $$i.temp $$i; \
61 chmod 755 $$i; \
62 echo "fixed interpreter: $$i"; \
63 fi; \
64 done
66 # Remove VCS special files
67 find $(BUILDMASTER_TMP_DIR) $(BUILDSLAVE_TMP_DIR) -type f -name .gitignore -prune
70 # Build architecture-independent files here.
71 binary-indep: build install
72 dh_testdir
73 dh_testroot
74 dh_installchangelogs -A
75 dh_installdocs --exclude=gitignore
76 dh_installexamples
77 dh_installinfo
78 dh_installinit --no-restart-on-upgrade --no-start
79 dh_installman
80 dh_link
81 dh_compress
83 # Remove VCS special files
84 find $(BUILDMASTER_TMP_DIR) $(BUILDSLAVE_TMP_DIR) -type f -name .gitignore -prune
86 dh_fixperms
87 dh_pycentral
88 dh_installdeb
89 dh_gencontrol
90 dh_md5sums
91 dh_builddeb
93 # Build architecture-dependent files here.
94 binary-arch: build install
95 # We have nothing to do by default.
97 binary: binary-indep binary-arch
98 .PHONY: build clean binary-indep binary-arch binary install