source: trunk/dports/security/fetch-crl/Portfile @ 125901

Last change on this file since 125901 was 121398, checked in by petr@…, 5 years ago

fetch-crl @3.0.14: new port, closes #41540

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
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: Portfile 121398 2014-06-24 21:08:59Z petr@macports.org $
3
4PortSystem          1.0
5
6name                fetch-crl
7version             3.0.14
8categories          security net
9platforms           darwin
10supported_archs     noarch
11license             Apache-2
12
13maintainers         nikhef.nl:dennisvd petr 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     c716d7f02f1e3246bd204482bde6078f \
28                    rmd160  f886b64cb14f7021365fa53208d034ec02dc731d \
29                    sha256  b0291883cea0c2399c8f1518403e318f374d3caff495f784f791ebd875306468
30
31use_configure       no
32
33# The main port installs the tools
34subport ${name} {
35    patch {
36        reinplace "s|/etc|${prefix}/etc|g" README
37
38        reinplace "s|/etc|${prefix}/etc|g" fetch-crl
39        reinplace "s|/var|${prefix}/var|g" fetch-crl
40        reinplace "s|/etc|${prefix}/etc|g" fetch-crl.8
41        reinplace "s|/etc|${prefix}/etc|g" fetch-crl.cnf
42        # Note:
43        # `fetch-crl.cnf.example` is not patched
44    }
45
46    destroot.keepdirs   ${destroot}${prefix}/var/cache/fetch-crl
47    destroot.destdir    \
48        PREFIX=${destroot}${prefix} \
49        ETC=${destroot}${prefix}/etc \
50        CACHE=${destroot}${prefix}/var/cache \
51        RELEASE=${name}
52
53    pre-deactivate {
54        ui_msg "Purging fetch-crl cache ...                              "
55        foreach {filename} [ glob ${prefix}/var/cache/fetch-crl/*.state ] {
56            delete $filename
57        }
58    }
59
60    livecheck.type      regex
61    livecheck.url       ${master_sites}
62    livecheck.regex     ">${name}-(\\d+\\.\\d+\\.\\d+)\\${extract.suffix}<"
63}
64
65# The subport provides a launchd item
66subport ${name}-launchd {
67    # update descriptions
68    description         Creates a launchd entry for fetch-crl utility
69    long_description    ${description}. ${long_description}
70
71    depends_run         port:fetch-crl
72
73    distfiles       {}
74    worksrcdir      ${subport}
75
76    startupitem.name    ${name}
77    set plist_label     org.macports.${startupitem.name}
78    set plist_macports  ${prefix}/etc/${startupitem.location}
79    set plist_system    /Library/${startupitem.location}
80
81    extract.mkdir   yes 
82    extract {
83        copy ${filespath}/${startupitem.plist} ${worksrcpath}/
84    }
85
86    configure {
87        reinplace "s|@@LABEL@@|${plist_label}|g" \
88            ${worksrcpath}/${startupitem.plist}
89        reinplace "s|@@PREFIX@@|${prefix}|g" \
90            ${worksrcpath}/${startupitem.plist}
91    }
92
93    build {}
94
95    destroot {
96        xinstall -d ${destroot}${plist_macports}
97        xinstall -d ${destroot}${plist_system}
98        xinstall -m 644 ${worksrcpath}/${startupitem.plist} \
99            ${destroot}${plist_macports}/
100        ln -s ${plist_macports}/${startupitem.plist} \
101            ${destroot}${plist_system}/
102    }
103
104    post-destroot {
105        ui_msg "###########################################################"
106        ui_msg "# A startup item has been generated that will aid in       "
107        ui_msg "# starting fetch-crl with launchd. It is disabled          "
108        ui_msg "# by default. Execute the following command to start it,   "
109        ui_msg "# and to cause it to launch at startup:                    "
110        ui_msg "#                                                          "
111        ui_msg "# sudo port load fetch-crl                                 "
112        ui_msg "###########################################################"
113    }
114
115    livecheck.type  none
116}
Note: See TracBrowser for help on using the repository browser.