r1: [svn-inject] Installing original source of carnet-keyring
[carnet-keyring.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules file - for debian/keyring
3 # Based on sample debian/rules file - for GNU Hello (1.3).
4 # Copyright 1994,1995 by Ian Jackson.
5 # Copyright 1998-2003 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 install_dir=install -d -m 755
13 install_file=install -m 644
14 install_script=install -m 755
15 install_binary=install -m 755 -s
16
17 VERSION := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
18
19 build:
20
21 clean:
22         $(checkdir)
23         -rm -f foo foo.asc *.bak *~ */*~ debian/files* debian/*substvars
24         -rm -rf debian/tmp
25
26 binary-indep: checkroot
27         $(checkdir)
28         -rm -rf debian/tmp
29         $(install_dir) debian/tmp/DEBIAN/
30         $(install_script) debian/postinst debian/tmp/DEBIAN/
31         $(install_script) debian/prerm debian/tmp/DEBIAN/
32
33         $(install_dir) debian/tmp/usr/share/keyrings/
34         $(install_file) keyrings/carnet-keyring.gpg debian/tmp/usr/share/keyrings/
35         $(install_file) keyrings/carnet-removed-keys.gpg debian/tmp/usr/share/keyrings/
36
37         $(install_dir) debian/tmp/usr/share/doc/carnet-keyring/
38         $(install_file) debian/changelog debian/tmp/usr/share/doc/carnet-keyring/changelog
39
40         dpkg-gencontrol -pcarnet-keyring -isp
41         chown -R root.root debian/tmp
42         chmod -R go=rX debian/tmp
43         dpkg --build debian/tmp ..
44
45 binary-arch:
46
47 #define checkdir
48 #       test -f keyrings/carnet-keyring.gpg
49 #       test -f keyrings/carnet-removed-keys.gpg
50 #endef
51
52 # Below here is fairly generic really
53
54 binary:         binary-indep binary-arch
55
56 checkroot:
57         $(checkdir)
58         test root = "`whoami`"
59
60 .PHONY: binary binary-arch binary-indep clean checkroot