60 lines
1.9 KiB
Ruby
60 lines
1.9 KiB
Ruby
require "formula"
|
|
|
|
class Nzbget < Formula
|
|
homepage "http://nzbget.net/"
|
|
url "https://downloads.sourceforge.net/project/nzbget/nzbget-stable/14.1/nzbget-14.1.tar.gz"
|
|
sha1 "671c0d0b554643e1b58665004c65519a330766db"
|
|
|
|
head "https://nzbget.svn.sourceforge.net/svnroot/nzbget/trunk"
|
|
|
|
bottle do
|
|
sha1 "b8fa821bf43c2c5ccd2842ce0a57ba0131b150bc" => :yosemite
|
|
sha1 "78df733e6f5983b32dd66a391cb1c6f6b1a8570a" => :mavericks
|
|
sha1 "ba78b8016b214a18c80499eb3d17a4aa4a45983b" => :mountain_lion
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "openssl"
|
|
depends_on "libsigc++"
|
|
|
|
fails_with :clang do
|
|
build 500
|
|
cause <<-EOS.undent
|
|
Clang older than 5.1 requires flexible array members to be POD types.
|
|
More recent versions require only that they be trivially destructible.
|
|
EOS
|
|
end
|
|
|
|
resource "libpar2" do
|
|
url "https://launchpad.net/libpar2/trunk/0.4/+download/libpar2-0.4.tar.gz"
|
|
sha1 "c4a5318edac0898dcc8b1d90668cfca2ccfe0375"
|
|
end
|
|
|
|
def install
|
|
resource("libpar2").stage do
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--prefix=#{libexec}/lp2"
|
|
system "make", "install"
|
|
end
|
|
|
|
# Tell configure where libpar2 is, and tell it to use OpenSSL
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--with-libpar2-includes=#{libexec}/lp2/include",
|
|
"--with-libpar2-libraries=#{libexec}/lp2/lib",
|
|
"--with-tlslib=OpenSSL"
|
|
system "make"
|
|
ENV.j1
|
|
system "make", "install"
|
|
etc.install "nzbget.conf"
|
|
end
|
|
|
|
test do
|
|
# Start nzbget as a server in daemon-mode
|
|
system "#{bin}/nzbget", "-D"
|
|
# Query server for version information
|
|
system "#{bin}/nzbget", "-V"
|
|
# Shutdown server daemon
|
|
system "#{bin}/nzbget", "-Q"
|
|
end
|
|
end
|