# -*- 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 110080 2013-08-25 22:36:52Z stromnov@macports.org $

PortSystem          1.0

name                smartmontools
version             6.2
categories          sysutils
license             GPL-2+
platforms           darwin

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/
master_sites        sourceforge

checksums           rmd160  e56a6d36a0adb64bb5c6c5f64bc0fea8ecb7b3ef \
                    sha256  486f660579bb0fb4f6b927ded7531cb1f99685c666397377761c5b04dd96065b

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
