Description: some changes for reproducible builds
Author: Alexander Zangerl <az@debian.org>
--- a/config/version.sh
+++ b/config/version.sh
@@ -7,12 +7,15 @@ set -e
 
 version=${1?}
 host=`uname -n`
+if [ "${SOURCE_DATE_EPOCH}" != "" ]; then
+    host="`dpkg-vendor --query Vendor`"
+fi
 if test -d "$srcdir/.git"; then
     git=" `git -C $srcdir describe --long --dirty`"
 else
     git=
 fi
-date="`TZ=GMT0 date +'%Y-%m-%d %T'` +0000"
+date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" '+%B %d, %Y')"
 
 cat <<E
 char *version_str = "nmh-$version$git built $date on $host";
--- a/man/mh-chart-gen.sh
+++ b/man/mh-chart-gen.sh
@@ -13,7 +13,7 @@ nmhmandir=$(dirname $0)
 # from the local build environment when building distribution packages.
 LC_TIME=C; export LC_TIME
 unset LANG
-datestamp=$(date +%Y-%m-%d)
+datestamp="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" '+%B %d, %Y')"
 
 our_name="mh-chart"
 our_desc="chart of all nmh commands and their options"
@@ -29,7 +29,7 @@ $our_name \- $our_desc
 .na
 __HOOPY_FROOD
 
-for i in $nmhmandir/*.man; do
+find man -name '*.man' | LC_ALL=C sort | while read i; do
   case $i in
     */mh-chart.man) ;;
     *) if grep '^\.SH SYNOPSIS' "$i" >/dev/null; then
