debian: Apply hardening options to build.
[sliver-openvswitch.git] / debian / rules
index 4a0e8b5..1ee7048 100755 (executable)
@@ -22,6 +22,7 @@ PARALLEL =
 endif
 MAKEFLAGS += $(PARALLEL)
 
+CFLAGS += -g
 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
 CFLAGS += -O0
 else
@@ -39,6 +40,7 @@ configure-stamp:
                test -e Makefile || \
                ../configure --prefix=/usr --localstatedir=/var --enable-ssl \
                        --sysconfdir=/etc CFLAGS="$(CFLAGS)" \
+                       $(shell dpkg-buildflags --export=configure) \
                        $(DATAPATH_CONFIGURE_OPTS))
        touch configure-stamp
 
@@ -111,6 +113,7 @@ install-arch: build-arch
        $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install
        cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template
        dh_install -s
+       dh_link -s
 
 # Must not depend on anything. This is to be called by
 # binary-arch/binary-indep