[sagemath] 01/01: Use aptitude to resolve dependencies if it's available

Ximin Luo infinity0 at debian.org
Mon Aug 8 13:00:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository sagemath.

commit 306fa0078b1b2d5b253821597c5811789ab0ee2f
Author: Ximin Luo <infinity0 at debian.org>
Date:   Mon Aug 8 15:00:02 2016 +0200

    Use aptitude to resolve dependencies if it's available
    
    Also use pkg-info.mk as it's standard
---
 debian/rules | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index 6ff9de8..f9f54fc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-VERSION := $(shell dpkg-parsechangelog -S Version| sed 's@\(.\+\)-.\+@\1@')
+include /usr/share/dpkg/pkg-info.mk
 
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -21,7 +21,8 @@ override_dh_auto_test: ptestlong
 override_dh_auto_install:
 
 get-orig-source:
-	cd sage && git archive --prefix=sagemath_$(VERSION)/sage/ --format=tar HEAD | xz -zf > ../../sagemath_$(VERSION).orig.tar.xz
+	cd sage && git archive --prefix=sagemath_$(DEB_VERSION_UPSTREAM)/sage/ \
+	  --format=tar HEAD | xz -zf > ../../sagemath_$(DEB_VERSION_UPSTREAM).orig.tar.xz
 
 prune:
 	cd debian/pruner && autoconf
@@ -42,5 +43,7 @@ reset:
 
 build-dep:
 	mk-build-deps
-	sudo dpkg --force-all -i sagemath-build-deps_$(shell dpkg-parsechangelog -S Version)_all.deb
-	sudo apt-get install sagemath-build-deps
+	sudo dpkg --force-all -i sagemath-build-deps_$(DEB_VERSION)_all.deb
+	if which aptitude >/dev/null; then sudo aptitude install -R sagemath-build-deps; \
+	else sudo apt-get install --no-install-recommends sagemath-build-deps; fi
+	rm -f sagemath-build-deps_$(DEB_VERSION)_all.deb

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list