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