Makefile and specfile changes for SuSE.
[shibboleth/cpp-sp.git] / Portfile.in
similarity index 64%
rename from Portfile
rename to Portfile.in
index acd459e..865eb5a 100644 (file)
--- a/Portfile
@@ -1,16 +1,16 @@
 PortSystem 1.0
 
 name               shibboleth
-version            2.2.1
-categories         shibboleth
-maintainers        cantor.2@osu.edu
+version            @-VERSION-@
+categories         security www shibboleth
+maintainers        scantor snc
 description        Shibboleth Native Service Provider
 long_description   Standards-based attribute-based Web SSO system
 homepage           http://shibboleth.internet2.edu/
 master_sites       http://shibboleth.internet2.edu/downloads/shibboleth/cppsp/${version}/
 distname           ${name}-sp-${version}
 worksrcdir         ${name}-${version}
-checksums          sha1 41d23d3585e36c232d6b038e965f71084b7b7daf
+checksums          sha1 @CHECKSUM@
 
 depends_lib        port:opensaml \
                    port:xmltooling \
@@ -18,6 +18,25 @@ depends_lib        port:opensaml \
                    port:xml-security-c \
                    port:log4shib
 
+pre-fetch {
+    set status 0
+    if {[catch {exec ${prefix}/bin/curl --version | grep SSL} results]} {
+        if {[lindex $::errorCode 0] eq "CHILDSTATUS"} {
+            set status [lindex $::errorCode 2]
+        } else {
+            set status [lindex $::errorCode 3]
+        }
+    }
+    if {${status} != 0} {
+        return -code error "\n
+    ${name} requires curl to be installed with SSL support.
+    Please deactivate your current curl installation and
+    install the proper version of curl:
+        sudo port deactivate curl
+        sudo port install curl +ssl\n"
+    }
+}
+
 configure.args     --with-xmltooling=${prefix} \
                    --with-opensaml=${prefix} \
                    --with-xerces=${prefix} \
@@ -46,4 +65,7 @@ post-destroot {
 startupitem.create      yes
 startupitem.name        shibd
 startupitem.executable  ${prefix}/sbin/shibd -F -f -p ${prefix}/var/run/shibboleth/shibd.pid
-startupitem.pidfile     clean ${prefix}/var/run/shibboleth/shibd.pid
+
+livecheck.check         regex
+livecheck.url           http://shibboleth.internet2.edu/downloads/shibboleth/cppsp/latest/mac/ports/shibboleth/shibboleth/Portfile
+livecheck.regex         "version *(\\d+\\.\\d+(\\.\\d+)?)"