diff --git a/Rakefile b/Rakefile index 261ab9a..424dba5 100644 --- a/Rakefile +++ b/Rakefile @@ -34,20 +34,27 @@ if DEBUG CCFLAGS << ["-g -DDEBUG"] end -desc "Build flexnbd binary" -task :flexnbd => 'build/flexnbd' -task :build => :flexnbd -task :default => :flexnbd +desc "Build the binary and man page" +task :build => ['build/flexnbd', 'build/flexnbd.1.gz'] +task :default => :build + +desc "Build just the binary" +task :flexnbd => "build/flexnbd" def check(m) "build/tests/check_#{m}" end -task :man do +file "build/flexnbd.1.gz" => "README.txt" do + FileUtils.mkdir_p( "build" ) sh "a2x --destination-dir build --format manpage README.txt" + sh "gzip build/flexnbd.1" end +desc "Build just the man page" +task :man => "build/flexnbd.1.gz" + namespace "test" do desc "Run all tests" diff --git a/debian/flexnbd.install b/debian/flexnbd.install index 6c73f84..0deb27f 100644 --- a/debian/flexnbd.install +++ b/debian/flexnbd.install @@ -1 +1,2 @@ -build/flexnbd usr/bin +build/flexnbd usr/bin +build/flexnbd.1.gz usr/share/man/man1