class ShibbolethSp < Formula desc "Shibboleth 2 Service Provider daemon" homepage "https://wiki.shibboleth.net/confluence/display/SHIB2" url "https://shibboleth.net/downloads/service-provider/3.0.4/shibboleth-sp-3.0.4.tar.bz2" sha256 "f5dc0fd028b74db4aaae76b59ec98e8a719c38cfe0f1d722feb2d5e0b9880cff" revision 1 bottle do sha256 "c33a3c184c06a96b534f9a74aa82bac8d2964c2f0d07b5173fb623f6ff37c358" => :mojave sha256 "3a8fb2a044be87d4cdcffdc93d450f37a59a03dc5037fe50cddf49c849a3be4b" => :high_sierra sha256 "3d142046caca2ffa2ad494efb3de5c445ec69361e7feaec3ba457a6b82dc1455" => :sierra end depends_on "apr" => :build depends_on "apr-util" => :build depends_on "pkg-config" => :build depends_on "boost" depends_on "httpd" if MacOS.version >= :high_sierra depends_on "log4shib" depends_on :macos => :yosemite depends_on "opensaml" depends_on "openssl@1.1" depends_on "unixodbc" depends_on "xerces-c" depends_on "xml-security-c" depends_on "xml-tooling-c" def install 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 plist_options :startup => true, :manual => "shibd" def plist; <<~EOS Label #{plist_name} ProgramArguments #{opt_sbin}/shibd -F -f -p #{var}/run/shibboleth/shibd.pid RunAtLoad KeepAlive EOS end test do system sbin/"shibd", "-t" end end