X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=debian%2Frules;h=1773cc71d1276c705bbe8da1cc766c1da322838e;hb=0e70cdcb8ddeb20417e682fd63769f9d16601b07;hp=37d321b7d183fb947470babece4abcf6c8b8d7a0;hpb=57483aeda3e10a190d401275c7b3dcde4cd121b4;p=openvswitch diff --git a/debian/rules b/debian/rules index 37d321b7..1773cc71 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,11 @@ # Official build number. Leave set to 0 if not an official build. BUILD_NUMBER = 0 +PACKAGE=openvswitch +pdkms=openvswitch-datapath-dkms +DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') +srcfiles := $(filter-out debian, $(wildcard * .[^.]*)) + ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) else @@ -82,6 +87,16 @@ install-indep: build-indep chmod 755 debian/openvswitch-datapath-source/usr/src/modules/openvswitch-datapath/debian/rules cd debian/openvswitch-datapath-source/usr/src && tar -c modules | bzip2 -9 > openvswitch-datapath.tar.bz2 && rm -rf modules + #dkms stuff + # setup the dirs + dh_installdirs -p$(pdkms) usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION) + + # copy the source + cd debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION) && tar xvzf $(CURDIR)/_debian/openvswitch.tar.gz && mv openvswitch/* . && rmdir openvswitch + + # Prepare dkms.conf from the dkms.conf.in template + sed "s/__VERSION__/$(DEB_UPSTREAM_VERSION)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(PACKAGE)-$(DEB_UPSTREAM_VERSION)/dkms.conf + install-arch: build-arch dh_testdir dh_testroot @@ -102,14 +117,15 @@ binary-common: dh_installexamples dh_installdebconf dh_installlogrotate - dh_installinit -R + dh_installinit -R -Nopenvswitch-switch + dh_installinit -R -popenvswitch-switch --error-handler=init_script_error dh_installcron dh_installman dh_link dh_strip --dbg-package=openvswitch-dbg dh_compress dh_fixperms - dh_pysupport + dh_python2 dh_perl dh_makeshlibs dh_installdeb