Skip to content

Instantly share code, notes, and snippets.

@lamby
Created December 29, 2015 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lamby/72f2098d6b72e33ba5f1 to your computer and use it in GitHub Desktop.
Save lamby/72f2098d6b72e33ba5f1 to your computer and use it in GitHub Desktop.
--- a/configure.ac 2015-12-29 03:53:39.775504504 +0100
--- b/configure.ac 2015-12-29 03:59:36.523646957 +0100
@@ -7,10 +7,16 @@
AC_SUBST(VERSION)
-ISODATE=`date +%Y-%m-%d`
+set -x
+if test "x$SOURCE_DATE_EPOCH" = "x"; then
+ YEAR=`date +%Y`
+ ISODATE=`date +%Y-%m-%d`
+else
+ YEAR=`date -u -d "@$SOURCE_DATE_EPOCH" "+%Y" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+%Y" 2>/dev/null || date -u "+%Y"`
+ ISODATE=`date -u -d "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d"`
+fi
+set +x
AC_SUBST(ISODATE)
-
-YEAR=`date +%Y`
AC_DEFINE_UNQUOTED(YEAR, $YEAR, [year when build])
dnl Checks for programs.
--- a/debian/control 2015-12-29 03:53:39.775504504 +0100
--- b/debian/control 2015-12-29 04:01:38.955766193 +0100
@@ -2,7 +2,7 @@
Section: x11
Priority: optional
Maintainer: Stefan Pfetzing <dreamind@dreamind.de>
-Build-Depends: debhelper (>= 7), x11proto-core-dev, libxpm-dev, libxext-dev, libx11-dev, libsm-dev, libice-dev
+Build-Depends: debhelper (>= 7), x11proto-core-dev, libxpm-dev, libxext-dev, libx11-dev, libsm-dev, libice-dev, dh-autoreconf
Standards-Version: 3.8.4
Package: oroborus
--- a/debian/rules 2015-12-29 03:53:39.775504504 +0100
--- b/debian/rules 2015-12-29 04:01:31.767524996 +0100
@@ -6,6 +6,7 @@
configure-stamp:
dh_testdir
# Run the configure
+ dh_autoreconf
./configure --prefix=/usr --mandir=/usr/share/man
touch configure-stamp
@@ -20,6 +21,7 @@
# dh_testroot
rm -f build-stamp configure-stamp
[ ! -f Makefile ] || $(MAKE) distclean
+ dh_autoreconf_clean
dh_clean
install: DH_OPTIONS=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment