[Python-modules-commits] r11739 - in packages/python-cups/trunk/debian (changelog rules)

joss at users.alioth.debian.org joss at users.alioth.debian.org
Mon Feb 15 19:07:00 UTC 2010


    Date: Monday, February 15, 2010 @ 19:06:54
  Author: joss
Revision: 11739

Grab DEB_UPSTREAM_VERSION macro from cdbs.

Modified:
  packages/python-cups/trunk/debian/changelog
  packages/python-cups/trunk/debian/rules

Modified: packages/python-cups/trunk/debian/changelog
===================================================================
--- packages/python-cups/trunk/debian/changelog	2010-02-15 19:00:40 UTC (rev 11738)
+++ packages/python-cups/trunk/debian/changelog	2010-02-15 19:06:54 UTC (rev 11739)
@@ -24,7 +24,7 @@
   * Force dh to use the distutils system, not the Makefile in the 
     upstream sources (thanks Jakub and Piotr).
   * Add upstream NEWS to the installed files.
-  * Remove CFLAGS setting, doesn’t work anymore with dh.
+  * Grab DEB_UPSTREAM_VERSION macro from cdbs.
 
  -- Josselin Mouette <joss at debian.org>  Mon, 15 Feb 2010 18:41:52 +0100
 

Modified: packages/python-cups/trunk/debian/rules
===================================================================
--- packages/python-cups/trunk/debian/rules	2010-02-15 19:00:40 UTC (rev 11738)
+++ packages/python-cups/trunk/debian/rules	2010-02-15 19:06:54 UTC (rev 11739)
@@ -1,4 +1,12 @@
 #!/usr/bin/make -f
 
+# Stolen from cdbs, we need this.
+DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
+DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
+DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
+
+# Used during building to set the version
+export CFLAGS=-DVERSION=\"$(DEB_UPSTREAM_VERSION)\"
+
 %:
 	dh $@ --buildsystem=python_distutils




More information about the Python-modules-commits mailing list