[DRE-commits] [bundler] 04/07: Build and install manpages (Closes: #834716)
Scott Leggett
smlx-guest at moszumanska.debian.org
Thu Dec 8 10:29:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
smlx-guest pushed a commit to branch master
in repository bundler.
commit ab6aa962f1f1e2ce6109b917e23865a229463231
Author: Scott Leggett <scott at sl.id.au>
Date: Mon Dec 5 00:45:44 2016 +1100
Build and install manpages (Closes: #834716)
---
debian/control | 1 +
debian/dh_ruby.rake | 24 ++++++++++++++++++++++++
debian/ruby-bundler.manpages | 11 +++++++++++
debian/rules | 9 +++++++++
4 files changed, 45 insertions(+)
diff --git a/debian/control b/debian/control
index 36a3f24..e75bd2a 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Uploaders: Christian Hofstaedtler <zeha at debian.org>,
Build-Depends: debhelper (>= 9~),
gem2deb,
rake,
+ ruby-ronn,
ruby-rspec,
ruby-thor
Standards-Version: 3.9.8
diff --git a/debian/dh_ruby.rake b/debian/dh_ruby.rake
new file mode 100644
index 0000000..ab32634
--- /dev/null
+++ b/debian/dh_ruby.rake
@@ -0,0 +1,24 @@
+# build manpages
+directory "lib/bundler/man"
+
+sources = Dir["man/*.ronn"].map {|f| File.basename(f, ".ronn") }
+sources.map do |basename|
+ ronn = "man/#{basename}.ronn"
+ roff = "lib/bundler/man/#{basename}"
+
+ file roff => ["lib/bundler/man", ronn] do
+ sh "#{Gem.ruby} -S ronn --roff --pipe #{ronn} > #{roff}"
+ end
+
+ file "#{roff}.txt" => roff do
+ sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
+ end
+
+ task :default => "#{roff}.txt"
+end
+task :install do
+ # handled by dh_installman
+end
+task :clean do
+ # not required
+end
diff --git a/debian/ruby-bundler.manpages b/debian/ruby-bundler.manpages
new file mode 100644
index 0000000..11d248f
--- /dev/null
+++ b/debian/ruby-bundler.manpages
@@ -0,0 +1,11 @@
+lib/bundler/man/bundle.1
+lib/bundler/man/bundle-binstubs.1
+lib/bundler/man/bundle-config.1
+lib/bundler/man/bundle-exec.1
+lib/bundler/man/bundle-gem.1
+lib/bundler/man/bundle-install.1
+lib/bundler/man/bundle-lock.1
+lib/bundler/man/bundle-package.1
+lib/bundler/man/bundle-platform.1
+lib/bundler/man/bundle-update.1
+lib/bundler/man/gemfile.5
diff --git a/debian/rules b/debian/rules
index c2afd57..2aabbc7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,3 +14,12 @@ override_dh_auto_clean:
override_dh_installchangelogs:
dh_installchangelogs -i CHANGELOG.md
+override_dh_installman:
+ # rename manpages to be acceptable to dh_installman
+ ruby -rfileutils -e " \
+ Dir.glob('lib/bundler/man/*').grep(/^((?!\.).)*$$/).each do |file| \
+ FileUtils.cp(file, file + '.1') \
+ end"
+ dh_installman
+ # bundler and bundle are the same command
+ dh_link usr/share/man/man1/bundle.1 usr/share/man/man1/bundler.1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/bundler.git
More information about the Pkg-ruby-extras-commits
mailing list