Commit 12624584 authored by Jérémy Bobbio's avatar Jérémy Bobbio

Create a static gemspec for proper gem integration

parent 41077820
This diff is collapsed.
#!/usr/bin/make -f
export DH_RUBY_GEMSPEC = debian/backports.gemspec
%:
dh $@ --buildsystem=ruby --with ruby
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.rdoc -O--buildsystem=ruby
override_dh_auto_configure:
dh_auto_configure -O--buildsystem=ruby
ruby -Ilib -e ' \
require "backports/version"; \
spec = Gem::Specification.load(ENV["DH_RUBY_GEMSPEC"]); \
if spec.version.to_s != Backports::VERSION; \
$$stderr.puts "Static gemspec is outdated. Run: debian/rules clean"; \
exit 1; \
end \
'
override_dh_clean:
dh_clean -O--buildsystem=ruby
# Let's create a static version of the gemspec as we don't build with git
if [ -d .git ]; then \
ruby -rrubygems -e ' \
spec = Gem::Specification.load("backports.gemspec"); \
spec.files.delete_if { |p| p.start_with? "debian/" }; \
File.write(ENV["DH_RUBY_GEMSPEC"], spec.to_ruby); \
'; \
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment