]> git.deb.at Git - pkg/t-prot.git/blobdiff - debian/rules
New upstream release; drop no more needed patches
[pkg/t-prot.git] / debian / rules
index bd83c2845aae70b6474a67966b6f28c603cb8697..1c075f50f7633a62eff0223f072156d6fe086dab 100755 (executable)
@@ -1,8 +1,10 @@
 #!/usr/bin/make -f
 # debian/rules for t-prot package
+# Copyright 2002-2012 by Gerfried Fuchs <rhonda@debian.org>
+# Licenced under WTFPLv2
 
-PACKAGE = t-prot
-TMP = $(CURDIR)/debian/$(PACKAGE)
+PKG = t-prot
+TMP = $(CURDIR)/debian/$(PKG)
 
 INSTALL = install
 INSTALL_FILE    = $(INSTALL) -p    -oroot -groot -m644
@@ -14,70 +16,72 @@ 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)
        $(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
+       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
-       cd $(TMP)/usr/bin/ && patch t-prot \
-               $(TMP)/../../contrib/t-prot-r*-mutt157.diff
        $(INSTALL_FILE)   t-prot.1 $(TMP)/usr/share/man/man1
-       $(INSTALL_FILE) debian/Muttrc.t-prot $(TMP)/etc
+       $(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
 
-       $(INSTALL_FILE) BUGS TODO README $(TMP)/usr/share/doc/$(PACKAGE)
+       $(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/$(PACKAGE)/contrib
-       cp -pR contrib/muttrc.t-prot contrib/filter_innd.pl debian/footers \
-               debian/README.footers \
-               $(TMP)/usr/share/doc/$(PACKAGE)/examples
+       #       \
+       #       $(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/$(PACKAGE)/changelog
-       cd $(TMP)/usr/share && gzip -9 doc/$(PACKAGE)/changelog \
+               $(TMP)/usr/share/doc/$(PKG)/changelog
+       cd $(TMP)/usr/share && gzip -9 doc/$(PKG)/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
+binary-indep: install
        $(checkdir)
        $(checkroot)
        $(INSTALL_DIR) $(TMP)/DEBIAN
        $(INSTALL_FILE) debian/copyright debian/README.Debian \
-               debian/NEWS.Debian $(TMP)/usr/share/doc/$(PACKAGE)
+               $(TMP)/usr/share/doc/$(PKG)
        $(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)/usr/share/doc/$(PKG)/changelog.Debian
+       cd $(TMP)/usr/share/doc/$(PKG) && gzip -9 \
+               changelog.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$(PACKAGE) -P$(TMP)
+       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
+binary-arch:
        # We have nothing to do here.
 
 
-binary: binary-indep binary-arch
+binary: binary-indep
 
 
 define checkdir