1 | # $Id: Portfile,v 1.15 2003/08/05 09:29:04 jkh Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name perforce |
---|
5 | version 04.2 |
---|
6 | categories devel |
---|
7 | maintainers eric@opendarwin.org |
---|
8 | description Fast source code management system |
---|
9 | long_description Perforce is a commercial revision control system that can be used gratis for developing free software. (see the WWW page for details). |
---|
10 | homepage http://www.perforce.com/ |
---|
11 | platforms darwin freebsd |
---|
12 | master_sites ftp://www.perforce.com/pub/perforce/r${portversion}/bin.darwin60ppc/ |
---|
13 | dist_subdir ${portname} |
---|
14 | worksrcdir ${portname} |
---|
15 | distfiles p4 p4.1 p4d p4d.1 |
---|
16 | checksums p4 md5 7fbf723b25c7957ee554adb472b911da \ |
---|
17 | p4d md5 9020dd51eb14440b6e88fb653b97ea5e \ |
---|
18 | extract { system "mkdir -p ${portpath}/${workdir}/${worksrcdir}" |
---|
19 | system "cp ${distpath}/* \ |
---|
20 | ${portpath}/${workdir}/${worksrcdir}/" } |
---|
21 | configure {} |
---|
22 | build {} |
---|
23 | destroot { cd ${worksrcpath} |
---|
24 | system "install -o root -m 755 -d ${destroot}${prefix}/bin" |
---|
25 | system "install -o root -m 755 -d ${destroot}${prefix}/sbin" |
---|
26 | system "install -o root -m 755 -c p4 ${destroot}${prefix}/bin" |
---|
27 | system "install -o root -m 755 -c p4d ${destroot}${prefix}/sbin" |
---|
28 | |
---|
29 | variant server { |
---|
30 | depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup |
---|
31 | |
---|
32 | post-destroot { |
---|
33 | addgroup perforce |
---|
34 | set gid [existsgroup perforce] |
---|
35 | adduser perforce realname=Perforce\ Server gid=${gid} \ |
---|
36 | home=${prefix}/share/perforce shell=/bin/sh |
---|
37 | system "install -o perforce -m 755 -d \ |
---|
38 | ${destroot}${prefix}/share/perforce/depot" |
---|
39 | system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d" |
---|
40 | system "install -o perforce -m 644 -c /dev/null \ |
---|
41 | ${destroot}${prefix}/share/perforce/log" |
---|
42 | set script [open "${destroot}${prefix}/etc/rc.d/perforce.sh" w 0755] |
---|
43 | puts $script "#!/bin/sh" |
---|
44 | puts $script "su perforce -c \"${prefix}/sbin/p4d -d -r \ |
---|
45 | ${prefix}/share/perforce/depot -L \ |
---|
46 | ${prefix}/share/perforce/log\"" |
---|
47 | close $script |
---|
48 | } |
---|
49 | } |
---|
50 | |
---|