# -*- 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 135857 2015-05-05 18:38:23Z petr@macports.org $ PortSystem 1.0 name fetch-crl version 3.0.16 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 303c4b5b2b518ba56ac57a737a5741af \ rmd160 9209203dbbe8ff1f00eb753f7e219581e531b898 \ sha256 3e7c3364db3bd7403f54dfb6b970327e75fde8e5a6f722dcb24b4dcfe5a0b641 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 }