2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-11 19:13:26 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mtr < Formula
|
2010-04-07 05:58:35 +00:00
|
|
|
homepage 'http://www.bitwizard.nl/mtr/'
|
2013-02-22 17:06:01 +00:00
|
|
|
url 'http://ftp.de.debian.org/debian/pool/main/m/mtr/mtr_0.82.orig.tar.gz'
|
|
|
|
mirror 'ftp://ftp.bitwizard.nl/mtr/mtr-0.82.tar.gz'
|
2012-03-19 13:41:44 +00:00
|
|
|
sha1 'f1319de27324d85898a9df0a293a438bbaaa12b5'
|
2009-09-11 19:13:26 +00:00
|
|
|
|
2013-07-16 22:45:41 +00:00
|
|
|
head 'https://github.com/traviscross/mtr.git'
|
|
|
|
|
2013-02-10 05:53:28 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2013-01-26 17:57:11 +00:00
|
|
|
depends_on 'gtk+' => :optional
|
2013-07-16 22:45:41 +00:00
|
|
|
depends_on :automake if build.head?
|
2010-12-30 06:16:42 +00:00
|
|
|
|
2009-09-11 19:13:26 +00:00
|
|
|
def install
|
|
|
|
# We need to add this because nameserver8_compat.h has been removed in Snow Leopard
|
2010-04-07 05:58:35 +00:00
|
|
|
ENV['LIBS'] = "-lresolv"
|
2012-08-10 22:36:53 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
2013-01-26 17:57:11 +00:00
|
|
|
args << "--without-gtk" if build.without? 'gtk+'
|
2013-07-16 22:45:41 +00:00
|
|
|
system "./bootstrap.sh" if build.head?
|
2010-12-30 06:16:42 +00:00
|
|
|
system "./configure", *args
|
2009-09-11 19:13:26 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2009-12-02 10:53:00 +00:00
|
|
|
|
2012-04-11 20:00:03 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
mtr requires superuser privileges. You can either run the program
|
|
|
|
via `sudo`, or change its ownership to root and set the setuid bit:
|
|
|
|
|
|
|
|
sudo chown root:wheel #{sbin}/mtr
|
|
|
|
sudo chmod u+s #{sbin}/mtr
|
|
|
|
|
|
|
|
In any case, you should be certain that you trust the software you
|
|
|
|
are executing with elevated privileges.
|
|
|
|
EOS
|
2009-12-02 10:53:00 +00:00
|
|
|
end
|
2009-09-11 19:13:26 +00:00
|
|
|
end
|