X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Frules;h=ed79cf847f29bd62dacabf159234278bd26d7282;hb=92890547320a687838b916e415cd189564aa044f;hp=249f0d8c481fa6d7cf3fed16b3200b4ba850b996;hpb=625b04eb3712f6646ebfa62ffb038d523df9a4e6;p=pkg%2Ft-prot.git diff --git a/debian/rules b/debian/rules index 249f0d8..ed79cf8 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,11 @@ #!/usr/bin/make -f # debian/rules for t-prot package -# (c) 2002-2007 by Gerfried Fuchs -# Licenced in the same way as t-prot itself +# Copyright 2002-2012 by Rhonda D'Vine +# Licenced under WTFPLv2 PKG = t-prot TMP = $(CURDIR)/debian/$(PKG) +BUILD_DATE = $(shell dpkg-parsechangelog --show-field Date) INSTALL = install INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644 @@ -16,14 +17,20 @@ INSTALL_DIR = $(INSTALL) -p -d -oroot -groot -m755 clean: $(checkdir) $(checkroot) - -rm -rf $(TMP) debian/files + -rm -rf $(TMP) debian/files debian/stamp-* + $(MAKE) -f /usr/share/quilt/quilt.make unpatch +build: build-arch build-indep +build-arch: debian/stamp-build +build-indep: debian/stamp-build +debian/stamp-build: + # only thing to do is apply the patches ... + $(MAKE) -f /usr/share/quilt/quilt.make patch + touch debian/stamp-build -build: - # uhm, build for a binary-indep package? Don't try to be funny ;) - -install: build +install: debian/stamp-install +debian/stamp-install: build $(checkdir) $(checkroot) -rm -rf $(TMP) @@ -33,39 +40,30 @@ install: build 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 \ + cd $(TMP)/usr/share && gzip -n9 doc/$(PKG)/changelog \ man/man1/t-prot.1 -binary-indep: build install +binary-indep: install $(checkdir) $(checkroot) $(INSTALL_DIR) $(TMP)/DEBIAN $(INSTALL_FILE) debian/copyright debian/README.Debian \ - debian/NEWS.Debian $(TMP)/usr/share/doc/$(PKG) + $(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 + cd $(TMP)/usr/share/doc/$(PKG) && gzip -n9 \ + changelog.Debian $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \ $(TMP)/DEBIAN po2debconf debian/templates > $(TMP)/DEBIAN/templates @@ -74,14 +72,20 @@ binary-indep: build install dpkg-gencontrol -ldebian/changelog -isp -p$(PKG) -P$(TMP) cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ xargs -r0 md5sum > DEBIAN/md5sums + # Make build reproducible: + # Hardcode permissions for files created by output redirection + chmod 644 $(TMP)/DEBIAN/md5sums $(TMP)/DEBIAN/templates + # Set timestamp of all files to timestamp in debian/changelog entry + find $(TMP) -depth -newermt '$(BUILD_DATE)' -print0 | \ + xargs -0r touch --no-dereference --date='$(BUILD_DATE)' dpkg --build $(TMP) .. -binary-arch: build install +binary-arch: # We have nothing to do here. -binary: binary-indep binary-arch +binary: binary-indep define checkdir