99 lines
2.8 KiB
Ruby
99 lines
2.8 KiB
Ruby
class ShibbolethSp < Formula
|
|
desc "Shibboleth 2 Service Provider daemon"
|
|
homepage "https://wiki.shibboleth.net/confluence/display/SHIB2"
|
|
url "https://shibboleth.net/downloads/service-provider/2.6.1/shibboleth-sp-2.6.1.tar.bz2"
|
|
sha256 "1121e3b726b844d829ad86f2047be62da4284ce965ac184de2f81903f16b98e4"
|
|
|
|
bottle do
|
|
sha256 "1a91c531f1be5c05e66aa27f486034dc80f8a43b831ef7af67cbf4df5b8b3f67" => :high_sierra
|
|
sha256 "e2bd8a05bf07e9b746b240331b9b5a8588cedf2b21d6919fc8096c00721e9e16" => :sierra
|
|
sha256 "e6be9e88eaf93270e7cb2aad05fb3841d39560220ca2b4541c7bc24762d36b59" => :el_capitan
|
|
end
|
|
|
|
depends_on :macos => :yosemite
|
|
depends_on "curl" => "with-openssl"
|
|
depends_on "httpd" if MacOS.version >= :high_sierra
|
|
depends_on "opensaml"
|
|
depends_on "xml-tooling-c"
|
|
depends_on "xerces-c"
|
|
depends_on "xml-security-c"
|
|
depends_on "log4shib"
|
|
depends_on "boost"
|
|
depends_on "unixodbc"
|
|
|
|
depends_on "apr-util" => :build
|
|
depends_on "apr" => :build
|
|
|
|
needs :cxx11
|
|
|
|
def install
|
|
ENV.O2 # Os breaks the build
|
|
ENV.cxx11
|
|
args = %W[
|
|
--disable-debug
|
|
--disable-dependency-tracking
|
|
--disable-silent-rules
|
|
--prefix=#{prefix}
|
|
--localstatedir=#{var}
|
|
--sysconfdir=#{etc}
|
|
--with-xmltooling=#{Formula["xml-tooling-c"].opt_prefix}
|
|
--with-saml=#{Formula["opensaml"].opt_prefix}
|
|
--enable-apache-24
|
|
DYLD_LIBRARY_PATH=#{lib}
|
|
]
|
|
|
|
if MacOS.version >= :high_sierra
|
|
args << "--with-apxs24=#{Formula["httpd"].opt_bin}/apxs"
|
|
end
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
def post_install
|
|
(var/"run/shibboleth/").mkpath
|
|
(var/"cache/shibboleth").mkpath
|
|
end
|
|
|
|
def caveats
|
|
mod = build.with?("apache-22") ? "mod_shib_22.so" : "mod_shib_24.so"
|
|
<<~EOS
|
|
You must manually edit httpd.conf to include
|
|
LoadModule mod_shib #{opt_lib}/shibboleth/#{mod}
|
|
You must also manually configure
|
|
#{etc}/shibboleth/shibboleth2.xml
|
|
as per your own requirements. For more information please see
|
|
https://wiki.shibboleth.net/confluence/display/EDS10/3.1+Configuring+the+Service+Provider
|
|
EOS
|
|
end
|
|
|
|
plist_options :startup => true, :manual => "shibd"
|
|
|
|
def plist; <<~EOS
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_sbin}/shibd</string>
|
|
<string>-F</string>
|
|
<string>-f</string>
|
|
<string>-p</string>
|
|
<string>#{var}/run/shibboleth/shibd.pid</string>
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<true/>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system sbin/"shibd", "-t"
|
|
end
|
|
end
|