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