use DEB_LDFLAGS_MAINT_APPEND directly
authorIOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>
Thu, 16 Dec 2021 10:24:17 +0000 (11:24 +0100)
committerIOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>
Thu, 16 Dec 2021 10:24:17 +0000 (11:24 +0100)
and export the DEB_*_MAINT_*

debian/rules

index 379b001f31dfe960f826e74f2d8691f85fed3cc6..a546e6447bc8eb4aa97663bf5fad6924aa79d658 100755 (executable)
@@ -3,6 +3,11 @@
 # Copyright © 2015-2021 IOhannes m zmölnig <umlaeute@debian.org>
 # Description: Main Debian packaging script for JUCE
 
+export DH_VERBOSE = 1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CPPFLAGS_MAINT_APPEND  =
+export DEB_LDFLAGS_MAINT_APPEND =
+
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/default.mk
 include /usr/share/dpkg/buildtools.mk
@@ -16,8 +21,6 @@ DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
 #DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
 #^((.*\.jpg)|(.*\.JPG)|(.*\.gif)|(.*\.png)|(.*\.ico)|(.*\.icns)|(gradle-wrapper\.jar)|(.*\.mp3)|(.*\.caf)|(.*\.nib)|examples/InAppPurchase/Signing/InAppPurchase\.keystore|examples/(InAppPurchase/BinaryData/(Robot|Ed|Jules|JB|Fabian|Lukasz)[012]\.ogg|AUv3Synth|PlugInSamples/MultiOutSynth)/Source/BinaryData/singing\.ogg|examples/Demo/Resources/cello\.wav|examples/Demo/Resources/icons\.zip|modules/juce_audio_plugin_client/RTAS/juce_RTAS_WinResources\.rsr|examples/ComponentTutorialExample/Introduction to Components - Part 1\.pdf|debian/(changelog|copyright(|_hints|_newhints)))$
 
-LIBS = $(shell $(PKG_CONFIG) --libs libjpeg libpng zlib)
-
 # JUCE uses some c++11 features requiring atomic_store_8 and
 # atomic_load_8, so we need to link with libatomic on
 # armel, powerpc, powerpcspe, m68k, mips, mipsel, sh4, ...
@@ -28,12 +31,10 @@ LIBS = $(shell $(PKG_CONFIG) --libs libjpeg libpng zlib)
 noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4|riscv64)")
 # link with libatomic on architectures without built-in atomic
 ifeq ($(if $(noatomicarch),atomic), atomic)
-       LIBS += -latomic
        DEB_CPPFLAGS_MAINT_APPEND += -DDEBIAN_JUCERPROJECT_LIBS='\"atomic\"'
+       DEB_LDFLAGS_MAINT_APPEND += -latomic
 endif
 
-DEB_LDFLAGS_MAINT_APPEND += $(LIBS)
-
 # Debian's Projucer is GPL
 DEB_CPPFLAGS_MAINT_APPEND += -DJUCER_ENABLE_GPL_MODE=1