[DRE-commits] [ruby-rack-piwik] 01/04: move rack templates to /usr/share/ruby-rack-piwik (Closes: #719512)
Cédric Boutillier
boutil at alioth.debian.org
Wed Sep 25 20:23:56 UTC 2013
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-rack-piwik.
commit c4da724463ea27df8124c197174a95d7e24ecbd2
Author: Cédric Boutillier <boutil at debian.org>
Date: Wed Sep 25 17:01:02 2013 +0200
move rack templates to /usr/share/ruby-rack-piwik (Closes: #719512)
---
debian/patches/move_templates.patch | 20 ++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 10 +++++++++-
3 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/debian/patches/move_templates.patch b/debian/patches/move_templates.patch
new file mode 100644
index 0000000..82fa470
--- /dev/null
+++ b/debian/patches/move_templates.patch
@@ -0,0 +1,20 @@
+Description: move templates to /usr/share/ruby-rack-piwik
+ .erb files are not Ruby files, and their presence in
+ /usr/lib/ruby/vendor/rack/templates may create conflicts
+ with other packages.
+Author: Cédric Boutillier <boutil at debian.org>
+Debian-Bug: http://bugs.debian.org/719512
+Forwarded: not-needed
+Last-Update: 2013-09-25
+
+--- a/lib/rack/piwik.rb
++++ b/lib/rack/piwik.rb
+@@ -28,7 +28,7 @@
+
+ def inject(response)
+ file = 'async'
+- @template ||= ::ERB.new ::File.read ::File.expand_path("../templates/#{file}.erb",__FILE__)
++ @template ||= ::ERB.new ::File.read ::File.expand_path("../../../../../share/ruby-rack-piwik/templates/#{file}.erb",__FILE__)
+ response.gsub(%r{</body>}, @template.result(binding) + "</body>")
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..53f3213
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+move_templates.patch
diff --git a/debian/rules b/debian/rules
index a5e7dc8..1228e5e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,5 @@
#!/usr/bin/make -f
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
#
# Uncomment to ignore all test failures (but the tests will run anyway)
#export DH_RUBY_IGNORE_TESTS=all
@@ -13,3 +13,11 @@
%:
dh $@ --buildsystem=ruby --with ruby
+
+
+override_dh_auto_install:
+ dh_install lib/rack/templates usr/share/ruby-rack-piwik
+ dh_auto_install
+ rm -rf debian/ruby-rack-piwik/usr/lib/ruby/vendor_ruby/rack/templates
+
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rack-piwik.git
More information about the Pkg-ruby-extras-commits
mailing list