[pdal] 12/12: Add patch to use SOURCE_DATE_EPOCH instead of current date.

Bas Couwenberg sebastic at debian.org
Sat Aug 27 13:10:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master-git
in repository pdal.

commit 984f578e28ced5fc76f809b67b8160a01bb7bedd
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun May 15 21:27:29 2016 +0200

    Add patch to use SOURCE_DATE_EPOCH instead of current date.
---
 debian/changelog                       |  1 +
 debian/patches/series                  |  1 +
 debian/patches/source_date_epoch.patch | 22 ++++++++++++++++++++++
 debian/rules                           |  3 +--
 4 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4981e6f..ebb0d37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ pdal (1.2.0+git20160429-cbe9b08-1) UNRELEASED; urgency=medium
   * Use libjs-mathjax package for sphinx documentation.
   * Add missing sources for minified JS used in documentation.
   * Add patch to fix build failure on GNU/Hurd.
+  * Add patch to use SOURCE_DATE_EPOCH instead of current date.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sat, 30 Apr 2016 15:30:38 +0200
 
diff --git a/debian/patches/series b/debian/patches/series
index 276d7dd..b82ba16 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ dont-require-sphinxcontrib-bibtex.patch
 find-websocketpp.patch
 use-local-mathjax.patch
 hurd.patch
+source_date_epoch.patch
diff --git a/debian/patches/source_date_epoch.patch b/debian/patches/source_date_epoch.patch
new file mode 100644
index 0000000..1f70cda
--- /dev/null
+++ b/debian/patches/source_date_epoch.patch
@@ -0,0 +1,22 @@
+Description: Use SOURCE_DATE_EPOCH instead of current date.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: https://github.com/PDAL/PDAL/pull/1251
+Applied-Upstream: https://github.com/PDAL/PDAL/commit/b5525784dfb1084ced49479d29ea2e184c5d0ea2
+
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -12,8 +12,13 @@
+ # serve to show the default.
+ 
+ import sys, os, re
++import time
+ import datetime
+-year = datetime.datetime.now().year
++if os.environ.get('SOURCE_DATE_EPOCH'):
++    year  = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.gmtime()))).year
++    today = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.gmtime()))).strftime('%B %d, %Y')
++else:
++    year  = datetime.datetime.now().year
+ 
+ 
+ # If extensions (or modules to document with autodoc) are in another directory,
diff --git a/debian/rules b/debian/rules
index 7640ae6..266bd3f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,6 @@ CXXFLAGS += $(CPPFLAGS)
 
 UPSTREAM_VERSION  = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')
 BUILD_DATE        = $(shell dpkg-parsechangelog | sed -ne 's/^Date: //p' | LC_ALL=C date -u "+%d %B %Y" -f -)
-SPHINX_BUILD_DATE = $(shell dpkg-parsechangelog | sed -ne 's/^Date: //p' | LC_ALL=C date -u "+%B %d, %Y" -f -)
 
 MANPAGES := $(wildcard debian/man/*.*.xml)
 
@@ -52,7 +51,7 @@ override_dh_auto_build:
 
 	dh_auto_build
 
-	SPHINXOPTS="-D today=\"$(SPHINX_BUILD_DATE)\"" sphinx-build doc/ doc/html/
+	sphinx-build doc/ doc/html/
 	for f in `find doc/html/ -type d`; do \
 		ln -s /usr/share/javascript/mathjax $${f}/mathjax ; \
 	done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pdal.git



More information about the Pkg-grass-devel mailing list