diff options
Diffstat (limited to 'sysutils/diskcheckd')
-rw-r--r-- | sysutils/diskcheckd/Makefile | 28 | ||||
-rw-r--r-- | sysutils/diskcheckd/files/Makefile | 2 | ||||
-rw-r--r-- | sysutils/diskcheckd/files/diskcheckd.c | 5 |
3 files changed, 27 insertions, 8 deletions
diff --git a/sysutils/diskcheckd/Makefile b/sysutils/diskcheckd/Makefile index 942df34b0d15..59d2434986b8 100644 --- a/sysutils/diskcheckd/Makefile +++ b/sysutils/diskcheckd/Makefile @@ -8,6 +8,7 @@ PORTNAME= diskcheckd PORTVERSION= 20010823 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= # part of port DISTFILES= # part of port @@ -17,20 +18,35 @@ MAINTAINER= ports@FreeBSD.org STARTUP= diskcheckd.sh MAN8= diskcheckd.8 +MLINKS= diskcheckd.8 diskcheckd.conf.5 + +MANCOMPRESSED= no NO_WRKSUBDIR= yes +CFLAGS+= -D_PATH_CONF='\"${PREFIX}/etc\"' + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +BROKEN= "Not tested on anything less than 5.0, use at discretion" +.endif + do-extract: @${MKDIR} ${WRKSRC} - @(cd ${FILESDIR} && pax -r -w * ${WRKSRC}) -do-build: - cd ${WRKSRC} && ${CC} ${CFLAGS} -DCONFPATH=\"${PREFIX}/etc\" -o diskcheckd diskcheckd.c +.for file in Makefile diskcheckd.c diskcheckd.8 + @(cd ${WRKSRC} ; ${LN} -f ${FILESDIR}/${file} .) +.endfor + +do-patch: + @${PERL} -pi.fbsd -e 's|/usr/local/sbin|${PREFIX}/sbin|g' ${WRKSRC}/Makefile do-install: ${INSTALL_PROGRAM} ${WRKSRC}/diskcheckd ${PREFIX}/sbin - ${INSTALL_DATA} ${WRKSRC}/diskcheckd.conf ${PREFIX}/etc/diskcheckd.conf.sample - ${INSTALL_SCRIPT} ${WRKSRC}/diskcheckd.sh ${PREFIX}/etc/rc.d + ${INSTALL_DATA} ${FILESDIR}/diskcheckd.conf ${PREFIX}/etc/diskcheckd.conf.sample + ${INSTALL_SCRIPT} ${FILESDIR}/diskcheckd.sh ${PREFIX}/etc/rc.d ${INSTALL_MAN} ${WRKSRC}/diskcheckd.8 ${PREFIX}/man/man8 + ${LN} -sf ${PREFIX}/man/man8/diskcheckd.8 ${PREFIX}/man/man5/diskcheckd.conf.5 -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/sysutils/diskcheckd/files/Makefile b/sysutils/diskcheckd/files/Makefile index 265acaa4c28e..ac43ee02e970 100644 --- a/sysutils/diskcheckd/files/Makefile +++ b/sysutils/diskcheckd/files/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR?= /usr/sbin +BINDIR?= /usr/local/sbin PROG= diskcheckd MAN8= diskcheckd.8 diff --git a/sysutils/diskcheckd/files/diskcheckd.c b/sysutils/diskcheckd/files/diskcheckd.c index 0b41beca526b..c3f2f8e47def 100644 --- a/sysutils/diskcheckd/files/diskcheckd.c +++ b/sysutils/diskcheckd/files/diskcheckd.c @@ -47,7 +47,10 @@ static const char rcsid[] = #define DKTYPENAMES #include <sys/disklabel.h> -#define _PATH_CONF "/etc/diskcheckd.conf" +#ifndef _PATH_CONF +#define _PATH_CONF "/usr/local/etc/diskcheckd.conf" +#endif + #define _PATH_SAVE _PATH_VARDB"diskcheckd.offsets" #define READ_SIZE (64 << 10) |