X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Frules;h=fa3cea85e6fff4a9d72ec414bf4a4cb8a4af9cd2;hb=81c64138e7959fe62bdd4a01269d1f331db295d5;hp=ab44b77f667ea0d4bd17d0351666e40d77d7fdd4;hpb=62fd5fc4479700b595566c4907cfb8d34ba549e9;p=sliver-openvswitch.git diff --git a/debian/rules b/debian/rules index ab44b77f6..fa3cea85e 100755 --- a/debian/rules +++ b/debian/rules @@ -25,12 +25,24 @@ MA_DIR ?= /usr/share/modass # load default rules -include $(MA_DIR)/include/common-rules.make +-include debian/rules.ext + +DATAPATH_CONFIGURE_OPTS = --enable-snat + +# Official build number. Leave set to 0 if not an official build. +BUILD_NUMBER = 0 + configure: configure-stamp configure-stamp: dh_testdir test -e configure || ./boot.sh - test -e Makefile || \ - ./configure --prefix=/usr --localstatedir=/var --enable-ssl + test -d _debian || mkdir _debian + cd _debian && ( \ + test -e Makefile || \ + ../configure --prefix=/usr --localstatedir=/var --enable-ssl \ + --with-build-number=$(BUILD_NUMBER) \ + $(DATAPATH_CONFIGURE_OPTS)) + $(ext_configure) touch configure-stamp #Architecture @@ -38,19 +50,23 @@ build: build-arch build-indep build-arch: build-arch-stamp build-arch-stamp: configure-stamp - $(MAKE) + $(MAKE) -C _debian + $(ext_build_arch) touch $@ build-indep: build-indep-stamp build-indep-stamp: configure-stamp - $(MAKE) dist distdir=openflow + $(MAKE) -C _debian dist distdir=openflow + $(ext_build_indep) touch $@ clean: dh_testdir dh_testroot rm -f build-arch-stamp build-indep-stamp configure-stamp + rm -rf _debian [ ! -f Makefile ] || $(MAKE) distclean + $(ext_clean) dh_clean debconf-updatepo @@ -67,7 +83,7 @@ endif kdist_clean: dh_clean - make KERNELDIR=$(KSRC) KVERREL=$(KVERS) clean + rm -rf openflow kdist_config: prep-deb-files @@ -77,7 +93,7 @@ binary-modules: prep-deb-files dh_testroot dh_clean -k tar xzf openflow.tar.gz - cd openflow && ./configure --with-$(l2x)=$(KSRC) + cd openflow && ./configure --with-$(l2x)=$(KSRC) $(DATAPATH_CONFIGURE_OPTS) --with-build-number=$(BUILD_NUMBER) cd openflow && $(MAKE) -C $(dpdir) install -d -m755 $(DSTDIR) install -m644 openflow/$(dpdir)/*_mod.$(KO)o $(DSTDIR)/ @@ -86,31 +102,31 @@ binary-modules: prep-deb-files dh_compress dh_fixperms dh_installdeb - dh_gencontrol -- -v$(VERSION) + dh_gencontrol dh_md5sums dh_builddeb --destdir=$(DEB_DESTDIR) install: install-indep install-arch -install-indep: MODDIR = $(CURDIR)/debian/openflow-datapath-source/usr/src/modules/openflow-datapath install-indep: build-indep dh_testdir dh_testroot dh_clean -k -i dh_installdirs -i - cp openflow.tar.gz $(MODDIR) - cd debian; cp changelog control compat *.modules.in rules $(MODDIR)/debian - cd debian/openflow-datapath-source/usr/src && tar -c modules | bzip2 -9 > openflow-datapath.tar.bz2 && rm -rf modules - install -m644 debian/openflow-pki.apache2 debian/openflow-pki/etc/apache2/sites-available/openflow-pki dh_install -i + cd debian/openflow-datapath-source/usr/src && tar -c modules | bzip2 -9 > openflow-datapath.tar.bz2 && rm -rf modules + install -m644 debian/openflow-pki-server.apache2 debian/openflow-pki-server/etc/apache2/sites-available/openflow-pki + install -m1777 -d debian/corekeeper/var/log/core + $(ext_install_indep) install-arch: build-arch dh_testdir dh_testroot dh_clean -k -s dh_installdirs -s - $(MAKE) DESTDIR=$(CURDIR)/debian/openflow install - cp debian/openflow-switch.overrides debian/openflow-switch/usr/share/lintian/overrides/openflow-switch + $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/openflow install + cp debian/openflow-switch-config.overrides debian/openflow-switch-config/usr/share/lintian/overrides/openflow-switch-config dh_install -s + $(ext_install_arch) # Must not depend on anything. This is to be called by # binary-arch/binary-indep @@ -122,13 +138,14 @@ binary-common: dh_installdocs dh_installexamples dh_installdebconf -# dh_installlogrotate + dh_installlogrotate dh_installinit + dh_installcron dh_installman dh_link - dh_strip + dh_strip --dbg-package=openflow-dbg dh_compress - dh_fixperms + dh_fixperms -X var/log/core dh_perl dh_makeshlibs dh_installdeb