aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/nbimg.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Formula/nbimg.rb b/Library/Formula/nbimg.rb
new file mode 100644
index 000000000..45761c244
--- /dev/null
+++ b/Library/Formula/nbimg.rb
@@ -0,0 +1,21 @@
+require 'formula'
+
+class Nbimg < Formula
+ homepage 'https://github.com/poliva/nbimg'
+ url 'https://github.com/poliva/nbimg/archive/v1.2.1.tar.gz'
+ sha1 '21a12e2451eefb5296e682744614b3f46e1f427a'
+
+ def install
+ inreplace 'Makefile', 'all: nbimg win32', 'all: nbimg'
+ system "make", "prefix=#{prefix}",
+ "bindir=#{bin}",
+ "docdir=#{doc}",
+ "mandir=#{man}",
+ "install"
+ end
+
+ test do
+ curl "https://gist.github.com/staticfloat/8253400/raw/41aa4aca5f1aa0a82c85c126967677f830fe98ee/tiny.bmp", "-O"
+ system "#{bin}/nbimg", "-Ftiny.bmp"
+ end
+end