Ticket #41540: Portfile.2

File Portfile.2, 3.8 KB (added by petrrr, 10 years ago)

new version of the Portfile, updated to @3.0.13

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem          1.0
5
6name                fetch-crl
7version             3.0.13
8categories          security net
9platforms           darwin
10supported_archs     noarch
11license             Apache-2
12
13maintainers         nikhef.nl:dennisvd bo.ingv.it:Peter.Danecek openmaintainer
14
15description         Download tool for Certificate Revocation Lists
16
17long_description    \
18    The fetch-crl utility will retrieve certificate revocation lists (CRLs) \
19    for a set of installed trust anchors, based on crl_url files or \
20    IGTF-style info files. It will install these for use with OpenSSL, NSS \
21    or third-party tools.
22
23homepage            http://wiki.nikhef.nl/grid/FetchCRL3
24
25master_sites        http://dist.eugridpma.info/distribution/util/fetch-crl3/
26
27checksums           md5     aad7460f67f7ea4ca4809b5acdcc651c \
28                    rmd160  1a57d2ff972f726e3a12a9c1e00d2b4f3d90ebde \
29                    sha256  90b2f3a24e8dd88cdc36e53cfe95b5e23e3772202c16e2a7f4b559482b0cdbbe
30
31use_configure       no
32
33patch {
34    reinplace "s|/etc|${prefix}/etc|g" README
35
36    reinplace "s|/etc|${prefix}/etc|g" fetch-crl
37    reinplace "s|/var|${prefix}/var|g" fetch-crl
38    reinplace "s|/etc|${prefix}/etc|g" fetch-crl.8
39    reinplace "s|/etc|${prefix}/etc|g" fetch-crl.cnf
40    #reinplace "s|/etc|${prefix}/etc|g" fetch-crl.cnf.example
41    #reinplace "s|/var|${prefix}/var|g" fetch-crl.cnf.example
42
43    # might be not necessary
44    #system "echo 'statedir ${prefix}/var/cache/fetch-crl' >> ${worksrcpath}/fetch-crl.cnf"
45}
46
47destroot.keepdirs   ${destroot}${prefix}/var/cache/fetch-crl
48destroot.destdir    \
49    PREFIX=${destroot}${prefix} \
50    ETC=${destroot}${prefix}/etc \
51    CACHE=${destroot}${prefix}/var/cache \
52    RELEASE=${name}
53
54
55livecheck.type      regex
56livecheck.url       ${master_sites}
57livecheck.regex     ">${name}-(\\d+\\.\\d+\\.\\d+)\\${extract.suffix}<"
58
59
60# This subport sets up a launchd item
61subport ${name}-launchd {
62
63    description         Creates a launchd entry for fetch-crl utility
64    long_description    ${description}. ${long_description}
65
66    startupitem.name    ${name}
67
68    set plist_label     org.macports.${startupitem.name}
69    set plist_macports  ${prefix}/etc/${startupitem.location}
70    set plist_system    /Library/${startupitem.location}
71
72    depends_run         port:fetch-crl
73
74    distfiles       {}
75    worksrcdir      ${subport}
76
77    extract.mkdir   yes 
78    extract {
79        copy ${filespath}/${startupitem.plist} ${worksrcpath}/
80    }
81
82    patch {}
83
84    configure {
85        reinplace "s|@@LABEL@@|${plist_label}|g" \
86            ${worksrcpath}/${startupitem.plist}
87        reinplace "s|@@PREFIX@@|${prefix}|g" \
88            ${worksrcpath}/${startupitem.plist}
89    }
90
91    build {}
92
93    destroot {
94        xinstall -d ${destroot}${plist_macports}
95        xinstall -d ${destroot}${plist_system}
96        xinstall -m 644 ${worksrcpath}/${startupitem.plist} \
97            ${destroot}${plist_macports}/
98        ln -s ${plist_macports}/${startupitem.plist} \
99            ${destroot}${plist_system}/
100    }
101
102    post-destroot {
103        ui_msg "###########################################################"
104        ui_msg "# A startup item has been generated that will aid in       "
105        ui_msg "# starting fetch-crl with launchd. It is disabled          "
106        ui_msg "# by default. Execute the following command to start it,   "
107        ui_msg "# and to cause it to launch at startup:                    "
108        ui_msg "#                                                          "
109        ui_msg "# sudo port load fetch-crl                                 "
110        ui_msg "###########################################################"
111    }
112
113    livecheck.type  none
114}