Ticket #4259: Portfile

File Portfile, 2.6 KB (added by dports@…, 19 years ago)

Here's full Portfile in case it is needed

Line 
1# $Id: Portfile,v 1.10 2004/01/17 23:05:11 toby Exp $
2
3PortSystem 1.0
4name            cvsweb
5version         3.0.5
6revision        0
7categories      devel www
8maintainers     darwinports@opendarwin.org
9description     WWW interface for CVS repositories
10long_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.
15homepage        http://www.freebsd.org/projects/cvsweb.html
16platforms       darwin
17master_sites     freebsd:scop \
18                 http://people.FreeBSD.org/~scop/cvsweb/
19checksums       md5 572dbb2d66ad6487c0a3536f93023086
20
21depends_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
29configure       {}
30build           {}
31
32set cgi_path ""
33set httpd_conf_path ""
34set icons_path ""
35set css_path ""
36
37variant 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
45variant 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}