freebsd-ports/sysutils/smartmontools/Makefile
Doug Barton ffde46cbf9 Now that new style rc.d scripts are being run as part of the
base rcorder, hard coded variable values in these scripts
are overriding the values in /etc/rc.conf[.local] (due to
the way that variables from the latter are read at boot time).

Therefore, change the boot scripts to set default values only
if the variable is unset in /etc/rc.conf[.local]. This will
allow the service to start at boot time if it's been enabled
as the user would expect.

This change will be a noop for users who have systems that
have not yet been upgraded to the new rc.d code in the base.

In many cases there are other variables in the scripts that
should get similar treatment, however I did not change
anything other than the _enable lines. I'll leave the rest
up to the maintainers to do as they see fit.

Bump PORTREVISION to make sure that users and packages
pick up this change.
2006-01-07 06:29:57 +00:00

54 lines
1.6 KiB
Makefile

# New ports collection makefile for: smartmontools
# Date created: 12 October 2003
# Whom: Eduard Martinescu
#
# $FreeBSD$
#
PORTNAME= smartmontools
PORTVERSION= 5.33
PORTREVISION= 5
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= martines@rochester.rr.com
COMMENT= S.M.A.R.T. disk monitoring tools
USE_GMAKE= yes
USE_RC_SUBR= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-initscriptdir=${PREFIX}/etc/rc.d \
--with-docdir=${DOCSDIR} --enable-sample
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
PROGRAMS= smartctl smartd
MAN5= smartd.conf.5
MAN8= smartd.8 smartctl.8
DOCS= AUTHORS CHANGELOG INSTALL NEWS README TODO WARNINGS
EXAMPLES= smartd.conf examplescripts/README examplescripts/Example?
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
post-build:
${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/smartd.sh > ${WRKDIR}/smartd.sh
do-install:
cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PROGRAMS} ${PREFIX}/sbin
cd ${WRKSRC} && ${INSTALL_MAN} ${MAN5} ${MANPREFIX}/man/man5
cd ${WRKSRC} && ${INSTALL_MAN} ${MAN8} ${MANPREFIX}/man/man8
${INSTALL_DATA} ${WRKSRC}/smartd.conf.sample ${PREFIX}/etc
${INSTALL_SCRIPT} ${WRKDIR}/smartd.sh ${PREFIX}/etc/rc.d/smartd.sh
@${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
.include <bsd.port.pre.mk>
post-install:
${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>