use latest release date as man page date

The latest release date is extracted from the NEWS file,
i.e., it depends only on the sources, not the build date.
This is intended to help in creating reproducible builds
by avoiding timestamps.  It is also closer to the date of
the contents of the man page than using just the latest
copyright year.

I do not have a perfect solution that works for both a git
clone and a downloaded tar ball.  This solution works well
for released tar balls of the ssocr sources.
This commit is contained in:
Erik Auerswald
2023-05-14 17:37:48 +02:00
parent 2ff3d882b9
commit 1fe392c772
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ build a .deb package by typing:
Prerequisites
-------------
- A system sufficiently compatible to POSIX and GNU.
- POSIX utilities: chmod, printf, sh, sed (or compatible)
- POSIX utilities: chmod, head, printf, sh, sed (or compatible)
- GNU utilities: date, gzip, install, tar (or compatible)
- Other utilities: bzip2
- Imlib2 shared library and development headers. On a Debian or Ubuntu system
+3 -3
View File
@@ -10,7 +10,7 @@ DOCDIR := $(PREFIX)/share/doc/ssocr
DOCS := AUTHORS COPYING INSTALL README THANKS NEWS
VERSION := $(shell sed -n 's/^.*VERSION.*"\(.*\)".*/\1/p' defines.h)
CRYEARS := $(shell sed -n 's/^.*fprintf.*Copyright.*\(2004-2[0-9][0-9][0-9]\).*Erik.*Auerswald.*$$/\1/p' help.c)
MANYEAR := $(shell sed -n 's/^.*fprintf.*Copyright.*2004-\(2[0-9][0-9][0-9]\).*Erik.*Auerswald.*$$/\1/p' help.c)
RELDATE := $(shell sed -n 's/^Version [.0-9]* .\([-0-9]*\).*$$/\1/p' NEWS | head -n1)
all: ssocr ssocr.1
@@ -21,9 +21,9 @@ imgproc.o: imgproc.c defines.h imgproc.h help.h Makefile
help.o: help.c defines.h imgproc.h help.h Makefile
charset.o: charset.c charset.h defines.h help.h Makefile
ssocr.1: ssocr.1.in Makefile defines.h help.c
ssocr.1: ssocr.1.in Makefile defines.h help.c NEWS
sed -e 's/@VERSION@/$(VERSION)/' \
-e 's/@DATE@/$(MANYEAR)/' \
-e 's/@DATE@/$(RELDATE)/' \
-e 's/@CRYEARS@/$(CRYEARS)/' <$< >$@
ssocr-manpage.html: ssocr.1
+2 -2
View File
@@ -3,8 +3,8 @@ Noteworthy Changes in ssocr Releases
Upcoming Version ?.??.? (????-??-??):
-------------------------------------
* The man page uses the year of the last ssocr update as its date instead
of the build day of the man page, to help reproducible builds
* The man page uses the latest ssocr release date as its date (to help
in creating reproducible builds)
* Documentation improvements
Version 2.23.0 (2023-05-01):