X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=debian%2Frules;h=c8b6c636fcdc57917fab428bdd15d88db3ae284a;hb=6b8558f867edc8a9e1e2e2bd4f052a57caf5e863;hp=357285f7d1951ed5b9702ed02f0f3b827cf1075c;hpb=391614125ff1adc3cc157124480a50008b8a7801;p=openvswitch diff --git a/debian/rules b/debian/rules index 357285f7..c8b6c636 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: ([0-9]:)*([^-]+).*,\2,p') +srcfiles := $(filter-out debian, $(wildcard * .[^.]*)) + ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) else @@ -72,8 +77,9 @@ install: install-indep install-arch install-indep: build-indep dh_testdir dh_testroot - dh_clean -k -i + dh_prep -i dh_installdirs -i + $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/tmp install dh_install -i sed 's/^BUILD_NUMBER = .*/BUILD_NUMBER = $(BUILD_NUMBER)/' \ < debian/rules.modules \ @@ -81,12 +87,22 @@ 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 - dh_clean -k -s + dh_prep -s dh_installdirs -s - $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/openvswitch install + $(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 @@ -101,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_installman --language=C dh_link dh_strip --dbg-package=openvswitch-dbg dh_compress dh_fixperms - dh_pysupport + dh_python2 dh_perl dh_makeshlibs dh_installdeb