summaryrefslogtreecommitdiffstats
path: root/sysutils/diskcheckd
diff options
context:
space:
mode:
authordwcjr <dwcjr@FreeBSD.org>2001-08-28 16:52:45 +0000
committerdwcjr <dwcjr@FreeBSD.org>2001-08-28 16:52:45 +0000
commit64035dd1f967d95139369e368c0a32792ab1c76c (patch)
treeced85a31fff8d2b41a6f7c25d792b656637a5e62 /sysutils/diskcheckd
parentdf7dcef6219c7da37a58c5e59910b5b2b5c7f7ec (diff)
downloadFreeBSD-ports-64035dd1f967d95139369e368c0a32792ab1c76c.zip
FreeBSD-ports-64035dd1f967d95139369e368c0a32792ab1c76c.tar.gz
Change method in do-extract to ${LN} instead of pax
Change BROKEN= warning to state that it hasn't been tested on 4.x or lower Use programs Makefile to build and add CFLAGS+= for location of config file Modify default install location in files/Makefile Change default location of config file to match default ports config file in diskcheckd.c Bump PORTREVISION
Diffstat (limited to 'sysutils/diskcheckd')
-rw-r--r--sysutils/diskcheckd/Makefile28
-rw-r--r--sysutils/diskcheckd/files/Makefile2
-rw-r--r--sysutils/diskcheckd/files/diskcheckd.c5
3 files changed, 27 insertions, 8 deletions
diff --git a/sysutils/diskcheckd/Makefile b/sysutils/diskcheckd/Makefile
index 942df34..59d2434 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 265acaa..ac43ee0 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 0b41bec..c3f2f8e 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)
OpenPOWER on IntegriCloud