aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJeff Field2013-05-09 15:50:12 -0400
committerJack Nagel2013-05-13 12:45:52 -0500
commit5cd1b2ef9db16e7d1a28aa0f2defed4c29268067 (patch)
tree0bccbd8b5f7c02be6761db166e9c29bb16b6a561 /Library/Formula
parent847a56d343f1da3845b99c19f4f215d1a95d417c (diff)
downloadhomebrew-5cd1b2ef9db16e7d1a28aa0f2defed4c29268067.tar.bz2
New formula: pixz
Pixz (pronounced 'pixie') is a parallel, indexing version of XZ. This formula successfully builds on OS X 10.8.3. It requires libarchive. Added an option (--with-docs, hat tip to whoever did the git-cola formula as well as the helpful folks in IRC) which will build and install a manpage from the asciidoc source the author included. Unfortunately, building the docs requires the installation of 2 other packages, so I decided to keep it optional. Closes #19698. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pixz.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/Library/Formula/pixz.rb b/Library/Formula/pixz.rb
new file mode 100644
index 000000000..bb2e81287
--- /dev/null
+++ b/Library/Formula/pixz.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Pixz < Formula
+ homepage 'https://github.com/vasi/pixz'
+ url 'http://sourceforge.net/projects/pixz/files/pixz-1.0.2.tgz'
+ sha1 '953b2b55504ba349f1e7e47bdfcd4165ba206827'
+
+ head 'https://github.com/vasi/pixz.git'
+
+ option 'with-docs', 'Build man pages using asciidoc and DocBook'
+
+ depends_on 'libarchive'
+ depends_on 'xz'
+
+ if build.with? 'docs'
+ depends_on 'asciidoc' => :build
+ depends_on 'docbook' => :build
+ end
+
+ def install
+ system 'make'
+ bin.install 'pixz'
+
+ if build.with? 'docs'
+ ENV['XML_CATALOG_FILES'] = "#{HOMEBREW_PREFIX}/etc/xml/catalog"
+ system 'a2x --doctype manpage --format manpage pixz.1.asciidoc'
+ man1.install 'pixz.1'
+ end
+ end
+
+ test do
+ system "#{bin}/pixz"
+ end
+end