about summary refs log tree commit homepage
path: root/mwrap.gemspec
diff options
context:
space:
mode:
Diffstat (limited to 'mwrap.gemspec')
-rw-r--r--mwrap.gemspec11
1 files changed, 9 insertions, 2 deletions
diff --git a/mwrap.gemspec b/mwrap.gemspec
index dc99924..b6f9e71 100644
--- a/mwrap.gemspec
+++ b/mwrap.gemspec
@@ -1,6 +1,5 @@
 git_manifest = `git ls-files 2>/dev/null`.split("\n")
 git_ok = $?.success?
-git_manifest << 'lib/mwrap/version.rb'.freeze # generated by ./VERSION-GEN
 manifest = File.exist?('MANIFEST') ?
   File.readlines('MANIFEST').map!(&:chomp).delete_if(&:empty?) : git_manifest
 if git_ok && manifest != git_manifest
@@ -12,11 +11,19 @@ end
 
 version = `./VERSION-GEN`.chomp
 $?.success? or abort './VERSION-GEN failed'
+manifest << 'lib/mwrap/version.rb'.freeze
+
+if system(*%w(make -C Documentation man)) ||
+   system(*%w(gmake -C Documentation man))
+  manifest.concat(%w(Documentation/mwrap.1))
+else
+  warn 'failed to build man-page(s), proceeding without them'
+end
 
 Gem::Specification.new do |s|
   s.name = 'mwrap'
   s.version = version
-  s.homepage = 'https://80x24.org/mwrap/'
+  s.homepage = 'https://80x24.org/mwrap.git/'
   s.authors = ["mwrap hackers"]
   s.summary = 'LD_PRELOAD malloc wrapper for Ruby'
   s.executables = %w(mwrap)