2000-06-10 08:22:55 +02:00
|
|
|
# New ports collection makefile for: perforce
|
|
|
|
# Date created: 3 Mai 2000
|
|
|
|
# Whom: sam@inf.enst.fr
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2000-10-28 03:32:51 +02:00
|
|
|
PORTNAME= perforce
|
2001-09-01 20:57:08 +02:00
|
|
|
PORTVERSION= ${VERSION}
|
2002-06-03 13:27:55 +02:00
|
|
|
PORTREVISION= ${REVISION}
|
2000-10-28 03:32:51 +02:00
|
|
|
PORTEPOCH= 1
|
2000-06-10 08:22:55 +02:00
|
|
|
CATEGORIES= devel
|
2005-04-08 09:43:43 +02:00
|
|
|
MASTER_SITES= ftp://ftp.perforce.com/pub/perforce/r${PORTVERSION}/bin.${PLATFORM}/
|
2000-06-10 08:22:55 +02:00
|
|
|
EXTRACT_SUFX=
|
2004-10-12 19:10:35 +02:00
|
|
|
DISTFILES= ${BIN_FILES} ${SBIN_FILES}
|
2001-09-01 20:57:08 +02:00
|
|
|
EXTRACT_ONLY= # none
|
2000-06-10 08:22:55 +02:00
|
|
|
|
2005-01-18 16:43:36 +01:00
|
|
|
MAINTAINER= lth@FreeBSD.org
|
2003-02-21 12:23:04 +01:00
|
|
|
COMMENT= Perforce client and server
|
2000-06-10 08:22:55 +02:00
|
|
|
|
2003-09-08 11:26:48 +02:00
|
|
|
#
|
|
|
|
# This is a kludge. I don't know a better way to set PORTVERSION and
|
|
|
|
# PORTREVISION such that pkg_version figures out an update is needed
|
|
|
|
#
|
2005-04-08 16:53:59 +02:00
|
|
|
ARCH!= /usr/bin/uname -p
|
2005-04-08 09:43:43 +02:00
|
|
|
ARCH?= i386
|
2003-09-08 11:26:48 +02:00
|
|
|
|
2005-02-20 15:54:00 +01:00
|
|
|
.if (${ARCH} == i386) || (${ARCH} == amd64)
|
|
|
|
DIST_SUBDIR= perforce/${VERSION}/i386
|
2005-06-01 16:20:54 +02:00
|
|
|
VERSION= 05.1
|
2005-10-28 10:54:07 +02:00
|
|
|
REVISION= 5
|
2003-09-08 11:26:48 +02:00
|
|
|
PLATFORM= freebsd4
|
2005-01-18 16:43:36 +01:00
|
|
|
BIN_FILES= p4
|
|
|
|
SBIN_FILES= p4d p4ftpd p4p p4web
|
2005-06-01 16:20:54 +02:00
|
|
|
REL_NOTES= http://www.perforce.com/perforce/doc.051/user/relnotes.txt
|
2005-02-20 15:54:00 +01:00
|
|
|
MD5_FILE= ${MASTERDIR}/distinfo.i386
|
2003-09-08 11:26:48 +02:00
|
|
|
.elif ${ARCH} == alpha
|
2005-02-20 15:54:00 +01:00
|
|
|
DIST_SUBDIR= perforce/${VERSION}/${ARCH}
|
2003-09-08 11:26:48 +02:00
|
|
|
VERSION= 99.1
|
|
|
|
REVISION= 1
|
|
|
|
PLATFORM= freebsdaxp
|
|
|
|
BIN_FILES= p4
|
|
|
|
SBIN_FILES= p4d
|
2004-01-20 15:53:28 +01:00
|
|
|
REL_NOTES= http://www.perforce.com/perforce/doc.991/user/relnotes.txt
|
2005-02-20 15:54:00 +01:00
|
|
|
MD5_FILE= ${MASTERDIR}/distinfo.${ARCH}
|
2003-09-08 11:26:48 +02:00
|
|
|
.else
|
2004-06-16 22:31:34 +02:00
|
|
|
VERSION= 0
|
2003-09-08 11:26:48 +02:00
|
|
|
IGNORE= "Unsupported platform, sorry."
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# End of kludge
|
|
|
|
|
2000-06-10 08:22:55 +02:00
|
|
|
NO_PACKAGE= Restricted distribution
|
|
|
|
NO_CDROM= Restricted distribution
|
|
|
|
|
2001-09-01 20:57:08 +02:00
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
|
2004-12-20 10:48:54 +01:00
|
|
|
PLIST_FILES= ${BIN_FILES:S+^+bin/+g} \
|
|
|
|
${SBIN_FILES:S+^+sbin/+g}
|
|
|
|
|
2005-04-08 16:53:59 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2001-09-01 20:57:08 +02:00
|
|
|
# These variables are all configurable.
|
|
|
|
PERFORCE_USER?= p4admin
|
|
|
|
PERFORCE_UID?= 94
|
|
|
|
PERFORCE_GROUP?= p4admin
|
|
|
|
PERFORCE_GID?= 94
|
|
|
|
PERFORCE_HOME?= ${LOCALBASE}/perforce
|
|
|
|
PERFORCE_ROOT?= ${PERFORCE_HOME}/root
|
|
|
|
PERFORCE_LOGS?= ${PERFORCE_HOME}/logs
|
|
|
|
PERFORCE_PORT?= 1666
|
2005-04-08 09:43:43 +02:00
|
|
|
PERFORCE_CACHE?= ${PERFORCE_HOME}/cache
|
|
|
|
PERFORCE_TARGET?= perforce:1666
|
2001-09-01 20:57:08 +02:00
|
|
|
|
2003-09-08 11:26:48 +02:00
|
|
|
pre-everything::
|
|
|
|
@${ECHO} "If the checksums fail, try doing 'make distclean'"
|
|
|
|
@${ECHO} "to force getting the latest binaries from Perforce."
|
2004-01-20 15:53:28 +01:00
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "Read the release notes for this release to determine"
|
|
|
|
@${ECHO} "how to migrate the database to the new version. In"
|
|
|
|
@${ECHO} "most instances, it is done automatically. However,"
|
|
|
|
@${ECHO} "sometimes it must be done manually."
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "The release notes for this version are at"
|
|
|
|
@${ECHO} ${REL_NOTES}
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "Checkpoint and backup your data before installing!"
|
2000-06-10 08:22:55 +02:00
|
|
|
|
2000-10-28 03:32:51 +02:00
|
|
|
do-build:
|
2003-01-30 07:47:58 +01:00
|
|
|
${SED} -e "s,@PERFORCE_ROOT@,${PERFORCE_ROOT},g" \
|
|
|
|
-e "s,@PERFORCE_LOGS@,${PERFORCE_LOGS},g" \
|
|
|
|
-e "s,@PERFORCE_USER@,${PERFORCE_USER},g" \
|
|
|
|
-e "s,@PERFORCE_PORT@,${PERFORCE_PORT},g" \
|
|
|
|
-e "s,@PERFORCE_CACHE@,${PERFORCE_CACHE},g" \
|
|
|
|
-e "s,@PERFORCE_TARGET@,${PERFORCE_TARGET},g" \
|
2001-09-01 20:57:08 +02:00
|
|
|
< ${FILESDIR}/perforce.conf.in > ${WRKSRC}/perforce.conf
|
2000-10-28 03:32:51 +02:00
|
|
|
${SED} -e "s,@PREFIX@,${PREFIX},g" \
|
|
|
|
< ${FILESDIR}/perforce.sh.in > ${WRKSRC}/perforce.sh
|
|
|
|
|
2005-04-08 09:43:43 +02:00
|
|
|
pre-su-install:
|
2001-09-01 20:57:08 +02:00
|
|
|
${SETENV} PKG_PREFIX=${PREFIX} \
|
|
|
|
PERFORCE_USER=${PERFORCE_USER} \
|
|
|
|
PERFORCE_UID=${PERFORCE_UID} \
|
|
|
|
PERFORCE_GROUP=${PERFORCE_GROUP} \
|
|
|
|
PERFORCE_GID=${PERFORCE_GID} \
|
|
|
|
PERFORCE_HOME=${PERFORCE_HOME} \
|
|
|
|
PERFORCE_ROOT=${PERFORCE_ROOT} \
|
|
|
|
PERFORCE_LOGS=${PERFORCE_LOGS} \
|
|
|
|
${SH} ${PKGDIR}/pkg-install ${PORTNAME} PRE-INSTALL
|
|
|
|
|
2000-06-10 08:22:55 +02:00
|
|
|
do-install:
|
2001-09-01 20:57:08 +02:00
|
|
|
.for f in ${BIN_FILES}
|
|
|
|
${INSTALL_PROGRAM} ${_DISTDIR}/${f} ${PREFIX}/bin/
|
|
|
|
.endfor
|
|
|
|
.for f in ${SBIN_FILES}
|
|
|
|
${INSTALL_PROGRAM} ${_DISTDIR}/${f} ${PREFIX}/sbin/
|
|
|
|
.endfor
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/perforce.conf ${PREFIX}/etc/perforce.conf.default; \
|
|
|
|
if [ ! -f ${PREFIX}/etc/perforce.conf ]; then \
|
|
|
|
${CP} -p ${PREFIX}/etc/perforce.conf.default ${PREFIX}/etc/perforce.conf; \
|
2000-10-28 03:32:51 +02:00
|
|
|
fi
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/perforce.sh ${PREFIX}/etc/rc.d/
|
2001-09-01 20:57:08 +02:00
|
|
|
|
|
|
|
post-install:
|
2003-01-30 07:47:58 +01:00
|
|
|
${ECHO_CMD} "@unexec ${RMDIR} ${PERFORCE_ROOT} ${PERFORCE_LOGS} ${PERFORCE_HOME} 2>/dev/null || true" >> ${TMPPLIST}
|
2000-06-10 08:22:55 +02:00
|
|
|
|
2001-09-01 20:57:08 +02:00
|
|
|
.include <bsd.port.post.mk>
|