aboutsummaryrefslogtreecommitdiff
path: root/net/openafs
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2011-06-27 03:33:55 +0000
committerHiroki Sato <hrs@FreeBSD.org>2011-06-27 03:33:55 +0000
commitdc9c15e0ad17f0216a7515b1f9290ee3cc9837df (patch)
treedcdb8d9605ee27bb66e224ff0a3cdf199b3c411e /net/openafs
parent2fe7b848d0b3569819cb637770c3e5fe901a4980 (diff)
downloadports-dc9c15e0ad17f0216a7515b1f9290ee3cc9837df.tar.gz
ports-dc9c15e0ad17f0216a7515b1f9290ee3cc9837df.zip
Notes
Diffstat (limited to 'net/openafs')
-rw-r--r--net/openafs/Makefile23
-rw-r--r--net/openafs/pkg-plist11
2 files changed, 27 insertions, 7 deletions
diff --git a/net/openafs/Makefile b/net/openafs/Makefile
index 1dddd392d549..16ea49c1c01e 100644
--- a/net/openafs/Makefile
+++ b/net/openafs/Makefile
@@ -8,6 +8,7 @@
PORTNAME= openafs
DISTVERSION= 1.6.0pre6
+PORTREVISION= 1
CATEGORIES= net kld
MASTER_SITES= http://dl.central.org/dl/openafs/candidate/${DISTVERSION}/:openafs \
http://dl.openafs.org/dl/openafs/candidate/${DISTVERSION}/:openafs \
@@ -32,14 +33,27 @@ USE_RC_SUBR= afsd afsserver
ONLY_FOR_ARCHS= i386 amd64
+AFSMNTDIR?= /afs
+AFSSTATEDIR?= /var/${PORTNAME}
+AFSCACHEDIR?= ${AFSSTATEDIR}/cache
+PLIST_SUB+= AFSMNTDIR=${AFSMNTDIR:C,^/,,} \
+ AFSSTATEDIR=${AFSSTATEDIR:C,^/,,} \
+ AFSCACHEDIR=${AFSCACHEDIR:C,^/,,}
+
.include <bsd.port.pre.mk>
KERNCONF?= GENERIC
KERNCONFDIR?= ${SRC_BASE}/sys/${ARCH}/conf
KMODDIR= /boot/modules
+PLIST_SUB+= KMODDIR=${KMODDIR:C,^/,,}
+
+# Use the first component of ${KERNCONF}.
+.for K in ${KERNCONF}
+_KERNCONF?=$K
+.endfor
-.if !exists(${KERNCONFDIR}/${KERNCONF})
-IGNORE= requires kernel configuration file ${KERNCONF} to build
+.if !exists(${KERNCONFDIR}/${_KERNCONF})
+IGNORE= requires kernel configuration file ${_KERNCONF} to build
.endif
.if ${OSVERSION} < 800000
@@ -73,11 +87,11 @@ CONFLICTS= heimdal-[0-9]*
post-extract:
${MKDIR} ${WRKDIR}/conf
- cd ${KERNCONFDIR} && /usr/sbin/config -d ${WRKDIR}/conf ${KERNCONF}
+ cd ${KERNCONFDIR} && /usr/sbin/config -d ${WRKDIR}/conf ${_KERNCONF}
create-sample-files:
@${ECHO_CMD} openafs.org > ${WRKDIR}/ThisCell
- @${ECHO_CMD} '/afs:/usr/vice/cache:150000' > ${WRKDIR}/cacheinfo
+ @${ECHO_CMD} "${AFSMNTDIR}:${AFSCACHEDIR}:150000" > ${WRKDIR}/cacheinfo
@${INSTALL_DATA} ${DISTDIR}/CellServDB ${WRKDIR}/CellServDB
post-install: create-sample-files
@@ -91,6 +105,7 @@ post-install: create-sample-files
${INSTALL_KLD} ${PREFIX}/lib/openafs/libafs.ko ${KMODDIR}/
@${RM} ${PREFIX}/lib/openafs/libafs.ko
@${RMDIR} ${PREFIX}/lib/openafs
+ ${MKDIR} ${AFSMNTDIR} ${AFSSTATEDIR} ${AFSCACHEDIR}
/usr/sbin/kldxref ${KMODDIR}
.include <bsd.port.post.mk>
diff --git a/net/openafs/pkg-plist b/net/openafs/pkg-plist
index c30b9a585217..5f46340e5527 100644
--- a/net/openafs/pkg-plist
+++ b/net/openafs/pkg-plist
@@ -280,6 +280,11 @@ etc/openafs/cacheinfo.sample
@dirrmtry etc/openafs
@dirrm %%DATADIR%%/C
@dirrm %%DATADIR%%
-@cwd /boot/modules
-libafs.ko
-@exec kldxref /boot/modules
+@cwd /
+%%KMODDIR%%/libafs.ko
+@exec /usr/sbin/kldxref /%%KMODDIR%%
+@unexec /usr/sbin/kldxref /%%KMODDIR%%
+@exec /bin/mkdir -p %D/%%AFSMNTDIR%% %D/%%AFSSTATEDIR%% %D/%%AFSCACHEDIR%%
+@dirrmtry %%AFSMNTDIR%%
+@dirrmtry %%AFSCACHEDIR%%
+@dirrmtry %%AFSSTATEDIR%%