Ticket #56725: fetch-crl-Portfile.diff

File fetch-crl-Portfile.diff, 2.7 KB (added by jmroot (Joshua Root), 6 years ago)
  • security/fetch-crl/Portfile

    diff --git a/security/fetch-crl/Portfile b/security/fetch-crl/Portfile
    index 96416a7ce5..6af80176fe 100644
    a b subport ${name} { 
    6363
    6464# The subport provides a launchd item
    6565subport ${name}-launchd {
     66    revision            1
    6667    # update descriptions
    6768    description         Creates a launchd entry for fetch-crl utility
    6869    long_description    ${description}. ${long_description}
    subport ${name}-launchd { 
    7273    distfiles       {}
    7374    worksrcdir      ${subport}
    7475
     76    startupitem.create  no
     77    startupitem.type    launchd
    7578    startupitem.name    ${name}
    76     set plist_label     org.macports.${startupitem.name}
    7779    set plist_macports  ${prefix}/etc/${startupitem.location}
    7880    set plist_system    /Library/${startupitem.location}
    7981
    subport ${name}-launchd { 
    8385    }
    8486
    8587    configure {
    86         reinplace "s|@@LABEL@@|${plist_label}|g" \
     88        reinplace "s|@@LABEL@@|${startupitem.uniquename}|g" \
    8789            ${worksrcpath}/${startupitem.plist}
    8890        reinplace "s|@@PREFIX@@|${prefix}|g" \
    8991            ${worksrcpath}/${startupitem.plist}
    subport ${name}-launchd { 
    9294    build {}
    9395
    9496    destroot {
    95         xinstall -d ${destroot}${plist_macports}
     97        xinstall -d ${destroot}${plist_macports}/${startupitem.uniquename}
    9698        xinstall -d ${destroot}${plist_system}
    9799        xinstall -m 644 ${worksrcpath}/${startupitem.plist} \
    98             ${destroot}${plist_macports}/
    99         ln -s ${plist_macports}/${startupitem.plist} \
    100             ${destroot}${plist_system}/
    101     }
    102 
    103     post-destroot {
    104         ui_msg "###########################################################"
    105         ui_msg "# A startup item has been generated that will aid in       "
    106         ui_msg "# starting fetch-crl with launchd. It is disabled          "
    107         ui_msg "# by default. Execute the following command to start it,   "
    108         ui_msg "# and to cause it to launch at startup:                    "
    109         ui_msg "#                                                          "
    110         ui_msg "# sudo port load fetch-crl                                 "
    111         ui_msg "###########################################################"
     100            ${destroot}${plist_macports}/${startupitem.uniquename}
     101        if {${startupitem.install}} {
     102            ln -s ${plist_macports}/${startupitem.uniquename}/${startupitem.plist} \
     103                ${destroot}${plist_system}
     104        } else {
     105            ln -s ${plist_macports}/${startupitem.uniquename}/${startupitem.plist} \
     106                ${destroot}${plist_macports}
     107        }
    112108    }
    113109
    114110    livecheck.type  none