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