Rakefile in pdfmult-1.3.0 vs Rakefile in pdfmult-1.3.1
- old
+ new
@@ -1,11 +1,17 @@
# rakefile for the pdfmult script.
#
-# Copyright (C) 2012 Marcus Stollsteimer
+# Copyright (C) 2011-2013 Marcus Stollsteimer
require 'rake/testtask'
+require './lib/pdfmult'
+
+PROGNAME = Pdfmult::PROGNAME
+HOMEPAGE = Pdfmult::HOMEPAGE
+TAGLINE = Pdfmult::TAGLINE
+
BINDIR = '/usr/local/bin'
MANDIR = '/usr/local/man/man1'
HELP2MAN = 'help2man'
SED = 'sed'
@@ -50,12 +56,14 @@
desc 'Create man page'
task :man => [MANPAGE]
file MANPAGE => [BINARY, H2MFILE] do
- sh "#{HELP2MAN} --no-info --include=#{H2MFILE} -o #{MANPAGE} ./#{BINARY}"
+ sh "#{HELP2MAN} --no-info --name='#{TAGLINE}' --include=#{H2MFILE} -o #{MANPAGE} ./#{BINARY}"
sh "#{SED} -i '/\.PP/{N;s/\.PP\\nOptions/.SH OPTIONS/}' #{MANPAGE}"
sh "#{SED} -i 's/^License GPL/.br\\nLicense GPL/;s/There is NO WARRANTY/.br\\nThere is NO WARRANTY/' #{MANPAGE}"
+ sh "#{SED} -i 's!%HOMEPAGE%!#{HOMEPAGE}!g' #{MANPAGE}"
+ sh "#{SED} -i 's!%PROGNAME%!#{PROGNAME}!g' #{MANPAGE}"
end
desc 'Build gem'
task :build => [MANPAGE] do