Hi Robert,

On Mon, Jan 02, 2012 at 08:11:45AM -0800, Robert Woodcock wrote:
> On 01/01/2012 11:30 PM, Rogier Wolff wrote:
> >Hi,
> >
> >I don't have a debian/rules in my "upstream" distribution.
> >
> >Should I grab a copy somewhere and start distributing it?
> Moritz: What's the best method (if you're aware of one) to allow a
> package to still build on debian stable after these changes? As far
> as I can tell, --export=configure isn't in stable's dpkg-buildflags,
> /usr/share/dpkg/buildflags.mk isn't in stable, debhelper compat
> level 9 isn't in stable, etc.

I'm attaching an alternative, backport-friendly, patch:
dpkg-buildflags already exists  in stable (only that it doesn't
emit the hardened build flags, but only e.g. "-g -O2" for CFLAGS).

For oldstable-backports there's no real solution, but security
support for Lenny ends in a month, so it's days are counted
anyway :-)

Cheers,
        Moritz
diff -aur mtr-0.82.orig/debian/rules mtr-0.82/debian/rules
--- mtr-0.82.orig/debian/rules	2012-01-02 19:29:54.000000000 +0100
+++ mtr-0.82/debian/rules	2012-01-02 19:30:43.000000000 +0100
@@ -10,6 +10,10 @@
 export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+
 # FOR AUTOCONF 2.52 AND NEWER ONLY
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
   confflags += --build $(DEB_HOST_GNU_TYPE)
@@ -26,7 +30,7 @@
 	touch aclocal.m4 && \
 	touch configure
 
-	mkdir mtr && cd mtr && ../configure $(confflags) --prefix=`pwd`/debian/tmp/usr --mandir=`pwd`/debian/tmp/usr/share/man --sbindir=`pwd`/debian/tmp/usr/bin --enable-gtk2
+	mkdir mtr && cd mtr && ../configure CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(confflags) --prefix=`pwd`/debian/tmp/usr --mandir=`pwd`/debian/tmp/usr/share/man --sbindir=`pwd`/debian/tmp/usr/bin --enable-gtk2
 	make -C mtr
 
 	mkdir mtr-tiny && cd mtr-tiny && ../configure --prefix=`pwd`/debian/tmp/usr --mandir=`pwd`/debian/tmp/usr/share/man --sbindir=`pwd`/debian/tmp/usr/bin --without-gtk
Nur in mtr-0.82/debian: rules~.

Reply via email to