2012-01-17 00:47:26 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Gptfdisk < Formula
|
|
|
|
homepage 'http://www.rodsbooks.com/gdisk/'
|
2014-03-16 00:06:19 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/gptfdisk/gptfdisk/0.8.10/gptfdisk-0.8.10.tar.gz'
|
|
|
|
sha1 '1708e232220236b6bdf299b315e9bc2205c01ba5'
|
2012-01-17 00:47:26 +00:00
|
|
|
|
|
|
|
depends_on 'popt'
|
|
|
|
depends_on 'icu4c'
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "make -f Makefile.mac"
|
2013-11-30 20:06:28 +00:00
|
|
|
sbin.install 'gdisk', 'cgdisk', 'sgdisk', 'fixparts'
|
|
|
|
man8.install Dir['*.8']
|
2012-01-17 00:47:26 +00:00
|
|
|
end
|
|
|
|
|
2013-03-26 17:41:47 +00:00
|
|
|
test do
|
|
|
|
IO.popen("#{sbin}/gdisk", "w+") do |pipe|
|
|
|
|
pipe.write("\n")
|
2013-06-09 02:26:21 +00:00
|
|
|
assert_match /GPT fdisk \(gdisk\) version #{Regexp.escape(version)}/, pipe.read
|
2013-03-26 17:41:47 +00:00
|
|
|
end
|
2012-01-17 00:47:26 +00:00
|
|
|
end
|
|
|
|
end
|