use more pre-baked dpkg Makefile snippets in rules file
[debian/gzip] / debian / rules
index 73f21873264793b418397b513ade2cde13942b3d..47273f11eb2c029a3cb46af718e51960a884ab94 100755 (executable)
@@ -25,28 +25,14 @@ endif
 endif
 
 export DEFS=NO_ASM # Avoid TEXTRELs on i386
-EXTRA_CFLAGS=          -Wall
-EXTRA_CPPFLAGS=
-
-ifeq (${DEB_HOST_ARCH},amd64)
-EXTRA_CPPFLAGS+=       -DUNALIGNED_OK
-endif
+DEB_CFLAGS_MAINT_APPEND := -Wall
+DEB_CPPFLAGS_MAINT_APPEND := -DUNALIGNED_OK
 
 # Automatic dpkg-buildflags selection, backport-friendly
 
-ifneq (,$(wildcard /usr/share/dpkg/buildflags.mk))
-# dpkg-dev (>= 1.16.1~)
-DEB_CFLAGS_MAINT_APPEND=${EXTRA_CFLAGS}
-DEB_CPPFLAGS_MAINT_APPEND=${EXTRA_CPPFLAGS}
 # maybe turn this on later
 #DEB_BUILD_MAINT_OPTIONS=hardening=+all
 include /usr/share/dpkg/buildflags.mk
-else
-# old-fashioned way to determine build flags
-CFLAGS=                        -O$(if $(findstring noopt,${DEB_BUILD_OPTIONS}),0,2) -g
-CFLAGS+=               ${EXTRA_CFLAGS}
-LDFLAGS+=              ${EXTRA_LDFLAGS}
-endif
 
 # maybe turn this on later
 #ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -60,7 +46,8 @@ _topdir=$(call shellescape,$(shell pwd))
 CONFIGURE_ARGS=                --prefix=/usr \
                        --bindir=/bin \
                        --infodir=${_topdir}/debian/gzip/usr/share/info \
-                       --mandir=${_topdir}/debian/gzip/usr/share/man
+                       --mandir=${_topdir}/debian/gzip/usr/share/man \
+                       --disable-silent-rules
 
 ifneq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
 CONFIGURE_ARGS+=       --host=${DEB_HOST_GNU_TYPE}
@@ -85,7 +72,8 @@ configure-indep: configure-indep-stamp
 configure-indep-stamp: reconf-stamp
        dh_testdir
        mkdir -p builddir-indep
-       cd builddir-indep && ../configure --host=i686-w64-mingw32
+       cd builddir-indep && ../configure --host=i686-w64-mingw32 \
+               LIBS="-Wl,--as-needed -lssp" --disable-silent-rules
        :>$@
 
 build: build-stamp build-indep-stamp