summaryrefslogtreecommitdiff
blob: a88e5a7596490f604b1f32894c529b5af3efa0a1 (plain)
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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2

DESCRIPTION="Daemon for a commercial version control system"
HOMEPAGE="http://www.perforce.com/"
URI_BASE="ftp://ftp.perforce.com/perforce/r03.1/"
BIN_BASE="$URI_BASE/bin.linux24x86"
DOC_BASE="$URI_BASE/doc"
SRC_URI="${BIN_BASE}/p4d ${BIN_BASE}/p4web ${BIN_BASE}/p4ftpd ${DOC_BASE}/man/p4d.1"
LICENSE="perforce.pdf"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND="virtual/glibc"
#RDEPEND=""
S=${WORKDIR}
RESTRICT="nomirror nostrip"
MY_FILES=$FILESDIR/perforce-2003.1/

src_unpack ()
{
	# we have to copy all of the files from $DISTDIR, otherwise we get
	# sandbox violations when trying to install

	for x in p4web p4d p4ftpd p4d.1 ; do
		cp ${DISTDIR}/$x .
	done
}

src_install()
{
	enewuser perforce
	enewgroup perforce

	dosbin p4d
	dosbin p4web
	dosbin p4ftpd

	fowners perforce:perforce /usr/sbin/p4d
	fowners perforce:perforce /usr/sbin/p4ftpd
	fowners perforce:perforce /usr/sbin/p4web

	mkdir -p ${D}/var/log
	touch ${D}/var/log/perforce
	fowners perforce:perforce /var/log/perforce

	doman p4d.1

	keepdir /var/lib/perforce
	fowners perforce:perforce /var/lib/perforce

	exeinto /etc/init.d
	doexe ${MY_FILES}/init.d/perforce
	insinto /etc/conf.d
	doins ${MY_FILES}/conf.d/perforce
	insinto /etc/env.d
	doins ${MY_FILES}/50perforce
}