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