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

Last change on this file was 148169, checked in by petr@…, 15 months ago

fetch-crl: bump version to 3.0.17

  • 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 148169 2016-04-28 20:18:36Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                fetch-crl
7version             3.0.17
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     922e68915c1b30b266270759e0bcbe5d \
28                    rmd160  73a7d22a8c4575ec745fdc037b79a6549371acbe \
29                    sha256  22f460388416bdabdb59d2f8fd423c5b097886649e4a2650867106a7e6c8cfe7
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.