Ticket #20759: py25-denyhosts.2.diff

File py25-denyhosts.2.diff, 2.2 KB (added by nerdling (Jeremy Lavergne), 15 years ago)

updated patch to use python variants and macports' startupitem

  • Portfile

     
    22# $Id$
    33
    44PortSystem          1.0
    5 PortGroup           python25 1.0
    65
    76name                denyhosts
    87version             2.6
    9 categories          security sysutils
    108maintainers         snc openmaintainer
    119description         DenyHosts is a utility to help sys admins thwart ssh hackers
    1210long_description    DenyHosts is a python program that automatically blocks ssh\
     
    2523patchfiles          patch-denyhosts.cfg-dist.diff \
    2624                    patch-daemon-control-dist.diff
    2725
     26variant python25 conflicts python26 description {Use Python 2.5} {
     27    PortGroup       python25 1.0
     28    categories      security sysutils
     29}
     30
     31variant python26 conflicts python25 description {Use Python 2.6} {
     32    PortGroup       python26 1.0
     33    categories      security sysutils
     34}
     35
     36if {![variant_isset python25] && ![variant_isset python26]} {
     37    default_variants +python25
     38}
     39
    2840build {}
    2941
    3042pre-build {
     
    3345    reinplace s|@PYTHON@|${python.bin}| ${worksrcpath}/daemon-control-dist
    3446    reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/daemon-control-dist
    3547    reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/denyhosts.cfg-dist
     48    reinplace s|@PREFIX@|${prefix}| ${filespath}/denyhosts.plist
    3649}
    3750
     51pre-destroot {
     52    xinstall -d ${destroot}${prefix}/var/run/
     53    xinstall -d ${destroot}${prefix}/var/log/
     54}
    3855post-destroot {
     56    ui_msg ""
    3957    ui_msg "    Please read ${prefix}/share/denyhosts/README.txt"
     58    ui_msg ""
     59    ui_msg "    You need to make config files in ${prefix}/share/denyhosts"
     60    ui_msg "    The files ending with '-dist' are examples for you to copy"
     61    ui_msg ""
    4062}
     63destroot.keepdirs   ${destroot}${prefix}/var/run \
     64                    ${destroot}${prefix}/var/log
    4165
    4266startupitem.create  yes
    4367startupitem.type    launchd
    44 startupitem.start   ${prefix}/share/denyhosts/daemon-control-dist start
    45 startupitem.stop    ${prefix}/share/denyhosts/daemon-control-dist stop
    46 
    47 livecheck.name      denyhosts
     68startupitem.start   "${prefix}/share/denyhosts/daemon-control start"
     69startupitem.stop    "${prefix}/share/denyhosts/daemon-control stop"