# $Id: Portfile 86525 2011-10-27 10:00:52Z takanori@macports.org $

PortSystem 1.0

name            smartmontools
version         5.42
revision        1
categories      sysutils
maintainers     takanori openmaintainer
description     SMART hard drive monitoring
long_description \
    Two utility programs (smartctl and smartd) to control and monitor \
    storage systems using the Self-Monitoring, Analysis and Reporting \
    Technology System (SMART) built into most modern ATA and SCSI hard \
    disks. In many cases, these utilities will provide advanced warning \
    of disk degradation and failure.
homepage        http://smartmontools.sourceforge.net/
platforms       darwin
license         GPL-2+
master_sites    sourceforge
checksums       md5     4460bf9a79a1252ff5c00ba52cf76b2a \
                sha1    52f966abeb23458acc0ec734f2d6ab432f6b5a7d \
                rmd160  c8d111719de20319c2f30614726084ee890b3a02
configure.args  --mandir=${prefix}/share/man \
                --enable-drivedb \
                --disable-savestates \
                --disable-attributelog \
                --enable-sample \
                --with-libcap-ng=no

destroot.keepdirs   ${destroot}${prefix}/var/run \
                    ${destroot}${prefix}/var/lib/smartmontools

default_variants    +savestates +attributelog

variant savestates description {Use default smartd state files} {
    configure.args-delete --disable-savestates
    configure.args-append --enable-savestates
}

variant attributelog description {Use default smartd attribute log files} {
    configure.args-delete --disable-attributelog
    configure.args-append --enable-attributelog
}

startupitem.create      yes
startupitem.name        smartd
startupitem.executable  ${prefix}/sbin/smartd -p ${prefix}/var/run/smartd.pid
startupitem.pidfile     auto ${prefix}/var/run/smartd.pid
