Code

rules: Enabled harding build flags (use dpkg-buildflags). tig-1.0-1
authorSebastian Harl <sh@tokkee.org>
Thu, 17 May 2012 18:09:02 +0000 (20:09 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 17 May 2012 19:41:36 +0000 (21:41 +0200)
debian/changelog
debian/rules

index b8e2a09f24f00e302d36b4dcdb65abe82b5740e2..17440bd2f0472431e44a97ef08fdecb06127c931 100644 (file)
@@ -10,6 +10,7 @@ tig (1.0-1) UNRELEASED; urgency=low
     - Don't remove 'test-graph'; it is no longer installed by 'make install'.
     - Don't try to install TODO; it no longer exists.
     - Split build target into build-{arch,indep} as recommended by policy.
+    - Enabled harding build flags (use dpkg-buildflags).
   * debian/control:
     - Updated standards-version to 3.9.3 -- no changes.
 
index 63f259916940bf0497dadbac7e793adfc0bcb760..9c4aa1482e2c345c124bd32620fae187478a3af5 100755 (executable)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-CFLAGS = -Wall -g -I/usr/include/ncursesw
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+CFLAGS   = $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS  += -Wall -g -I/usr/include/ncursesw
+
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+
+LDFLAGS  = $(shell dpkg-buildflags --get LDFLAGS)
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
@@ -23,7 +30,7 @@ config.status: configure
        dh_testdir
        ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc \
-               CFLAGS="$(CFLAGS)"
+               CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 build: build-arch build-indep