From 02d823beb865daf9cf0cc00e06c3921742f232ce Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Sun, 16 Sep 2012 19:06:32 +0200 Subject: [PATCH] Use hardening build flags Add build-dependency on dpkg-dev >= 1.16.1~ --- debian/changelog | 2 ++ debian/control | 2 +- debian/rules | 20 ++------------------ 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/debian/changelog b/debian/changelog index 95945ff..6100705 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ mmv (1.01b-16) UNRELEASED; urgency=low * Switch to source format "3.0 (quilt)" * Add patch to fix FTBFS with -Werror=format-security * Use debhelper (v9) in many places, add build-dependency + * Use hardening build flags + + Add build-dependency on dpkg-dev >= 1.16.1~ * Add lintian overrides for no-upstream-changelog and no-homepage-field. -- Axel Beckert Sun, 16 Sep 2012 16:31:08 +0200 diff --git a/debian/control b/debian/control index c891e9d..0ba79af 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Uploaders: Axel Beckert Section: utils Priority: optional Standards-Version: 3.9.3 -Build-Depends: debhelper (>= 9~) +Build-Depends: debhelper (>= 9~), dpkg-dev (>= 1.16.1~) Package: mmv Architecture: any diff --git a/debian/rules b/debian/rules index e2f6fba..fdfc5c4 100755 --- a/debian/rules +++ b/debian/rules @@ -1,23 +1,7 @@ #! /usr/bin/make -f -LDFLAGS = -CFLAGS = -g -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - - -ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) - LDFLAGS += -s -endif - -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - MAKEFLAGS += -j$(NUMJOBS) -endif +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk build: # Builds the binary package. -- 2.39.2