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

Bas Couwenberg sebastic at debian.org
Sun Jul 3 14:43:23 UTC 2016


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

sebastic pushed a commit to branch master
in repository pdal.

commit d35c82eac43d7651d2d0a5a0496b50e04d5be611
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 | 23 +++++++++++++++++++++++
 debian/rules                           |  3 +--
 4 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b235021..92f9b76 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 pdal (1.2.0-3) UNRELEASED; urgency=medium
 
   * 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 7304e66..62c6700 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 jsoncpp.patch
 privacy-breach.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..3d4c1bc
--- /dev/null
+++ b/debian/patches/source_date_epoch.patch
@@ -0,0 +1,23 @@
+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
+@@ -46,8 +46,14 @@ master_doc = 'index'
+ # General information about the project.
+ project = u'PDAL'
+ 
++import time
+ import datetime
+-copyright = str(datetime.datetime.now().year)
++if os.environ.get('SOURCE_DATE_EPOCH'):
++    today = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.gmtime()))).strftime('%B %d, %Y')
++
++    copyright = str(datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.gmtime()))).year)
++else:
++    copyright = str(datetime.datetime.now().year)
+ 
+ # The version info for the project you're documenting, acts as replacement for
+ # |version| and |release|, also used in various other places throughout the
diff --git a/debian/rules b/debian/rules
index 0305797..80c18cf 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/
 
 override_dh_auto_test:
 	# Exclude tests:

-- 
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