aboutsummaryrefslogtreecommitdiffstats
path: root/devel/p4d/Makefile
blob: ba67063388b6e06d32181a43ef548d31557b76e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:    p4d
# Date created:             3 Apr 2010
# Whom:                 gordon@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=   p4d
PORTVERSION=    2010.2.295040
CATEGORIES= devel
MASTER_SITES=   ftp://ftp.perforce.com/perforce/${P4VERSION}/bin.${PLATFORM}/ \
        http://filehost.perforce.com/perforce/${P4VERSION}/bin.${PLATFORM}/
DISTNAME=   p4d
EXTRACT_SUFX=
EXTRACT_ONLY=   # none

MAINTAINER= gordon@FreeBSD.org
COMMENT=    Perforce server

RUN_DEPENDS=    p4:${PORTSDIR}/devel/p4

ONLY_FOR_ARCHS= amd64 i386 sparc64

P4VERSION=  r${PORTVERSION:S/^20//:C/\.[0-9]+$//}
DIST_SUBDIR=    perforce/${PORTVERSION}/bin.${PLATFORM}
DISTINFO_FILE=  ${MASTERDIR}/distinfo.${PLATFORM}

RESTRICTED= Restricted distribution

NO_BUILD=   yes
NO_WRKSUBDIR=   yes

P4ROOT?=    /var/db/p4d
P4LOG?=     /var/log/p4d.log

SUB_LIST=   P4ROOT=${P4ROOT} \
        P4LOG=${P4LOG}

USE_RC_SUBR=    p4d.sh

.include <bsd.port.pre.mk>

.include "${.CURDIR}/../p4/Makefile.inc"

USERS=  p4admin
GROUPS= p4admin

do-install:
    ${INSTALL_PROGRAM} ${_DISTDIR}/p4d ${PREFIX}/sbin/

post-install:
    @${CAT} ${PKGMESSAGE}
    ${MKDIR} ${DESTDIR}${P4ROOT}
    ${CHOWN} p4admin:p4admin ${DESTDIR}${P4ROOT}
    ${CHMOD} 750 ${DESTDIR}${P4ROOT}
    ${TOUCH} ${DESTDIR}${P4LOG}
    ${CHOWN} p4admin:p4admin ${DESTDIR}${P4LOG}
    ${CHMOD} 640 ${DESTDIR}${P4LOG}
    @${ECHO_CMD} "@exec ${MKDIR} ${DESTDIR}${P4ROOT}" >> ${TMPPLIST}
    @${ECHO_CMD} "@exec ${CHOWN} p4admin:p4admin ${DESTDIR}${P4ROOT}" >> ${TMPPLIST}
    @${ECHO_CMD} "@exec ${CHMOD} 750 ${DESTDIR}${P4ROOT}" >> ${TMPPLIST}
    @${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>