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