Ticket #27311: smartmontools.diff

File smartmontools.diff, 2.0 KB (added by takanori@…, 14 years ago)

smartmontools.diff

  • files/net.sourceforge.smartmontools.smartd.plist

     
    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    3 <plist version="1.0">
    4 <dict>
    5         <key>Label</key>
    6         <string>net.sourceforge.smartmontools.smartd</string>
    7         <key>ProgramArguments</key>
    8         <array>
    9                 <string>__PREFIX__/sbin/smartd</string>
    10                 <string>-n</string>
    11         </array>
    12         <key>KeepAlive</key>
    13         <true/>
    14 </dict>
    15 </plist>
  • Portfile

     
    44
    55name            smartmontools
    66version         5.40
     7revision        1
    78categories      sysutils
    89maintainers     toby
    910description     SMART hard drive monitoring
     
    2728                --enable-sample \
    2829                --with-libcap-ng=no
    2930
    30 platform darwin {
    31     destroot.violate_mtree  yes
    32     post-destroot {
    33         file delete -force ${destroot}${prefix}/etc/rc.d
    34 
    35         set launchd_path ${destroot}/Library/LaunchDaemons
    36         set launchd_plist net.sourceforge.smartmontools.smartd.plist
    37 
    38         xinstall -d ${launchd_path}
    39         xinstall -m 0644 ${filespath}/${launchd_plist} ${launchd_path}
    40         reinplace s|__PREFIX__|${prefix}| ${launchd_path}/${launchd_plist}
    41 
    42         if {${os.major} < 9} {
    43             reinplace s|KeepAlive|OnDemand| ${launchd_path}/${launchd_plist}
    44             reinplace s|true|false| ${launchd_path}/${launchd_plist}
    45         }
    46     }
     31post-destroot {
     32    delete ${destroot}${prefix}/etc/rc.d
    4733}
     34
     35startupitem.create      yes
     36startupitem.name        smartd
     37startupitem.executable  ${prefix}/sbin/smartd -p ${prefix}/var/run/smartd.pid
     38startupitem.pidfile     auto ${prefix}/var/run/smartd.pid