[SCM] pd-zexy/master: use SOURCE_DATE_EPOCH to calculate build-date

umlaeute at users.alioth.debian.org umlaeute at users.alioth.debian.org
Sun Jan 21 22:21:53 UTC 2018


The following commit has been merged in the master branch:
commit e42367c5d5a7146932738496e18b846dd5ac18a4
Author: IOhannes m zmölnig <zmoelnig at umlautS.umlaeute.mur.at>
Date:   Sun Jan 21 23:20:14 2018 +0100

    use SOURCE_DATE_EPOCH to calculate build-date
    
    rather than parsing the d/changelog

diff --git a/debian/rules b/debian/rules
index 6287bb2..132f346 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-BUILD_DATE:=$(shell date -u -d "$$(dpkg-parsechangelog -SDate)" +"%Y/%m/%d at %H:%M:%S UTC")
+DATE_FMT = %Y/%m/%d at %H:%M:%S UTC
+ifdef SOURCE_DATE_EPOCH
+    BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)"  2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")
+else
+    BUILD_DATE ?= $(shell date "+$(DATE_FMT)")
+endif
 
 %:
 	dh $@

-- 
pd-zexy packaging



More information about the pkg-multimedia-commits mailing list