aboutsummaryrefslogtreecommitdiffstats
path: root/devel/p4web/Makefile
blob: 118e62ef67da1398f01b3a398cde1c993b7aba2c (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
67
68
69
70
71
# Created by: gordon@FreeBSD.org
# $FreeBSD$

PORTNAME=   p4web
PORTVERSION=    2012.1.732581
PORTREVISION=   1
CATEGORIES= devel
MASTER_SITES=   ftp://ftp.perforce.com/perforce/${P4VERSION}/bin.${PLATFORM}/ \
        http://filehost.perforce.com/perforce/r${P4VERSION}/bin.${PLATFORM}/
DISTNAME=   p4web
EXTRACT_SUFX=
EXTRACT_ONLY=   # none

MAINTAINER= gordon@FreeBSD.org
COMMENT=    Perforce server

ONLY_FOR_ARCHS= amd64 i386

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

P4LOG?=     /var/log/p4web.log

SUB_LIST=   P4LOG=${P4LOG}

USE_RC_SUBR=    p4web

.include <bsd.port.pre.mk>

# 10.x (and higher) needs compat libs
.if ${OSVERSION} >= 1000054
LIB_DEPENDS+=   libstdc++.so.6:${PORTSDIR}/misc/compat9x
.endif

# Figure out what to install
.if ${ARCH} == amd64
. if ${OSVERSION} >= 700043
PLATFORM=   freebsd70x86_64
. else
IGNORE=     unsupported OS release, sorry
. endif

.elif ${ARCH} == i386
. if ${OSVERSION} >= 700043
PLATFORM=   freebsd70x86
. else
IGNORE=     unsupported OS release, sorry
. endif

.else
IGNORE=     unsupported OS release, sorry
.endif

USERS=  p4admin
GROUPS= p4admin

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

post-install:
    @${ECHO_CMD} "@exec ${TOUCH} ${P4LOG}" >> ${TMPPLIST}
    @${ECHO_CMD} "@exec ${CHOWN} p4admin:p4admin ${P4LOG}" >> ${TMPPLIST}
    @${ECHO_CMD} "@exec ${CHMOD} 640 ${P4LOG}" >> ${TMPPLIST}

.include <bsd.port.post.mk>