]> git.deb.at Git - pkg/t-prot.git/blob - debian/rules
Imported Debian patch 0.54.1-1.woody1
[pkg/t-prot.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for t-prot package
3
4 clean:
5         $(checkdir)
6         $(checkroot)
7         -rm -rf debian/t-prot debian/files
8
9
10 build:
11 # uhm, build for a binary-indep package?  Don't try to be funny ;)
12
13
14 install: build
15         $(checkdir)
16         $(checkroot)
17         -rm -rf debian/t-prot
18         mkdir -m755 debian/t-prot
19         cd debian/t-prot && mkdir -m755 -p etc usr/bin usr/share/man/man1 \
20                 usr/share/doc/t-prot/examples
21         install -m644 -p debian/Muttrc.t-prot \
22                 debian/t-prot/etc
23         install -m755 -p t-prot \
24                 debian/t-prot/usr/bin
25         install -m644 -p t-prot.1 \
26                 debian/t-prot/usr/share/man/man1
27         install -m644 -p BUGS TODO contrib/README.patches \
28                 contrib/t-prot-r*-debug.diff contrib/t-prot-r*-ftr.diff \
29                 README debian/t-prot/usr/share/doc/t-prot
30         cp -pR muttrc.t-prot debian/footers debian/README.footers \
31                 debian/t-prot/usr/share/doc/t-prot/examples
32         install -m644 -p ChangeLog \
33                 debian/t-prot/usr/share/doc/t-prot/changelog
34         gzip -9 debian/t-prot/usr/share/doc/t-prot/changelog \
35                 debian/t-prot/usr/share/man/man1/t-prot.1 \
36                 debian/t-prot/usr/share/doc/t-prot/t-prot-r*-debug.diff
37         find debian/t-prot -print0 2>/dev/null | xargs -0r \
38                 chown --no-dereference 0.0
39         find debian/t-prot ! -type l -print0 2>/dev/null | xargs -0r \
40                 chmod go=rX,u+rw,a-s
41
42
43 binary-indep: build install
44         $(checkdir)
45         $(checkroot)
46         mkdir -m755 -p debian/t-prot/DEBIAN
47         install -m644 -p debian/copyright debian/README.Debian \
48                 debian/t-prot/usr/share/doc/t-prot
49         install -m644 -p debian/changelog \
50                 debian/t-prot/usr/share/doc/t-prot/changelog.Debian
51         gzip -9 debian/t-prot/usr/share/doc/t-prot/changelog.Debian
52         install -m755 -p debian/postinst debian/prerm debian/postrm \
53                 debian/config debian/t-prot/DEBIAN
54         install -m644 -p debian/conffiles \
55                 debian/t-prot/DEBIAN
56         debconf-mergetemplate debian/templates debian/templates.* \
57                 > debian/t-prot/DEBIAN/templates
58         dpkg-gencontrol -ldebian/changelog -isp -pt-prot -Pdebian/t-prot
59         cd debian/t-prot && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
60                 xargs -r0 md5sum > DEBIAN/md5sums
61         dpkg --build debian/t-prot ..
62
63
64 binary-arch: build install
65 # We have nothing to do here.
66
67
68 define checkdir
69         test -f debian/rules
70 endef
71
72 define checkroot
73         test root = "`whoami`"
74 endef
75
76 binary: binary-indep binary-arch
77 .PHONY: build clean binary-indep binary-arch binary install