]> git.decadent.org.uk Git - dak.git/blob - debian/rules
Merge remote-tracking branch 'drkranz/new' into merge
[dak.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules file - for dak (0.0)
3 # Based on sample debian/rules file - for GNU Hello (1.3).
4 # Copyright 1994,1995 by Ian Jackson.
5 # Copyright 1998,1999,2000,2001,2002,2006 James Troup
6 # I hereby give you perpetual unlimited permission to copy,
7 # modify and relicense this file, provided that you do not remove
8 # my name from the file itself.  (I assert my moral right of
9 # paternity under the Copyright, Designs and Patents Act 1988.)
10 # This file may have to be extensively modified
11
12 PYTHONVER := `/usr/bin/python -c 'import sys;print sys.version[:3]'`
13
14 install_dir=install -d -m 755
15 install_file=install -m 644
16 install_script=install -m 755
17 install_binary=install -m 755 -s
18
19 build: build-stamp
20 build-stamp:
21         $(MAKE)
22         $(MAKE) -C docs
23         touch $@
24
25 clean: checkroot
26         $(checkdir)
27         -rm -rf debian/tmp debian/*~ debian/files* debian/substvars build-stamp
28         $(MAKE) clean
29
30 binary-indep: checkroot build
31         $(checkdir)
32         -rm -rf debian/tmp
33
34         $(install_dir) debian/tmp/DEBIAN/
35         $(install_script) debian/postinst debian/tmp/DEBIAN/
36
37         $(install_dir) debian/tmp/usr/lib/python/site-packages/dak/lib/
38
39         $(install_file) dak/*.py debian/tmp/usr/lib/python/site-packages/dak/
40         $(install_file) dak/lib/*.py debian/tmp/usr/lib/python/site-packages/dak/lib/
41
42
43         $(install_dir) debian/tmp/usr/bin/
44         $(install_script) dak/shell.py debian/tmp/usr/bin/dak
45
46         $(install_dir) -m 755 debian/tmp/usr/share/man/man1/
47         $(install_file) docs/manpages/*.1 debian/tmp/usr/share/man/man1/
48         gzip -9v debian/tmp/usr/share/man/man1/*
49
50         $(install_dir) -m 755 debian/tmp/etc/dak/
51
52         $(install_dir) debian/tmp/usr/share/doc/dak/
53         $(install_file) debian/changelog debian/tmp/usr/share/doc/dak/changelog.Debian
54         $(install_file) README NEWS THANKS TODO debian/tmp/usr/share/doc/dak/
55         $(install_file) docs/README* debian/tmp/usr/share/doc/dak/
56         $(install_file) ChangeLog debian/tmp/usr/share/doc/dak/changelog
57         gzip -9v debian/tmp/usr/share/doc/dak/*
58         $(install_file) debian/copyright debian/tmp/usr/share/doc/dak/
59
60         $(install_dir) debian/tmp/usr/share/doc/dak/examples/
61         $(install_file) examples/dak.conf debian/tmp/usr/share/doc/dak/examples/
62         # Hoho (err, rather: FIXME)
63         $(install_file) *.sql debian/tmp/usr/share/doc/dak/examples/
64         gzip -9v debian/tmp/usr/share/doc/dak/examples/*
65
66         dpkg-shlibdeps sql-aptvc.so
67         /usr/bin/python debian/python-dep >> debian/substvars
68         dpkg-gencontrol -isp
69         chown -R root.root debian/tmp
70         chmod -R go=rX debian/tmp
71         dpkg --build debian/tmp ..
72
73 binary-arch:
74
75 define checkdir
76         test -f dak/ls.py -a -f debian/rules
77 endef
78
79 # Below here is fairly generic really
80
81 binary:         binary-indep binary-arch
82
83 checkroot:
84         $(checkdir)
85         test root = "`whoami`"
86
87 .PHONY: binary binary-arch binary-indep clean checkroot