2 # debian/rules for t-prot package
5 TMP = $(CURDIR)/debian/$(PKG)
8 INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644
9 INSTALL_PROGRAM = $(INSTALL) -p -oroot -groot -m755
10 INSTALL_SCRIPT = $(INSTALL) -p -oroot -groot -m755
11 INSTALL_DIR = $(INSTALL) -p -d -oroot -groot -m755
17 -rm -rf $(TMP) debian/files
21 # uhm, build for a binary-indep package? Don't try to be funny ;)
29 cd $(TMP) && $(INSTALL_DIR) etc usr/bin usr/share/man/man1 \
30 usr/share/slrn/macros usr/share/doc/$(PKG)/examples
31 # usr/share/doc/$(PKG)/contrib
32 $(INSTALL_SCRIPT) t-prot $(TMP)/usr/bin
33 patch $(TMP)/usr/bin/t-prot \
34 contrib/t-prot-r*-mutt157.diff
35 -rm -f $(TMP)/usr/bin/t-prot.orig
36 $(INSTALL_FILE) t-prot.1 $(TMP)/usr/share/man/man1
37 $(INSTALL_FILE) debian/Muttrc.t-prot $(TMP)/etc
38 $(INSTALL_FILE) contrib/t-prot.sl $(TMP)/usr/share/slrn/macros
39 patch $(TMP)/usr/share/slrn/macros/t-prot.sl \
40 contrib/t-prot.sl-slang2.diff
41 -rm -f $(TMP)/usr/share/slrn/macros/t-prot.sl.orig
43 $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PKG)
44 #$(INSTALL_FILE) contrib/README.patches contrib/t-prot-r*-gol.diff \
45 # contrib/t-prot-r*-indentms.diff \
46 # $(TMP)/usr/share/doc/$(PKG)/contrib
47 cp -pR contrib/muttrc.t-prot contrib/filter_innd.pl \
48 contrib/README.examples debian/footers debian/README.footers \
49 $(TMP)/usr/share/doc/$(PKG)/examples
50 $(INSTALL_FILE) ChangeLog \
51 $(TMP)/usr/share/doc/$(PKG)/changelog
52 cd $(TMP)/usr/share && gzip -9 doc/$(PKG)/changelog \
54 find $(TMP) -print0 2>/dev/null | xargs -0r \
55 chown --no-dereference 0.0
56 find $(TMP) ! -type l -print0 2>/dev/null | xargs -0r \
60 binary-indep: build install
63 $(INSTALL_DIR) $(TMP)/DEBIAN
64 $(INSTALL_FILE) debian/copyright debian/README.Debian \
65 debian/NEWS.Debian $(TMP)/usr/share/doc/$(PKG)
66 $(INSTALL_FILE) debian/changelog \
67 $(TMP)/usr/share/doc/$(PKG)/changelog.Debian
68 cd $(TMP)/usr/share/doc/$(PKG) && gzip -9 \
69 changelog.Debian NEWS.Debian
70 $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \
72 po2debconf debian/templates > $(TMP)/DEBIAN/templates
73 $(INSTALL_FILE) debian/conffiles \
75 dpkg-gencontrol -ldebian/changelog -isp -p$(PKG) -P$(TMP)
76 cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
77 xargs -r0 md5sum > DEBIAN/md5sums
78 dpkg --build $(TMP) ..
81 binary-arch: build install
82 # We have nothing to do here.
85 binary: binary-indep binary-arch
93 test root = "`whoami`"
96 .PHONY: build clean binary-indep binary-arch binary install