1 | # $Id: Portfile 70942 2010-08-27 03:37:44Z ryandesign@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name perforce |
---|
6 | version 2013.1 |
---|
7 | categories devel |
---|
8 | platforms darwin |
---|
9 | maintainers gmail.com:rambiusparkisanius |
---|
10 | |
---|
11 | description Fast source code management system |
---|
12 | |
---|
13 | long_description Perforce is a commercial revision control system \ |
---|
14 | that can be used gratis for developing free \ |
---|
15 | software. (see the WWW page for details). |
---|
16 | |
---|
17 | homepage http://www.perforce.com/ |
---|
18 | master_sites http://filehost.perforce.com/perforce/r[string range ${version} 2 end]/bin.darwin90x86_64/:x86_64 \ |
---|
19 | http://filehost.perforce.com/perforce/r[string range ${version} 2 end]/bin.darwin90x86/:i386 |
---|
20 | |
---|
21 | dist_subdir ${name}/${version}/${build_arch} |
---|
22 | worksrcdir ${name} |
---|
23 | |
---|
24 | if {${os.platform} == "darwin" && ${build_arch} == "x86_64"} { |
---|
25 | distfiles p4:x86_64 p4d:x86_64 |
---|
26 | |
---|
27 | checksums p4 \ |
---|
28 | rmd160 b65956fe6e2024385ad2f9da79ca2c943c351d27 \ |
---|
29 | sha256 8ef109bc2bbc4c18c0020e40f1f5c21d02f4b5b80cc5790bdda5f5c743633d49 \ |
---|
30 | p4d \ |
---|
31 | rmd160 37d8e3c3d7caecfdccbc854b7e237f1516518532 \ |
---|
32 | sha256 3135a845ec33f4140214e70222e38d3c24ed48207d4ae09e499a65bcc78e1e17 |
---|
33 | } |
---|
34 | |
---|
35 | if {${os.platform} == "darwin" && ${build_arch} == "i386"} { |
---|
36 | distfiles p4:i386 p4d:i386 |
---|
37 | |
---|
38 | checksums p4 \ |
---|
39 | rmd160 30df26b64985501609cef714c591db928d78391d \ |
---|
40 | sha256 f1cb69e57fe486c0c6212af457243ffe0bd5af8995892651ea22de2fd7e4e38f\ |
---|
41 | p4d \ |
---|
42 | rmd160 55d0a495f9b7f918c647298f60e28c8180dca7a4 \ |
---|
43 | sha256 646c59a8b9f08d9bc1d5ea24f6c73d16f23cd619f745f9babf729b3edccd1a10 |
---|
44 | } |
---|
45 | |
---|
46 | if {${os.major} < 9} { |
---|
47 | pre-fetch { |
---|
48 | return -code error "$name requires Mac OS X 10.5 or later." |
---|
49 | } |
---|
50 | } |
---|
51 | |
---|
52 | extract.mkdir yes |
---|
53 | extract { |
---|
54 | eval copy [glob ${distpath}/*] ${worksrcpath} |
---|
55 | } |
---|
56 | |
---|
57 | use_configure no |
---|
58 | |
---|
59 | build {} |
---|
60 | |
---|
61 | destroot { |
---|
62 | xinstall -W ${worksrcpath} p4 ${destroot}${prefix}/bin |
---|
63 | xinstall -W ${worksrcpath} p4d ${destroot}${prefix}/sbin |
---|
64 | } |
---|
65 | |
---|
66 | variant server { |
---|
67 | startupitem.create yes |
---|
68 | startupitem.start "su -c ${prefix}/sbin/p4d -d -r ${prefix}/share/perforce/depot -L ${prefix}/share/perforce/log" |
---|
69 | |
---|
70 | post-destroot { |
---|
71 | addgroup perforce |
---|
72 | set gid [existsgroup perforce] |
---|
73 | adduser perforce realname=Perforce\ Server gid=${gid} home=${prefix}/share/perforce shell=/bin/sh |
---|
74 | system "install -o perforce -m 755 -d ${destroot}${prefix}/share/perforce/depot" |
---|
75 | system "install -o perforce -m 644 -c /dev/null ${destroot}${prefix}/share/perforce/log" |
---|
76 | } |
---|
77 | } |
---|
78 | |
---|
79 | supported_archs i386 x86_64 |
---|
80 | universal_variant no |
---|