[DRE-commits] [ruby-passenger] 02/02: Query the supported ruby versions from dh_ruby instead of hardcoding them. (Closes: #744808)

Felix Geyer fgeyer at moszumanska.debian.org
Wed Apr 16 11:16:18 UTC 2014


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

fgeyer pushed a commit to branch master
in repository ruby-passenger.

commit 0e3b60651606de6746a8ea92f21967978a2be4df
Author: Felix Geyer <fgeyer at debian.org>
Date:   Wed Apr 16 13:15:50 2014 +0200

    Query the supported ruby versions from dh_ruby instead of hardcoding them. (Closes: #744808)
---
 debian/changelog |  7 +++++++
 debian/rules     | 20 ++++++++++++--------
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 44591d1..6c93c8e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ruby-passenger (4.0.37-3) UNRELEASED; urgency=medium
+
+  * Query the supported ruby versions from dh_ruby instead of hardcoding them.
+    (Closes: #744808)
+
+ -- Felix Geyer <fgeyer at debian.org>  Wed, 16 Apr 2014 12:34:04 +0200
+
 ruby-passenger (4.0.37-2) unstable; urgency=medium
 
   * Cherry-pick upstream commit to fix CVE-2014-1832.
diff --git a/debian/rules b/debian/rules
index 0bc9de0..9d7cf83 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,25 +11,29 @@ export USE_VENDORED_LIBEV=false
 # needed to generate docs
 export LC_ALL=C.UTF-8
 
+SUPPORTED_RUBY_VERSIONS=$(shell dh_ruby --print-supported)
+
 %:
 	dh $@ --buildsystem=ruby --with ruby,apache2,autoreconf
 
 override_dh_auto_build:
-	/usr/bin/ruby1.9.1 /usr/bin/rake fakeroot
-	mv pkg/fakeroot pkg/fakeroot1.9.1
-	/usr/bin/ruby2.0 /usr/bin/rake fakeroot
-	mv pkg/fakeroot pkg/fakeroot2.0
+	set -e && for ruby in $(SUPPORTED_RUBY_VERSIONS); do \
+		/usr/bin/$$ruby /usr/bin/rake fakeroot; \
+		mv pkg/fakeroot pkg/fakeroot$$ruby; \
+	done
 
 override_dh_auto_install:
 	mkdir debian/tmp/
-	cp -a pkg/fakeroot1.9.1/* debian/tmp/
-	cp -a pkg/fakeroot2.0/* debian/tmp/
+	set -e && for ruby in $(SUPPORTED_RUBY_VERSIONS); do \
+		cp -a pkg/fakeroot$$ruby/* debian/tmp/; \
+	done
 	rm -f debian/tmp/usr/share/doc/phusion-passenger/images/._phusion_banner.png
 
 override_dh_auto_clean:
 	dh_auto_clean -O--buildsystem=ruby
-	rm -rf pkg/fakeroot1.9.1
-	rm -rf pkg/fakeroot2.0
+	set -e && for ruby in $(SUPPORTED_RUBY_VERSIONS); do \
+		rm -rf pkg/fakeroot$$ruby; \
+	done
 
 override_dh_install:
 	dh_install --list-missing -O--buildsystem=ruby

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-passenger.git



More information about the Pkg-ruby-extras-commits mailing list