debian: Clean .pyc files in "clean" target.
[sliver-openvswitch.git] / debian / rules
index fb781e6..b65c460 100755 (executable)
@@ -15,7 +15,7 @@ BUILD_NUMBER = 0
 
 PACKAGE=openvswitch
 pdkms=openvswitch-datapath-dkms
-DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
+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)))
@@ -72,6 +72,7 @@ clean:
        rm -rf _debian
        [ ! -f Makefile ] || $(MAKE) distclean
        dh_clean 
+       rm -f python/ovs/*.pyc python/ovs/db/*.pyc
 
 install: install-indep install-arch
 install-indep: build-indep
@@ -117,14 +118,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