2 # debian/rules for t-prot package
3 # Copyright 2002-2012 by Gerfried Fuchs <rhonda@debian.org>
4 # Licenced under WTFPLv2
7 TMP = $(CURDIR)/debian/$(PKG)
8 BUILD_DATE = $(shell dpkg-parsechangelog --show-field Date)
11 INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644
12 INSTALL_PROGRAM = $(INSTALL) -p -oroot -groot -m755
13 INSTALL_SCRIPT = $(INSTALL) -p -oroot -groot -m755
14 INSTALL_DIR = $(INSTALL) -p -d -oroot -groot -m755
20 -rm -rf $(TMP) debian/files debian/stamp-*
21 $(MAKE) -f /usr/share/quilt/quilt.make unpatch
23 build: build-arch build-indep
24 build-arch: debian/stamp-build
25 build-indep: debian/stamp-build
27 # only thing to do is apply the patches ...
28 $(MAKE) -f /usr/share/quilt/quilt.make patch
29 touch debian/stamp-build
32 install: debian/stamp-install
33 debian/stamp-install: build
38 cd $(TMP) && $(INSTALL_DIR) etc/t-prot/footers etc/t-prot/ads \
39 usr/bin usr/share/man/man1 usr/share/slrn/macros \
40 usr/share/doc/$(PKG)/examples
41 # usr/share/doc/$(PKG)/contrib
42 $(INSTALL_SCRIPT) t-prot $(TMP)/usr/bin
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
48 $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PKG)
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 -n9 doc/$(PKG)/changelog \
60 $(INSTALL_DIR) $(TMP)/DEBIAN
61 $(INSTALL_FILE) debian/copyright debian/README.Debian \
62 $(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 -n9 \
67 $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \
69 po2debconf debian/templates > $(TMP)/DEBIAN/templates
70 $(INSTALL_FILE) debian/conffiles \
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 find $(TMP) -depth -newermt '$(BUILD_DATE)' -print0 | \
76 xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
77 dpkg --build $(TMP) ..
81 # We have nothing to do here.
92 test root = "`whoami`"
95 .PHONY: build clean binary-indep binary-arch binary install