[sagemath] 01/01: Build rule tweaks

Ximin Luo infinity0 at debian.org
Tue Dec 20 23:40:20 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 a89ad1f83ce4cd2acc62cac6480e7bc0944174c2
Author: Ximin Luo <infinity0 at debian.org>
Date:   Wed Dec 21 00:11:39 2016 +0100

    Build rule tweaks
    
    - Give up all pretence of doing .PHONY propertly
    - Factor out prerelease checks into $(is_prelease)
    - Leave a release-experimental rule for future convenience
---
 debian/rules | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index e895064..4764761 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,8 @@ include /usr/share/dpkg/pkg-info.mk
 
 #export DH_VERBOSE=1
 
+is_prerelease = test $(DEB_DISTRIBUTION) = UNRELEASED -o $(DEB_DISTRIBUTION) = unstable-sage
+
 # Use ccache if pkg.sagemath.ccache build-profile is active.
 # Your rebuilds will be *much quicker*.
 ifneq (,$(filter pkg.sagemath.ccache,$(DEB_BUILD_PROFILES)))
@@ -150,7 +152,7 @@ override_dh_clean:
 prune: debian/control
 	cd debian/pruner && autoconf -I m4
 	cd debian/pruner && ./configure --with-sage-root="$(CURDIR)/sage"
-	cd sage && python ../debian/pruner/pruner.py ||	test $$(dpkg-parsechangelog -l../debian/changelog -SDistribution) = UNRELEASED
+	cd sage && python ../debian/pruner/pruner.py || $(is_prerelease)
 	touch prune
 
 run_tests = cd sage && ./sage -t -p $(NUMJOBS) --all --long $(EXTRA_SAGE_TEST_FLAGS) --logfile=logs/ptestlong.log
@@ -167,7 +169,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	# (and then this target) without trying (override_)dh_auto_build again.
 	$(run_tests) || true
 	# If tests fail but not by too many more, then retry them once
-	if [ $$(dpkg-parsechangelog -SDistribution) = UNRELEASED ]; then :; \
+	if $(is_prerelease); then :; \
 	elif debian/rules -s had-few-failures; then :; else \
 	  debian/rules -s had-not-too-many-failures && \
 	  mv sage/logs/ptestlong.log sage/logs/ptestlong.log.1 && \
@@ -270,10 +272,19 @@ install-apt-sources:
 # 2 Do the first part of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817236#5
 #   Sage needs it due to its pexpect etc stuff
 release: ../sagemath_$(DEB_VERSION).dsc
+	! $(is_prerelease)
 	cd .. && sbuild \
-	  --extra-repository='deb http://httpredir.debian.org/debian experimental main' \
 	  --build-dep-resolver=aspcud \
 	  --build-failed-commands '%SBUILD_SHELL' \
 	  "sagemath_$(DEB_VERSION).dsc"
 
-.PHONY: ptestlong clean-doc-build reset build-dep
+release-experimental: ../sagemath_$(DEB_VERSION).dsc
+	$(is_prerelease)
+	cd .. && sbuild \
+	  --extra-repository='deb http://httpredir.debian.org/debian experimental main' \
+	  --chroot-setup-commands='apt-get install -y apt-transport-https' \
+	  --extra-repository='deb https://debian-science.alioth.debian.org/apt sid-sage/' \
+	  --extra-repository-key=$(CURDIR)/debian/deb-sci-sage.asc \
+	  --build-dep-resolver=aspcud \
+	  --build-failed-commands '%SBUILD_SHELL' \
+	  "sagemath_$(DEB_VERSION).dsc"

-- 
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