8 DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
9 VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//')
10 DEBFLAVOR :=$(shell dpkg-parsechangelog | grep -E ^Distribution: | cut -d" " -f2)
11 DEBPKGNAME :=$(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2)
13 override_dh_auto_clean:
15 rm -rf debian/*.upstart
17 override_dh_installinit:
18 if dpkg-vendor --derives-from ubuntu ; then \
19 for i in *.upstart.in ; do \
20 MYPKG=`echo $i | cut -d. -f1` ; \
21 cp $MYPKG.upstart.in $MYPKG.upstart ; \
24 dh_installinit --error-handler=true
26 override_dh_gencontrol:
27 if dpkg-vendor --derives-from ubuntu ; then \
28 dh_gencontrol -- -T$(CURDIR)/debian/ubuntu_control_vars ; \
30 dh_gencontrol -- -T$(CURDIR)/debian/debian_control_vars ; \
34 dh_builddeb -- -Zxz -z9
38 quilt push install-missing-files.patch
39 git checkout MANIFEST.in
40 git ls-files --no-empty-directory --exclude-standard nova | grep -v '.py$$' | sed -n 's/.*/include &/gp' >> MANIFEST.in
45 git remote add upstream git://github.com/openstack/$(DEBPKGNAME).git || true
47 if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] ; then \
48 git archive --prefix=$(DEBPKGNAME)-$(VERSION)/ $(VERSION) | xz >../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ; \
50 if ! git checkout master ; then \
51 echo "No upstream branch: checking out" ; \
52 git checkout -b master upstream/master ; \
54 git checkout debian/experimental