X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Frules;h=799bf2e9f29751f76e66fcf4f11946fdf78c4818;hb=79f108b14e7944ddc4669e9c03fc34b40a3a2288;hp=4a0e8b583749168e288f2586a9af8907cd3c4103;hpb=8a07709cb80462edb32fc11d056bfc08ce90f62d;p=sliver-openvswitch.git diff --git a/debian/rules b/debian/rules index 4a0e8b583..799bf2e9f 100755 --- a/debian/rules +++ b/debian/rules @@ -22,12 +22,19 @@ PARALLEL = endif MAKEFLAGS += $(PARALLEL) +CFLAGS += -g ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif +# Old versions of dpkg-buildflags do not understand --export=configure. +# When dpkg-buildflags does not understand an option, it prints its full +# --help output on stdout, so we have to avoid that here. +buildflags := $(shell if dpkg-buildflags --export=configure >/dev/null 2>&1; \ + then dpkg-buildflags --export=configure; fi) + configure: configure-stamp configure-stamp: dh_testdir @@ -39,7 +46,7 @@ configure-stamp: test -e Makefile || \ ../configure --prefix=/usr --localstatedir=/var --enable-ssl \ --sysconfdir=/etc CFLAGS="$(CFLAGS)" \ - $(DATAPATH_CONFIGURE_OPTS)) + $(buildflags) $(DATAPATH_CONFIGURE_OPTS)) touch configure-stamp #Architecture @@ -100,7 +107,6 @@ install-indep: build-indep # And we should also clean useless license files, which are already # descriped in our debian/copyright anyway. rm -f debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/COPYING \ - debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/ovsdb/ovsdbmonitor/COPYING \ debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/xenserver/LICENSE install-arch: build-arch @@ -111,6 +117,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