Sha256: 777927511a9c9904cf152581e2f7678eba07fe33d8ca6400088eba95fc208e04

Contents?: true

Size: 850 Bytes

Versions: 6

Compression:

Stored size: 850 Bytes

Contents

task :default => 'man/chake.1'

file 'man/chake.1' => ['man/chake.adoc'] do
  command = 'asciidoctor --backend manpage --out-file man/chake.1 man/chake.adoc'
  if ENV['SOURCE_DATE_EPOCH']
    date = Time.at(ENV['SOURCE_DATE_EPOCH'].to_i)
    command << " --attribute docdate=#{date.strftime('%Y-%m-%d')}"
  end
  sh command
end

file 'man/chake.adoc' => ['README.md', 'man/readme2man.sed'] do |t|
  sh "sed -f man/readme2man.sed README.md > #{t.name} || (rm -f #{t.name}; false)"
end

task :install => 'man/chake.1' do
  prefix = ENV['PREFIX'] || File.exists?('debian/rules') && '/usr' || '/usr/local'
  target = [ENV["DESTDIR"], prefix , 'share/man/man1'].compact
  man = File.join(*target)
  sh 'install', '-d', '-m', '0755', man
  sh 'install', '-m', '0644', 'man/chake.1', man
end

task :clean do
  rm_f 'man/chake.1'
  rm_f 'man/chake.adoc'
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
chake-0.17 man/Rakefile
chake-0.16 man/Rakefile
chake-0.15 man/Rakefile
chake-0.14 man/Rakefile
chake-0.13 man/Rakefile
chake-0.12 man/Rakefile