]> git.deb.at Git - pkg/t-prot.git/blob - debian/rules
Imported Debian patch 2.5-1
[pkg/t-prot.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for t-prot package
3 # (c) 2002-2007 by Gerfried Fuchs <rhonda@debian.at>
4 # Licenced in the same way as t-prot itself
5
6 PKG = t-prot
7 TMP = $(CURDIR)/debian/$(PKG)
8
9 INSTALL = install
10 INSTALL_FILE    = $(INSTALL) -p    -oroot -groot -m644
11 INSTALL_PROGRAM = $(INSTALL) -p    -oroot -groot -m755
12 INSTALL_SCRIPT  = $(INSTALL) -p    -oroot -groot -m755
13 INSTALL_DIR     = $(INSTALL) -p -d -oroot -groot -m755
14
15
16 clean:
17         $(checkdir)
18         $(checkroot)
19         -rm -rf $(TMP) debian/files
20
21
22 build:
23         # uhm, build for a binary-indep package?  Don't try to be funny ;)
24
25
26 install: build
27         $(checkdir)
28         $(checkroot)
29         -rm -rf $(TMP)
30         $(INSTALL_DIR) $(TMP)
31         cd $(TMP) && $(INSTALL_DIR) etc/t-prot/footers etc/t-prot/ads \
32                 usr/bin usr/share/man/man1 usr/share/slrn/macros \
33                 usr/share/doc/$(PKG)/examples
34         #       usr/share/doc/$(PKG)/contrib
35         $(INSTALL_SCRIPT) t-prot   $(TMP)/usr/bin
36         patch $(TMP)/usr/bin/t-prot \
37                 contrib/t-prot-r*-mutt15*.diff
38         -rm -f $(TMP)/usr/bin/t-prot.orig
39         $(INSTALL_FILE)   t-prot.1 $(TMP)/usr/share/man/man1
40         $(INSTALL_FILE) debian/Muttrc     $(TMP)/etc/t-prot
41         $(INSTALL_FILE) debian/footers/*  $(TMP)/etc/t-prot/footers
42         $(INSTALL_FILE) contrib/t-prot.sl $(TMP)/usr/share/slrn/macros
43         patch $(TMP)/usr/share/slrn/macros/t-prot.sl \
44                 contrib/t-prot.sl-slang2.diff
45         -rm -f $(TMP)/usr/share/slrn/macros/t-prot.sl.orig
46
47         $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PKG)
48         #$(INSTALL_FILE) contrib/README.patches contrib/t-prot-r*-gol.diff \
49         #       contrib/t-prot-r*-indentms.diff \
50         #       $(TMP)/usr/share/doc/$(PKG)/contrib
51         $(INSTALL_FILE) contrib/filter_innd.pl contrib/README.examples \
52                 $(TMP)/usr/share/doc/$(PKG)/examples
53         $(INSTALL_FILE) ChangeLog \
54                 $(TMP)/usr/share/doc/$(PKG)/changelog
55         cd $(TMP)/usr/share && gzip -9 doc/$(PKG)/changelog \
56                 man/man1/t-prot.1
57
58
59 binary-indep: build install
60         $(checkdir)
61         $(checkroot)
62         $(INSTALL_DIR) $(TMP)/DEBIAN
63         $(INSTALL_FILE) debian/copyright debian/README.Debian \
64                 debian/NEWS.Debian $(TMP)/usr/share/doc/$(PKG)
65         $(INSTALL_FILE) debian/changelog \
66                 $(TMP)/usr/share/doc/$(PKG)/changelog.Debian
67         cd $(TMP)/usr/share/doc/$(PKG) && gzip -9 \
68                 changelog.Debian NEWS.Debian
69         $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \
70                 $(TMP)/DEBIAN
71         po2debconf debian/templates > $(TMP)/DEBIAN/templates
72         $(INSTALL_FILE) debian/conffiles \
73                 $(TMP)/DEBIAN
74         dpkg-gencontrol -ldebian/changelog -isp -p$(PKG) -P$(TMP)
75         cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
76                 xargs -r0 md5sum > DEBIAN/md5sums
77         dpkg --build $(TMP) ..
78
79
80 binary-arch: build install
81         # We have nothing to do here.
82
83
84 binary: binary-indep binary-arch
85
86
87 define checkdir
88         test -f debian/rules
89 endef
90
91 define checkroot
92         test root = "`whoami`"
93 endef
94
95 .PHONY: build clean binary-indep binary-arch binary install