aboutsummaryrefslogtreecommitdiff
path: root/devel/p4web/Makefile
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2010-05-10 15:04:57 +0000
committerRene Ladan <rene@FreeBSD.org>2010-05-10 15:04:57 +0000
commit879c68354c6622a51bc0c0d07cc0cfb48a0ae936 (patch)
tree1e2ef6bfb1e39126d95bac66786df78197f9454b /devel/p4web/Makefile
parent73306d764d7fab8cfd44243d40e74a17d06b4946 (diff)
Notes
Diffstat (limited to 'devel/p4web/Makefile')
-rw-r--r--devel/p4web/Makefile119
1 files changed, 27 insertions, 92 deletions
diff --git a/devel/p4web/Makefile b/devel/p4web/Makefile
index 3fb53086da5b..fd5246cb078a 100644
--- a/devel/p4web/Makefile
+++ b/devel/p4web/Makefile
@@ -1,120 +1,55 @@
-# New ports collection makefile for: perforce
-# Date created: 3 Mai 2000
-# Whom: sam@inf.enst.fr
+# New ports collection makefile for: p4web
+# Date created: 3 Apr 2010
+# Whom: gordon@FreeBSD.org
#
# $FreeBSD$
#
-PORTNAME= perforce
-PORTVERSION= 08.2
-PORTREVISION= 5
-PORTEPOCH= 1
+PORTNAME= p4web
+PORTVERSION= 2009.2.228098
CATEGORIES= devel
-MASTER_SITES= ftp://ftp.perforce.com/pub/perforce/r${PORTVERSION}/bin.${PLATFORM}/ \
- http://filehost.perforce.com/perforce/r${PORTVERSION}/bin.${PLATFORM}/
+MASTER_SITES= ftp://ftp.perforce.com/perforce/${P4VERSION}/bin.${PLATFORM}/ \
+ http://filehost.perforce.com/perforce/r${P4VERSION}/bin.${PLATFORM}/
+DISTNAME= p4web
EXTRACT_SUFX=
-DISTFILES= ${BIN_FILES} ${SBIN_FILES}
EXTRACT_ONLY= # none
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Perforce client and server
+MAINTAINER= gordon@FreeBSD.org
+COMMENT= Perforce server
ONLY_FOR_ARCHS= amd64 i386 sparc64
-DIST_SUBDIR= perforce/${PORTVERSION}_${PORTREVISION}/${ARCH}
+P4VERSION= r${PORTVERSION:S/^20//:C/\.[0-9]+$//}
+DIST_SUBDIR= perforce/${PORTVERSION}/bin.${PLATFORM}
MD5_FILE= ${MASTERDIR}/distinfo.${PLATFORM}
-BIN_FILES= p4
-SBIN_FILES= p4d p4ftpd p4p p4web
-
-REL_NOTES= http://www.perforce.com/perforce/doc.082/user/relnotes.txt
-
RESTRICTED= Restricted distribution
+NO_BUILD= yes
NO_WRKSUBDIR= yes
-PLIST_FILES= ${BIN_FILES:S+^+bin/+g} \
- ${SBIN_FILES:S+^+sbin/+g}
-
-.include <bsd.port.pre.mk>
-
-# Figure out what to install
-.if ${ARCH} == amd64
-PLATFORM= freebsd60x86_64
-.elif ${ARCH} == i386
-PLATFORM= freebsd60x86
-.elif ${ARCH} == sparc64
-PLATFORM= freebsd61sparc64
-.else
-IGNORE= unsupported OS release, sorry
-.endif
+P4LOG?= /var/log/p4web.log
-.if ${OSVERSION} >= 700043
-LIB_DEPENDS+= c.6:${PORTSDIR}/misc/compat6x
-.endif
+SUB_LIST= P4LOG=${P4LOG}
-# 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
-PERFORCE_CACHE?= ${PERFORCE_HOME}/cache
-PERFORCE_TARGET?= perforce:1666
+USE_RC_SUBR= p4web.sh
-pre-everything::
- @${ECHO} "If the checksums fail, try doing 'make distclean'"
- @${ECHO} "to force getting the latest binaries from Perforce."
- @${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!"
+.include <bsd.port.pre.mk>
-do-build:
- ${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" \
- < ${FILESDIR}/perforce.conf.in > ${WRKSRC}/perforce.conf
- ${SED} -e "s,@PREFIX@,${PREFIX},g" \
- < ${FILESDIR}/perforce.sh.in > ${WRKSRC}/perforce.sh
+.include "${.CURDIR}/../p4/Makefile.inc"
-pre-su-install:
- ${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
+USERS= p4admin
+GROUPS= p4admin
do-install:
-.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; \
- fi
- ${INSTALL_SCRIPT} ${WRKSRC}/perforce.sh ${PREFIX}/etc/rc.d/
+ ${INSTALL_PROGRAM} ${_DISTDIR}/p4web ${PREFIX}/sbin/
post-install:
- ${ECHO_CMD} "@unexec ${RMDIR} ${PERFORCE_ROOT} ${PERFORCE_LOGS} ${PERFORCE_HOME} 2>/dev/null || true" >> ${TMPPLIST}
+ ${TOUCH} ${DESTDIR}${P4LOG}
+ ${CHOWN} p4admin:p4admin ${DESTDIR}${P4LOG}
+ ${CHMOD} 640 ${DESTDIR}${P4LOG}
+ @${ECHO_CMD} "@exec ${TOUCH} ${DESTDIR}${P4LOG}" >> ${TMPPLIST}
+ @${ECHO_CMD} "@exec ${CHOWN} p4admin:p4admin ${DESTDIR}${P4LOG}" >> ${TMPPLIST}
+ @${ECHO_CMD} "@exec ${CHMOD} 640 ${DESTDIR}${P4LOG}" >> ${TMPPLIST}
.include <bsd.port.post.mk>