1 | # $Id: Portfile,v 1.10 2004/01/17 23:05:11 toby Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name cvsweb |
---|
5 | version 3.0.5 |
---|
6 | revision 0 |
---|
7 | categories devel www |
---|
8 | maintainers darwinports@opendarwin.org |
---|
9 | description WWW interface for CVS repositories |
---|
10 | long_description \ |
---|
11 | FreeBSD-CVSweb is a WWW CGI script that allows remote users to \ |
---|
12 | browse a CVS repository tree via web. It can display the revision \ |
---|
13 | history of a file, as well as diffs between revisions and \ |
---|
14 | downloading the whole file. |
---|
15 | homepage http://www.freebsd.org/projects/cvsweb.html |
---|
16 | platforms darwin |
---|
17 | master_sites freebsd:scop \ |
---|
18 | http://people.FreeBSD.org/~scop/cvsweb/ |
---|
19 | checksums md5 572dbb2d66ad6487c0a3536f93023086 |
---|
20 | |
---|
21 | depends_build port:perl5.8 \ |
---|
22 | port:p5-ipc-run \ |
---|
23 | port:p5-file-temp \ |
---|
24 | port:p5-uri \ |
---|
25 | port:p5-mime-types \ |
---|
26 | port:p5-string-ediff \ |
---|
27 | port:cvsgraph |
---|
28 | |
---|
29 | configure {} |
---|
30 | build {} |
---|
31 | |
---|
32 | set cgi_path "" |
---|
33 | set httpd_conf_path "" |
---|
34 | set icons_path "" |
---|
35 | set css_path "" |
---|
36 | |
---|
37 | variant darwin { |
---|
38 | global cgi_path httpd_conf_path |
---|
39 | set cgi_path "/Library/WebServer/CGI-Executables/" |
---|
40 | set httpd_conf_path "/private/etc/httpd/" |
---|
41 | set icons_path "/Library/WebServer/icons/" |
---|
42 | set css_path "/Library/WebServer/css/" |
---|
43 | } |
---|
44 | |
---|
45 | variant freebsd { |
---|
46 | global cgi_path httpd_conf_path |
---|
47 | set cgi_path "/usr/local/www/cgi-bin/" |
---|
48 | set httpd_conf_path "/usr/local/etc/apache/" |
---|
49 | set icons_path "/usr/local/www/icons/" |
---|
50 | set css_path "/usr/local/www/css/" |
---|
51 | } |
---|
52 | |
---|
53 | # apache darwinport interop |
---|
54 | if {[ file exists ${prefix}/sbin/httpd]} { |
---|
55 | set cgi_path "${prefix}/www/cgi-bin/" |
---|
56 | set httpd_conf_path "${prefix}/etc/apache/" |
---|
57 | set icons_path "${prefix}/www/icons/" |
---|
58 | set icons_path "${prefix}/www/css/" |
---|
59 | } |
---|
60 | |
---|
61 | |
---|
62 | destroot { |
---|
63 | file mkdir ${destroot}${cgi_path} |
---|
64 | file mkdir ${destroot}${httpd_conf_path} |
---|
65 | file mkdir ${destroot}${icons_path} |
---|
66 | file mkdir ${destroot}${css_path} |
---|
67 | xinstall -m 755 ${worksrcpath}/cvsweb.cgi ${destroot}${cgi_path} |
---|
68 | xinstall -m 644 ${worksrcpath}/cvsweb.conf ${destroot}${httpd_conf_path} |
---|
69 | eval xinstall -m 755 [glob ${worksrcpath}/icons/*] ${destroot}${icons_path} |
---|
70 | eval xinstall -m 755 [glob ${worksrcpath}/css/*] ${destroot}${css_path} |
---|
71 | |
---|
72 | reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|g" \ |
---|
73 | "${destroot}${cgi_path}/cvsweb.cgi" |
---|
74 | reinplace "s|/usr/local/etc/cvsweb/cvsweb.conf|${httpd_conf_path}cvsweb.conf|g" \ |
---|
75 | "${destroot}${cgi_path}/cvsweb.cgi" |
---|
76 | reinplace "s|/bin /usr/bin /usr/local/bin|/bin /usr/bin /usr/local/bin ${prefix}/bin ${prefix}/sbin|g" \ |
---|
77 | "${destroot}${cgi_path}/cvsweb.cgi" |
---|
78 | } |
---|