[DRE-commits] [ruby-rack-contrib] 01/10: dh-make-ruby . + patch to avoid git-version-dump
Antonio Terceiro
terceiro at moszumanska.debian.org
Tue Jul 14 23:34:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-rack-contrib.
commit ecfa6e48cf4d80f5d13f3b759754be4069254d77
Author: Antonio Terceiro <terceiro at debian.org>
Date: Tue Jul 14 20:01:27 2015 -0300
dh-make-ruby . + patch to avoid git-version-dump
---
debian/changelog | 5 ++
debian/compat | 1 +
debian/control | 27 +++++++++
debian/copyright | 35 ++++++++++++
...001-Remove-dependency-on-git-version-bump.patch | 65 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/ruby-rack-contrib.docs | 2 +
debian/ruby-tests.rake | 6 ++
debian/rules | 18 ++++++
debian/source/format | 1 +
debian/tests/control.ex | 13 +++++
debian/watch | 2 +
12 files changed, 176 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0c2c8d9
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+ruby-rack-contrib (1.3.0-1) UNRELEASED; urgency=medium
+
+ * Initial release (Closes: #nnnn)
+
+ -- Antonio Terceiro <terceiro at debian.org> Tue, 14 Jul 2015 19:53:29 -0300
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..ac95bef
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,27 @@
+Source: ruby-rack-contrib
+Section: ruby
+Priority: optional
+Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
+Uploaders: Antonio Terceiro <terceiro at debian.org>
+Build-Depends: debhelper (>= 7.0.50~),
+ gem2deb,
+ rake,
+ ruby-git-version-bump (>= 0.15),
+ ruby-rack1.4 (>= 1.4)
+Standards-Version: 3.9.6
+Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-rack-contrib.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-rack-contrib.git
+Homepage: http://github.com/rack/rack-contrib/
+Testsuite: autopkgtest-pkg-ruby
+XS-Ruby-Versions: all
+
+Package: ruby-rack-contrib
+Architecture: all
+XB-Ruby-Versions: ${ruby:Versions}
+Depends: ruby | ruby-interpreter,
+ ruby-git-version-bump (>= 0.15),
+ ruby-rack1.4 (>= 1.4),
+ ${misc:Depends},
+ ${shlibs:Depends}
+Description: Contributed Rack Middleware and Utilities
+ Contributed Rack Middleware and Utilities
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..911eca4
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,35 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: rack-contrib
+Source: FIXME <http://example.com/>
+
+Files: *
+Copyright: <years> <put author's name and email here>
+ <years> <likewise for another author>
+License: GPL-2+ (FIXME)
+
+Files: debian/*
+Copyright: 2015 Antonio Terceiro <terceiro at debian.org>
+License: GPL-2+ (FIXME)
+Comment: the Debian packaging is licensed under the same terms as the original package.
+
+License: GPL-2+ (FIXME)
+ This program is free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later
+ version.
+ .
+ This program is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the GNU General Public License for more
+ details.
+ .
+ You should have received a copy of the GNU General Public
+ License along with this package; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/patches/0001-Remove-dependency-on-git-version-bump.patch b/debian/patches/0001-Remove-dependency-on-git-version-bump.patch
new file mode 100644
index 0000000..b9a0770
--- /dev/null
+++ b/debian/patches/0001-Remove-dependency-on-git-version-bump.patch
@@ -0,0 +1,65 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Tue, 14 Jul 2015 20:00:24 -0300
+Subject: Remove dependency on git-version-bump
+
+The implementation of git-version-bump depends on Rubygems internals and
+does not work with Debian packages.
+---
+ lib/rack/contrib.rb | 9 +++++++--
+ rack-contrib.gemspec | 11 +++--------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/lib/rack/contrib.rb b/lib/rack/contrib.rb
+index 464a805..54b61aa 100644
+--- a/lib/rack/contrib.rb
++++ b/lib/rack/contrib.rb
+@@ -1,10 +1,15 @@
+ require 'rack'
+-require 'git-version-bump'
+
+ module Rack
+ module Contrib
+ def self.release
+- GVB.version
++ @__release__ ||=
++ if ::File.exists?(::File.expand_path('../../../debian/changelog', __FILE__))
++ dir = ::File.expand_path('../../..', __FILE__)
++ `cd #{dir} && dpkg-parsechangelog -SVersion`.strip
++ else
++ `dpkg-query --show ruby-rack-contrib`.split.last
++ end.split('-').first
+ end
+ end
+
+diff --git a/rack-contrib.gemspec b/rack-contrib.gemspec
+index b86dae8..ba2435b 100644
+--- a/rack-contrib.gemspec
++++ b/rack-contrib.gemspec
+@@ -1,16 +1,12 @@
+-begin
+- require 'git-version-bump'
+-rescue LoadError
+- nil
+-end
++require './lib/rack/contrib'
+
+ Gem::Specification.new do |s|
+ s.specification_version = 2 if s.respond_to? :specification_version=
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+
+ s.name = 'rack-contrib'
+- s.version = GVB.version rescue "0.0.0.1.ENOGVB"
+- s.date = GVB.date rescue Time.now.strftime("%F")
++ s.version = Rack::Contrib.release
++ s.date = Time.parse(`dpkg-parsechangelog -SDate`.strip)
+
+ s.licenses = ['MIT']
+
+@@ -35,7 +31,6 @@ Gem::Specification.new do |s|
+ # update `test/gemfiles/minimum_versions`!
+ #
+ s.add_runtime_dependency 'rack', '~> 1.4'
+- s.add_runtime_dependency 'git-version-bump', '~> 0.15'
+
+ s.add_development_dependency 'bundler', '~> 1.0'
+ s.add_development_dependency 'github-release', '~> 0.1'
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b1c7de0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Remove-dependency-on-git-version-bump.patch
diff --git a/debian/ruby-rack-contrib.docs b/debian/ruby-rack-contrib.docs
new file mode 100644
index 0000000..07b3c9e
--- /dev/null
+++ b/debian/ruby-rack-contrib.docs
@@ -0,0 +1,2 @@
+# FIXME: READMEs found
+# README.md
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
new file mode 100644
index 0000000..63f3fd6
--- /dev/null
+++ b/debian/ruby-tests.rake
@@ -0,0 +1,6 @@
+require 'gem2deb/rake/testtask'
+
+Gem2Deb::Rake::TestTask.new do |t|
+ t.libs = ['test']
+ t.test_files = FileList['test/**/*_test.rb'] + FileList['test/**/test_*.rb']
+end
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..2335a3d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,18 @@
+#!/usr/bin/make -f
+#export DH_VERBOSE=1
+#
+# Uncomment to ignore all test failures (but the tests will run anyway)
+#export DH_RUBY_IGNORE_TESTS=all
+#
+# Uncomment to ignore some test failures (but the tests will run anyway).
+# Valid values:
+#export DH_RUBY_IGNORE_TESTS=ruby2.2
+#
+# If you need to specify the .gemspec (eg there is more than one)
+#export DH_RUBY_GEMSPEC=gem.gemspec
+#
+# Uncomment to check dependencies during build:
+# export GEM2DEB_TEST_RUNNER = --check-dependencies
+
+%:
+ dh $@ --buildsystem=ruby --with ruby
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control.ex b/debian/tests/control.ex
new file mode 100644
index 0000000..d604201
--- /dev/null
+++ b/debian/tests/control.ex
@@ -0,0 +1,13 @@
+# AUTOGENERATED FILE
+#
+# As of autopkgtest 3.5, Ruby packages that use gem2deb are automatically
+# detected, and if debian/tests/control does not exist the contents below will
+# be assumed (with the exception of gem2deb being filtered out from
+# @builddeps@):
+
+Test-Command: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1
+Depends: @, @builddeps@, gem2deb-test-runner
+
+# if you would need to change something to the above, to that and rename this
+# file to `control`. Otherwise, you should probably delete this file
+# (recommended).
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..81df85e
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/rack-contrib .*/rack-contrib-(.*).tar.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rack-contrib.git
More information about the Pkg-ruby-extras-commits
mailing list