X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=debian%2Frules;fp=debian%2Frules;h=b6de4d8b5efd35464eca4a6cd4e5f50113bff6ec;hb=a6c12e50628dd71ecc46e1724d1912689540f359;hp=0000000000000000000000000000000000000000;hpb=3319969a89bb47afbd35da55d8c0d62a33be9ca7;p=pkg%2Ft-prot.git diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b6de4d8 --- /dev/null +++ b/debian/rules @@ -0,0 +1,94 @@ +#!/usr/bin/make -f +# debian/rules for t-prot package + +PACKAGE = t-prot +TMP = $(CURDIR)/debian/$(PACKAGE) + +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 + + +clean: + $(checkdir) + $(checkroot) + -rm -rf $(TMP) debian/files + + +build: + # uhm, build for a binary-indep package? Don't try to be funny ;) + + +install: build + $(checkdir) + $(checkroot) + -rm -rf $(TMP) + $(INSTALL_DIR) $(TMP) + cd $(TMP) && $(INSTALL_DIR) etc usr/bin usr/share/man/man1 \ + usr/share/slrn/macros usr/share/doc/$(PACKAGE)/examples + # usr/share/doc/$(PACKAGE)/contrib + $(INSTALL_SCRIPT) t-prot $(TMP)/usr/bin + cd $(TMP)/usr/bin/ && patch t-prot \ + $(TMP)/../../contrib/t-prot-r*-mutt156.diff + cd $(TMP)/usr/bin/ && patch t-prot \ + $(TMP)/../../contrib/t-prot-r*-gpg125.diff + rm $(TMP)/usr/bin/t-prot.orig + $(INSTALL_FILE) t-prot.1 $(TMP)/usr/share/man/man1 + $(INSTALL_FILE) debian/Muttrc.t-prot $(TMP)/etc + $(INSTALL_FILE) contrib/t-prot.sl $(TMP)/usr/share/slrn/macros + + $(INSTALL_FILE) BUGS TODO README $(TMP)/usr/share/doc/$(PACKAGE) + #$(INSTALL_FILE) contrib/README.patches contrib/t-prot-r*-gol.diff \ + # contrib/t-prot-r*-indentms.diff \ + # $(TMP)/usr/share/doc/$(PACKAGE)/contrib + cp -pR contrib/muttrc.t-prot contrib/filter_innd.pl debian/footers \ + debian/README.footers \ + $(TMP)/usr/share/doc/$(PACKAGE)/examples + $(INSTALL_FILE) ChangeLog \ + $(TMP)/usr/share/doc/$(PACKAGE)/changelog + cd $(TMP)/usr/share && gzip -9 doc/$(PACKAGE)/changelog \ + man/man1/t-prot.1 + find $(TMP) -print0 2>/dev/null | xargs -0r \ + chown --no-dereference 0.0 + find $(TMP) ! -type l -print0 2>/dev/null | xargs -0r \ + chmod go=rX,u+rw,a-s + + +binary-indep: build install + $(checkdir) + $(checkroot) + $(INSTALL_DIR) $(TMP)/DEBIAN + $(INSTALL_FILE) debian/copyright debian/README.Debian \ + debian/NEWS.Debian $(TMP)/usr/share/doc/$(PACKAGE) + $(INSTALL_FILE) debian/changelog \ + $(TMP)/usr/share/doc/$(PACKAGE)/changelog.Debian + cd $(TMP)/usr/share/doc/$(PACKAGE) && gzip -9 \ + changelog.Debian NEWS.Debian + $(INSTALL_SCRIPT) debian/postinst \ + $(TMP)/DEBIAN + $(INSTALL_FILE) debian/conffiles \ + $(TMP)/DEBIAN + dpkg-gencontrol -ldebian/changelog -isp -p$(PACKAGE) -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