2011-05-25 00:09:37 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= openafs
|
2011-08-20 15:43:54 +00:00
|
|
|
DISTVERSION= ${AFS_DISTVERSION}.${DBVERSION:S/-//g}
|
2014-02-18 03:50:18 +00:00
|
|
|
CATEGORIES= net
|
2011-09-19 19:58:16 +00:00
|
|
|
MASTER_SITES= http://dl.central.org/dl/openafs/${AFS_DISTVERSION}/:openafs \
|
|
|
|
http://dl.openafs.org/dl/openafs/${AFS_DISTVERSION}/:openafs \
|
2011-05-25 00:09:37 +00:00
|
|
|
http://dl.central.org/dl/cellservdb/:gco \
|
|
|
|
http://grand.central.org/dl/cellservdb/:gco
|
2011-08-19 17:46:28 +00:00
|
|
|
DISTFILES= ${PORTNAME}-${AFS_DISTVERSION}-src.tar.bz2:openafs \
|
|
|
|
${PORTNAME}-${AFS_DISTVERSION}-doc.tar.bz2:openafs \
|
|
|
|
CellServDB.${DBVERSION}:gco
|
|
|
|
EXTRACT_ONLY= ${PORTNAME}-${AFS_DISTVERSION}-src.tar.bz2 \
|
|
|
|
${PORTNAME}-${AFS_DISTVERSION}-doc.tar.bz2
|
2011-05-25 00:09:37 +00:00
|
|
|
|
2013-01-04 21:06:25 +00:00
|
|
|
MAINTAINER= bjk@FreeBSD.org
|
2011-05-25 00:09:37 +00:00
|
|
|
COMMENT= AFS implementation from openafs.org
|
|
|
|
|
2011-07-19 21:49:20 +00:00
|
|
|
LICENSE= IPLv1
|
|
|
|
LICENSE_NAME= IBM Public License Version 1.0
|
|
|
|
LICENSE_FILE= ${WRKSRC}/doc/LICENSE
|
2014-08-22 09:01:52 +00:00
|
|
|
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
2011-07-19 21:49:20 +00:00
|
|
|
|
2014-04-09 14:38:27 +00:00
|
|
|
AFS_DISTVERSION=1.6.7
|
2013-06-03 18:29:50 +00:00
|
|
|
DBVERSION= 2013-01-28
|
2011-08-19 17:46:28 +00:00
|
|
|
|
2014-02-18 03:50:18 +00:00
|
|
|
USES= kmod
|
2011-05-25 00:09:37 +00:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
PATCH_STRIP= -p1
|
|
|
|
USE_BZIP2= yes
|
|
|
|
HAS_CONFIGURE= yes
|
2014-04-09 14:38:27 +00:00
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX} \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=${MANPREFIX}/man \
|
|
|
|
--with-bsd-kernel-headers=${SRC_BASE}/sys \
|
|
|
|
--with-bsd-kernel-build=${WRKDIR}/conf \
|
|
|
|
--enable-debug \
|
|
|
|
--enable-debug-kernel \
|
|
|
|
--enable-debug-lwp \
|
|
|
|
--includedir=${PREFIX}/include/openafs \
|
|
|
|
${CONFIGURE_TARGET}
|
2014-02-18 03:50:18 +00:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${AFS_DISTVERSION}
|
2011-05-25 00:09:37 +00:00
|
|
|
USE_RC_SUBR= afsd afsserver
|
|
|
|
|
2014-02-18 03:50:18 +00:00
|
|
|
CONFLICTS= coda-server-6.[0-9]* heimdal-[0-9]*
|
2011-05-25 00:09:37 +00:00
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
|
|
|
2011-06-27 03:33:55 +00:00
|
|
|
AFSMNTDIR?= /afs
|
|
|
|
AFSSTATEDIR?= /var/${PORTNAME}
|
|
|
|
AFSCACHEDIR?= ${AFSSTATEDIR}/cache
|
|
|
|
PLIST_SUB+= AFSMNTDIR=${AFSMNTDIR:C,^/,,} \
|
|
|
|
AFSSTATEDIR=${AFSSTATEDIR:C,^/,,} \
|
|
|
|
AFSCACHEDIR=${AFSCACHEDIR:C,^/,,}
|
|
|
|
|
2013-12-02 05:01:19 +00:00
|
|
|
# clang (the base system compiler in __FreeBSD_version 1000024 and later)
|
|
|
|
# is pickier about stack alignment than gcc; OpenAFS uses its own
|
|
|
|
# lightweight process "threading" library which will produce a misaligned
|
|
|
|
# stack under clang; we need to pass -mstackrealign to avoid SIGBUS at
|
|
|
|
# runtime. gcc does not understand this flag, so we use compiler.mk to
|
|
|
|
# figure out what type of compiler is in use.
|
2014-04-09 14:38:27 +00:00
|
|
|
USES+= compiler
|
2013-12-02 05:01:19 +00:00
|
|
|
|
2014-02-18 03:50:18 +00:00
|
|
|
OPTIONS_DEFINE= FUSE
|
|
|
|
FUSE_USES= fuse
|
|
|
|
OPTIONS_SUB= yes
|
|
|
|
FUSE_CONFIGURE_OFF= --disable-fuse-client
|
|
|
|
|
2011-06-20 07:09:36 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
KERNCONF?= GENERIC
|
|
|
|
KERNCONFDIR?= ${SRC_BASE}/sys/${ARCH}/conf
|
2011-06-27 03:33:55 +00:00
|
|
|
|
|
|
|
# Use the first component of ${KERNCONF}.
|
|
|
|
.for K in ${KERNCONF}
|
|
|
|
_KERNCONF?=$K
|
|
|
|
.endfor
|
2011-05-25 00:09:37 +00:00
|
|
|
|
2011-06-27 03:33:55 +00:00
|
|
|
.if !exists(${KERNCONFDIR}/${_KERNCONF})
|
|
|
|
IGNORE= requires kernel configuration file ${_KERNCONF} to build
|
2011-06-20 07:09:36 +00:00
|
|
|
.endif
|
2011-05-25 00:09:37 +00:00
|
|
|
|
|
|
|
.if ${OSVERSION} < 800000
|
|
|
|
IGNORE= supports FreeBSD 8.0 and later
|
|
|
|
.endif
|
|
|
|
|
2011-07-19 21:49:20 +00:00
|
|
|
# Do not show users the reminder about cleandepend and depend
|
2011-06-20 07:09:36 +00:00
|
|
|
post-extract:
|
|
|
|
${MKDIR} ${WRKDIR}/conf
|
2014-02-18 03:50:18 +00:00
|
|
|
cd ${KERNCONFDIR} && \
|
|
|
|
/usr/sbin/config -d ${WRKDIR}/conf ${_KERNCONF} >/dev/null
|
2011-06-20 07:09:36 +00:00
|
|
|
|
2013-12-02 05:01:19 +00:00
|
|
|
post-patch:
|
|
|
|
.if ${COMPILER_TYPE} == clang
|
2014-02-18 03:50:18 +00:00
|
|
|
${REINPLACE_CMD} -e 's/XCFLAGS="-O2 -pipe -fPIC"/XCFLAGS="${CFLAGS} -fPIC -mstackrealign"/' ${WRKSRC}/configure
|
2014-04-09 14:38:27 +00:00
|
|
|
${REINPLACE_CMD} -e 's/-mno-align-long-strings//' ${WRKSRC}/src/libafs/MakefileProto.FBSD.in
|
2013-12-02 05:01:19 +00:00
|
|
|
.endif
|
|
|
|
|
2011-06-20 07:09:36 +00:00
|
|
|
create-sample-files:
|
|
|
|
@${ECHO_CMD} openafs.org > ${WRKDIR}/ThisCell
|
2011-06-27 03:33:55 +00:00
|
|
|
@${ECHO_CMD} "${AFSMNTDIR}:${AFSCACHEDIR}:150000" > ${WRKDIR}/cacheinfo
|
2011-08-19 17:46:28 +00:00
|
|
|
@${INSTALL_DATA} ${DISTDIR}/CellServDB.${DBVERSION} ${WRKDIR}/CellServDB
|
2011-06-20 07:09:36 +00:00
|
|
|
|
|
|
|
post-install: create-sample-files
|
2014-02-18 03:50:18 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${ETCDIR}
|
2011-06-20 07:09:36 +00:00
|
|
|
.for F in CellServDB ThisCell cacheinfo
|
2014-02-18 03:50:18 +00:00
|
|
|
@${INSTALL_DATA} ${WRKDIR}/${F} ${STAGEDIR}${ETCDIR}/${F}.sample
|
2011-06-20 07:09:36 +00:00
|
|
|
.endfor
|
2014-02-18 03:50:18 +00:00
|
|
|
@${INSTALL_KLD} ${STAGEDIR}${PREFIX}/lib/openafs/libafs.ko \
|
|
|
|
${STAGEDIR}${KMODDIR}
|
|
|
|
@${RM} ${STAGEDIR}${PREFIX}/lib/openafs/libafs.ko
|
|
|
|
@${RMDIR} ${STAGEDIR}${PREFIX}/lib/openafs
|
|
|
|
${MKDIR} ${STAGEDIR}${AFSMNTDIR} \
|
|
|
|
${STAGEDIR}${AFSSTATEDIR} ${STAGEDIR}${AFSCACHEDIR}
|
2011-05-25 00:09:37 +00:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|