]> git.deb.at Git - pkg/t-prot.git/blob - debian/rules
0f8bd08c719303173d40028afd311c8c94ca8fa1
[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
21 build: build-arch build-indep
22 build-arch: debian/stamp-build
23 build-indep: debian/stamp-build
24 debian/stamp-build:
25         # only thing to do is apply the patches ...
26         touch debian/stamp-build
27
28
29 install: debian/stamp-install
30 debian/stamp-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         $(INSTALL_FILE)   t-prot.1 $(TMP)/usr/share/man/man1
41         $(INSTALL_FILE) debian/Muttrc     $(TMP)/etc/t-prot
42         $(INSTALL_FILE) debian/footers/*  $(TMP)/etc/t-prot/footers
43         $(INSTALL_FILE) contrib/t-prot.sl $(TMP)/usr/share/slrn/macros
44
45         $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PKG)
46         $(INSTALL_FILE) contrib/filter_innd.pl contrib/README.examples \
47                 $(TMP)/usr/share/doc/$(PKG)/examples
48         $(INSTALL_FILE) ChangeLog \
49                 $(TMP)/usr/share/doc/$(PKG)/changelog
50         cd $(TMP)/usr/share && gzip -9 doc/$(PKG)/changelog \
51                 man/man1/t-prot.1
52
53
54 binary-indep: install
55         $(checkdir)
56         $(checkroot)
57         $(INSTALL_DIR) $(TMP)/DEBIAN
58         $(INSTALL_FILE) debian/copyright debian/README.Debian \
59                 $(TMP)/usr/share/doc/$(PKG)
60         $(INSTALL_FILE) debian/changelog \
61                 $(TMP)/usr/share/doc/$(PKG)/changelog.Debian
62         cd $(TMP)/usr/share/doc/$(PKG) && gzip -9 \
63                 changelog.Debian
64         $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \
65                 $(TMP)/DEBIAN
66         po2debconf debian/templates > $(TMP)/DEBIAN/templates
67         $(INSTALL_FILE) debian/conffiles \
68                 $(TMP)/DEBIAN
69         dpkg-gencontrol -ldebian/changelog -isp -p$(PKG) -P$(TMP)
70         cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
71                 xargs -r0 md5sum > DEBIAN/md5sums
72         dpkg --build $(TMP) ..
73
74
75 binary-arch:
76         # We have nothing to do here.
77
78
79 binary: binary-indep
80
81
82 define checkdir
83         test -f debian/rules
84 endef
85
86 define checkroot
87         test root = "`whoami`"
88 endef
89
90 .PHONY: build clean binary-indep binary-arch binary install