Description: fix the upstream Makefile to install the files in right places.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2014-12-12

Description: use the date of the latest entry in debian/changelog for the date
             headers in man pages, so that builds are reproducible.
             (Closes: #782462)
Author: Jonathan Wiltshire <jmw@debian.org>
        Jérémy Bobbio <lunar@debian.org>
        Reiner Herrmann <reiner@reiner-h.de>
Forwarded: not-needed
Last-Update: 2015-04-12
Index: txt2man-1.5.6/Makefile
===================================================================
--- txt2man-1.5.6.orig/Makefile
+++ txt2man-1.5.6/Makefile
@@ -1,20 +1,21 @@
 # Makefile
-prefix ?= /usr/local
+prefix ?= $(DESTDIR)/usr
 version = txt2man-1.5.6
+date = $(shell dpkg-parsechangelog -c1 -S date | LC_ALL=C date -u +"%d %B %Y" -f -)
 BIN = src2man bookman txt2man
 MAN1 = src2man.1 txt2man.1 bookman.1
 
 all: $(MAN1)
 
 install: $(MAN1)
-	mkdir -p $(prefix)/bin $(prefix)/man/man1
+	mkdir -p $(prefix)/bin $(prefix)/share/man/man1
 	cp $(BIN) $(prefix)/bin/
-	cp $(MAN1) $(prefix)/man/man1
+	cp $(MAN1) $(prefix)/share/man/man1
 
 clean:
 	rm -f *.1 *.txt *.ps *.pdf *.html
 
-%.1:%.txt; ./txt2man -s 1 -t $* -r $(version) $< > $@
+%.1:%.txt; ./txt2man -s 1 -t $* -r $(version) -d "$(date)" $< > $@
 %.txt:%; ./$< -h 2>&1 > $@
 %.html:%.1; rman -f HTML $< > $@
 %.ps:%.1; groff -man $< > $@
