Remove ws-trust federation schema from makefile since it is removed for DFSG reasons
[shibboleth/sp.git] / Portfile
1 PortSystem 1.0
2
3 name               shibboleth
4 version            2.4
5 categories         security www shibboleth
6 maintainers        scantor snc
7 description        Shibboleth Native Service Provider
8 long_description   Standards-based attribute-based Web SSO system
9 homepage           http://shibboleth.internet2.edu/
10 master_sites       http://shibboleth.internet2.edu/downloads/${name}/cppsp/${version}/
11 distname           ${name}-sp-${version}
12 worksrcdir         ${name}-${version}
13 checksums          sha1 @CHECKSUM@
14
15 depends_lib        port:opensaml \
16                    port:xmltooling \
17                    port:xercesc \
18                    port:xml-security-c \
19                    port:log4shib
20
21 pre-fetch {
22     set status 0
23     if {[catch {exec ${prefix}/bin/curl --version | grep SSL} results]} {
24         if {[lindex $::errorCode 0] eq "CHILDSTATUS"} {
25             set status [lindex $::errorCode 2]
26         } else {
27             set status [lindex $::errorCode 3]
28         }
29     }
30     if {${status} != 0} {
31         return -code error "\n
32     ${name} requires curl to be installed with SSL support.
33     Please deactivate your current curl installation and
34     install the proper version of curl:
35         sudo port deactivate curl
36         sudo port install curl +ssl\n"
37     }
38 }
39
40 configure.args     --with-xmltooling=${prefix} \
41                    --with-opensaml=${prefix} \
42                    --with-xerces=${prefix} \
43                    --with-xmlsec=${prefix} \
44                    --with-log4shib=${prefix}
45
46 variant odbc {
47     depends_lib-append port:unixODBC
48     configure.args-append --enable-odbc
49 }
50
51 destroot.keepdirs ${destroot}${prefix}/var/log/${name} ${destroot}${prefix}/var/log/httpd ${destroot}${prefix}/var/run/${name}
52
53 destroot.args   NOKEYGEN=1
54
55 post-destroot {
56         eval file delete [glob ${destroot}${prefix}/etc/${name}/*.logger]
57         eval file delete [glob ${destroot}${prefix}/etc/${name}/*.html]
58         eval file delete [glob ${destroot}${prefix}/etc/${name}/*.xml]
59     eval file delete [glob ${destroot}${prefix}/etc/${name}/shibd-*]
60         eval file delete [glob ${destroot}${prefix}/lib/${name}/*.la]
61 }
62
63 post-activate {
64     # Make sure initial conf files are present and set up correctly
65     set confDir ${prefix}/etc/${name}
66     foreach f [glob -tails -directory ${confDir} *.dist] {
67         regexp {(.+)\.dist} $f ign destname
68         if {![file exists ${confDir}/${destname}]} {
69             file copy ${confDir}/${f} ${confDir}/${destname}
70         }
71     }
72     system "cd ${prefix}/etc/${name} && ./keygen.sh -b"
73 }
74
75 startupitem.create      yes
76 startupitem.name        shibd
77 startupitem.executable  ${prefix}/sbin/shibd -F -f -p ${prefix}/var/run/${name}/shibd.pid
78
79 livecheck.check         regex
80 livecheck.url           http://shibboleth.internet2.edu/downloads/shibboleth/cppsp/latest/mac/ports/shibboleth/shibboleth/Portfile
81 livecheck.regex         "version *(\\d+\\.\\d+(\\.\\d+)?)"