[DRE-commits] [redmine] 02/03: Mangle Gemfile from d/rules instead of patching
Ondrej Sury
ondrej at moszumanska.debian.org
Mon Jul 21 10:00:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
ondrej pushed a commit to branch master
in repository redmine.
commit c3de8ba6529334fad95cb6ea6a218a2050e2fe62
Author: Ondřej Surý <ondrej at sury.org>
Date: Wed Jul 16 13:00:25 2014 +0200
Mangle Gemfile from d/rules instead of patching
---
debian/patches/2017_Gemfile_debian.patch | 103 -------------------------------
debian/patches/series | 1 -
debian/rules | 12 +++-
3 files changed, 9 insertions(+), 107 deletions(-)
diff --git a/debian/patches/2017_Gemfile_debian.patch b/debian/patches/2017_Gemfile_debian.patch
deleted file mode 100644
index 447042d..0000000
--- a/debian/patches/2017_Gemfile_debian.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-diff --git a/Gemfile b/Gemfile
-index 13915c6..9bd2fc2 100644
---- a/Gemfile
-+++ b/Gemfile
-@@ -1,98 +1,5 @@
- source 'https://rubygems.org'
-
--gem "rails", "3.2.17"
--gem "rake", "~> 10.1.1"
--gem "jquery-rails", "~> 2.0.2"
--gem "coderay", "~> 1.1.0"
--gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
--gem "builder", "3.0.0"
--gem "mime-types"
--gem "awesome_nested_set", "2.1.6"
--
--# Optional gem for LDAP authentication
--group :ldap do
-- gem "net-ldap", "~> 0.3.1"
--end
--
--# Optional gem for OpenID authentication
--group :openid do
-- gem "ruby-openid", "~> 2.3.0", :require => "openid"
-- gem "rack-openid"
--end
--
--platforms :mri, :mingw do
-- # Optional gem for exporting the gantt to a PNG file, not supported with jruby
-- group :rmagick do
-- # RMagick 2 supports ruby 1.9
-- # RMagick 1 would be fine for ruby 1.8 but Bundler does not support
-- # different requirements for the same gem on different platforms
-- gem "rmagick", ">= 2.0.0"
-- end
--
-- # Optional Markdown support, not for JRuby
-- group :markdown do
-- # TODO: upgrade to redcarpet 3.x when ruby1.8 support is dropped
-- gem "redcarpet", "~> 2.3.0"
-- end
--end
--
--platforms :jruby do
-- # jruby-openssl is bundled with JRuby 1.7.0
-- gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
-- gem "activerecord-jdbc-adapter", "~> 1.3.2"
--end
--
--# Include database gems for the adapters found in the database
--# configuration file
--require 'erb'
--require 'yaml'
--database_file = File.join(File.dirname(__FILE__), "config/database.yml")
--if File.exist?(database_file)
-- database_config = YAML::load(ERB.new(IO.read(database_file)).result)
-- adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
-- if adapters.any?
-- adapters.each do |adapter|
-- case adapter
-- when 'mysql2'
-- gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw]
-- gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
-- when 'mysql'
-- gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
-- gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
-- when /postgresql/
-- gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
-- gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
-- when /sqlite3/
-- gem "sqlite3", :platforms => [:mri, :mingw]
-- gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
-- when /sqlserver/
-- gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
-- gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
-- else
-- warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
-- end
-- end
-- else
-- warn("No adapter found in config/database.yml, please configure it first")
-- end
--else
-- warn("Please configure your config/database.yml first")
--end
--
--group :development do
-- gem "rdoc", ">= 2.4.2"
-- gem "yard"
--end
--
--group :test do
-- gem "shoulda", "~> 3.3.2"
-- gem "mocha", ">= 0.14", :require => 'mocha/api'
-- if RUBY_VERSION >= '1.9.3'
-- gem "capybara", "~> 2.1.0"
-- gem "selenium-webdriver"
-- end
--end
--
- local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
- if File.exists?(local_gemfile)
- puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
diff --git a/debian/patches/series b/debian/patches/series
index 193a8c0..535c923 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,6 +5,5 @@
2009_FHS_thin_config.patch
2018_get_rid_of_rdoctask.patch
2019_unplug_bundler.patch
-2017_Gemfile_debian.patch
1001_Parsedate.parsedate.patch
2020_load_awesome_nested_set.patch
diff --git a/debian/rules b/debian/rules
index bfd11b8..705733f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,19 +16,25 @@ binary-install/redmine::
# remove htacccess example file : complete examples are given in /usr/share/doc/redmine/examples
rm -f debian/redmine/usr/share/redmine/public/htaccess.fcgi.example
-
+
# running redmine as cgi is too slow
rm -f debian/redmine/usr/share/redmine/public/dispatch.cgi.example
-
+
# rename cgi script, check permissions
mv debian/redmine/usr/share/redmine/public/dispatch.fcgi.example debian/redmine/usr/share/redmine/public/dispatch.fcgi
-
+
# remove example config files
rm -f debian/redmine/usr/share/redmine/config/database.yml.example
# replace config/email.yml by /etc/redmine/<instance>/email.yml in all locales (Closes: #590846)
sed -i -e 's/config\/configuration\.yml/\/etc\/redmine\/\<\;instance\>\;\/configuration\.yml/g' debian/redmine/usr/share/redmine/config/locales/*.yml
+ # Replace original Gemfile with stripped down version
+ rm debian/redmine/usr/share/redmine/Gemfile
+ awk 'BEGIN {PRINT=1}; /^source/{print;getline;print;PRINT=0}; /^local_gemfile/{PRINT=1} { if (PRINT>0) print; };' \
+ < Gemfile \
+ > debian/redmine/usr/share/redmine/Gemfile
+
# Mark scripts as executable until upstream fixes their .tar.gz archive build
chmod a+x debian/redmine/usr/share/redmine/Rakefile
chmod a+x debian/redmine/usr/share/redmine/extra/mail_handler/rdm-mailhandler.rb
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git
More information about the Pkg-ruby-extras-commits
mailing list