File: Portfile.in

package info (click to toggle)
shibboleth-sp2 2.3.1%2Bdfsg-5%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 4,812 kB
  • ctags: 3,333
  • sloc: cpp: 29,256; sh: 9,094; makefile: 684; xml: 326; ansic: 32
file content (81 lines) | stat: -rw-r--r-- 2,904 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
PortSystem 1.0

name               @PACKAGE@
version            @PACKAGE_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/${name}/cppsp/${version}/
distname           ${name}-sp-${version}
worksrcdir         ${name}-${version}
checksums          sha1 @CHECKSUM@

depends_lib        port:opensaml \
                   port:xmltooling \
                   port:xercesc \
                   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} \
                   --with-xmlsec=${prefix} \
                   --with-log4shib=${prefix}

variant odbc {
    depends_lib-append port:unixODBC
    configure.args-append --enable-odbc
}

destroot.keepdirs ${destroot}${prefix}/var/log/${name} ${destroot}${prefix}/var/log/httpd ${destroot}${prefix}/var/run/${name}

destroot.args	NOKEYGEN=1

post-destroot {
	eval file delete [glob ${destroot}${prefix}/etc/${name}/*.logger]
	eval file delete [glob ${destroot}${prefix}/etc/${name}/*.html]
	eval file delete [glob ${destroot}${prefix}/etc/${name}/*.xml]
    eval file delete [glob ${destroot}${prefix}/etc/${name}/shibd-*]
	eval file delete [glob ${destroot}${prefix}/lib/${name}/*.la]
}

post-activate {
    # Make sure initial conf files are present and set up correctly
    set confDir ${prefix}/etc/${name}
    foreach f [glob -tails -directory ${confDir} *.dist] {
        regexp {(.+)\.dist} $f ign destname
        if {![file exists ${confDir}/${destname}]} {
            file copy ${confDir}/${f} ${confDir}/${destname}
        }
    }
    system "cd ${prefix}/etc/${name} && ./keygen.sh -b"
}

startupitem.create      yes
startupitem.name        shibd
startupitem.executable  ${prefix}/sbin/shibd -F -f -p ${prefix}/var/run/${name}/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+)?)"