# -*- 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 # $Id: Portfile 121369 2014-06-24 08:39:48Z petr@macports.org $ PortSystem 1.0 name fetch-crl version 3.0.14 categories security net platforms darwin supported_archs noarch license Apache-2 maintainers nikhef.nl:dennisvd petr openmaintainer description Download tool for Certificate Revocation Lists long_description \ The fetch-crl utility will retrieve certificate revocation lists (CRLs) \ for a set of installed trust anchors, based on crl_url files or \ IGTF-style info files. It will install these for use with OpenSSL, NSS \ or third-party tools. homepage http://wiki.nikhef.nl/grid/FetchCRL3 master_sites http://dist.eugridpma.info/distribution/util/fetch-crl3/ checksums md5 c716d7f02f1e3246bd204482bde6078f \ rmd160 f886b64cb14f7021365fa53208d034ec02dc731d \ sha256 b0291883cea0c2399c8f1518403e318f374d3caff495f784f791ebd875306468 use_configure no # The main port installs the tools subport ${name} { patch { reinplace "s|/etc|${prefix}/etc|g" README reinplace "s|/etc|${prefix}/etc|g" fetch-crl reinplace "s|/var|${prefix}/var|g" fetch-crl reinplace "s|/etc|${prefix}/etc|g" fetch-crl.8 reinplace "s|/etc|${prefix}/etc|g" fetch-crl.cnf # Note: # `fetch-crl.cnf.example` is not patched } destroot.keepdirs ${destroot}${prefix}/var/cache/fetch-crl destroot.destdir \ PREFIX=${destroot}${prefix} \ ETC=${destroot}${prefix}/etc \ CACHE=${destroot}${prefix}/var/cache \ RELEASE=${name} pre-deactivate { ui_msg "Purging fetch-crl cache ... " foreach {filename} [ glob ${prefix}/var/cache/fetch-crl/*.state ] { delete $filename } } livecheck.type regex livecheck.url ${master_sites} livecheck.regex ">${name}-(\\d+\\.\\d+\\.\\d+)\\${extract.suffix}<" } # The subport provides a launchd item subport ${name}-launchd { # update descriptions description Creates a launchd entry for fetch-crl utility long_description ${description}. ${long_description} depends_run port:fetch-crl distfiles {} worksrcdir ${subport} startupitem.name ${name} set plist_label org.macports.${startupitem.name} set plist_macports ${prefix}/etc/${startupitem.location} set plist_system /Library/${startupitem.location} extract.mkdir yes extract { copy ${filespath}/${startupitem.plist} ${worksrcpath}/ } configure { reinplace "s|@@LABEL@@|${plist_label}|g" \ ${worksrcpath}/${startupitem.plist} reinplace "s|@@PREFIX@@|${prefix}|g" \ ${worksrcpath}/${startupitem.plist} } build {} destroot { xinstall -d ${destroot}${plist_macports} xinstall -d ${destroot}${plist_system} xinstall -m 644 ${worksrcpath}/${startupitem.plist} \ ${destroot}${plist_macports}/ ln -s ${plist_macports}/${startupitem.plist} \ ${destroot}${plist_system}/ } post-destroot { ui_msg "###########################################################" ui_msg "# A startup item has been generated that will aid in " ui_msg "# starting fetch-crl with launchd. It is disabled " ui_msg "# by default. Execute the following command to start it, " ui_msg "# and to cause it to launch at startup: " ui_msg "# " ui_msg "# sudo port load fetch-crl " ui_msg "###########################################################" } livecheck.type none }