From 71687356f5848af42b8d0a2abe3308a6641fc176 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Sun, 6 Nov 2011 18:50:08 +0100 Subject: [PATCH] Switch to dh --- debian/compat | 2 +- debian/control | 4 ++-- debian/rules | 37 ++++++++++++++++++------------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/debian/compat b/debian/compat index 7ed6ff8..7f8f011 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +7 diff --git a/debian/control b/debian/control index 8982c11..b011088 100644 --- a/debian/control +++ b/debian/control @@ -2,9 +2,9 @@ Source: git-buildpackage Section: vcs Priority: optional Maintainer: Guido Günther -Build-Depends: cdbs (>= 0.4.90~), debhelper (>= 5), python (>> 2.6.6-3~), +Build-Depends: debhelper (>= 7.0.50~), python (>> 2.6.6-3~), pychecker, gtk-doc-tools, sgml2x, docbook-utils, jade, python-dateutil, python-nose, - bash-completion, perl, python-epydoc, python-coverage, + bash-completion, perl, python-epydoc, python-coverage, python-setuptools, # For the testsuite git-core, bzip2, unzip Standards-Version: 3.9.2 diff --git a/debian/rules b/debian/rules index d09ea5a..6ca66d1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,11 +1,5 @@ #!/usr/bin/make -f -DEB_PYTHON2_MODULE_PACKAGES = git-buildpackage -DEB_PYTHON_CLEAN_ARGS = --all - -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/python-distutils.mk - EXAMPLE_SCRIPTS=\ gbp-add-patch \ gbp-cowbuilder-sid \ @@ -18,31 +12,36 @@ DEB_COMPRESS_EXCLUDE=$(EXAMPLE_SCRIPTS) PYCHECKER_ARGS=-boptparse --no-override --no-shadowbuiltin GBP_VERSION=gbp/gbp_version.py +%: + dh $@ --with python2 -ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) -pychecker: - PYTHONPATH=. pychecker $(PYCHECKER_ARGS) -q gbp gbp.scripts gbp.git - -checks: pychecker +override_dh_auto_test: + dh_auto_test export GIT_AUTHOR_NAME="Gbp Tests"; \ export GIT_AUTHOR_EMAIL=tests@example.com; \ export GIT_COMMITTER_NAME=$$GIT_AUTHOR_NAME; \ export GIT_COMMITTER_EMAIL=$$GIT_AUTHOR_EMAIL; \ + PYTHONPATH=. \ python setup.py nosetests -endif - -$(GBP_VERSION): debian/changelog - echo 'gbp_version="$(DEB_VERSION)"' > $(GBP_VERSION) + + PYTHONPATH=. pychecker $(PYCHECKER_ARGS) -q gbp gbp.scripts gbp.git -build/git-buildpackage:: $(GBP_VERSION) checks +override_dh_auto_build: $(GBP_VERSION) + dh_auto_build epydoc --config=setup.cfg make -C docs/ -binary-post-install/git-buildpackage:: +override_dh_auto_install: + dh_auto_install dh_bash-completion -clean:: +voerride_dh_auto_clean: + dh_auto_clean make -C docs/ clean -rm gbp/gbp_version.py -.PHONY: checks +override_dh_compress: + dh_compress --exclude=usr/share/doc/git-buildpackage/examples/ + +$(GBP_VERSION): debian/changelog + echo 'gbp_version="$(DEB_VERSION)"' > $(GBP_VERSION) -- 2.7.4