summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@kekalainen.net>2020-06-28 17:35:02 +0300
committerDaniel Black <daniel@mariadb.org>2020-07-30 10:36:39 +1000
commita10f72aa5e9f4e6201f19e2d275ce098d5165d0f (patch)
tree1693331b7614c3bb29f6021f4da2c1792a3de97f /debian
parent497e7eda8cf398b5d30b6a05e0621b93c01ad657 (diff)
downloadmariadb-git-a10f72aa5e9f4e6201f19e2d275ce098d5165d0f.tar.gz
Deb: Proper DH_ and DEB_ flag use in debian/rules
- DEB_BUILD_HARDENING is only used with hardening-wrapper which is deprecated in Debian, so remove it - The word 'terse' should be checked in DEB_BUILD_OPTIONS and verbosity controlled by it
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules14
1 files changed, 9 insertions, 5 deletions
diff --git a/debian/rules b/debian/rules
index 59f4c571679..b3ef1bab11a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,12 +1,10 @@
#!/usr/bin/make -f
-export DH_VERBOSE=1
-export DEB_BUILD_HARDENING=1
-
-# enable Debian Hardening
-# see: https://wiki.debian.org/Hardening
+# Enable Debian Hardening
+# https://wiki.debian.org/Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
+# Include all defaults, including buildflags.mk
include /usr/share/dpkg/default.mk
# CPPFLAGS are nor read by CMake, so copy them to CXXFLAGS
# See why at https://cmake.org/Bug/view.php?id=12928
@@ -22,6 +20,12 @@ TMP:=$(CURDIR)/debian/tmp
CC := $(DEB_HOST_GNU_TYPE)-gcc
CXX := $(DEB_HOST_GNU_TYPE)-g++
+# According to Debian Policy version 4.2.0 builds should be as verbose as
+# possible unless 'terse' is specifically passed.
+ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
+ export DH_VERBOSE=1
+endif
+
# Parallel build support as advised
# at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))