Ignore:
Timestamp:
Jan 4, 2003, 9:28:49 AM (16 years ago)
Author:
jpm
Message:

broke the install procedure into two platform variants. this port is
weird becase the install location is not determined until install time...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/cvsweb/Portfile

    r1188 r1544  
    66maintainers     jpm@opendarwin.org
    77description     WWW interface for CVS repositories
    8 long_description        FreeBSD-CVSweb is a WWW CGI script that allows remote users to browse a CVS repository tree via web.  It can display the revision history of a file, as well as diffs between revisions and downloading the whole file.
     8long_description        \
     9        FreeBSD-CVSweb is a WWW CGI script that allows remote users to \
     10        browse a CVS repository tree via web.  It can display the revision \
     11        history of a file, as well as diffs between revisions and \
     12        downloading the whole file.
     13#homepage       http://www.freebsd.org/projects/cvsweb.html
    914platforms       darwin
    1015master_sites    ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/scop/ \
     
    1722configure       {}
    1823build           {}
    19 install {
    20        
    21         switch ${os.platform} {
    22                 darwin {
    23                         set cgi_path "/Library/WebServer/CGI-Executables/"
    24                         set httpd_conf_path "/private/etc/httpd/"
    25                 } freebsd {
    26                         set cgi_path "/usr/local/www/cgi-bin/"
    27                         set httpd_conf_path "/usr/local/etc/apache/"
    28                 } default {
    29                         puts stdout "and it was like, beep beep beep beep beep..."
    30                 }
     24contents
     25
     26set cgi_path ""
     27set httpd_conf_path ""
     28variant darwin {
     29        global cgi_path httpd_conf_path
     30        set cgi_path "/Library/WebServer/CGI-Executables/"
     31        set httpd_conf_path "/private/etc/httpd/"
     32
     33        # apache port interop
     34        if {[ file exists ${prefix}/sbin/httpd]} {
     35                set cgi_path "${prefix}/www/cgi-bin/"
     36                set httpd_conf_path "${prefix}/etc/apache/"
    3137        }
    3238       
     39        install {
     40                system "install -o root -m 755 ${worksrcpath}/cvsweb.cgi ${cgi_path}"
     41                system "install -o root -m 644 ${worksrcpath}/cvsweb.conf ${httpd_conf_path}"
     42        }
     43       
     44        contents \
     45                ${cgi_path}cvsweb.cgi
     46}
     47variant freebsd {
     48        global cgi_path httpd_conf_path
     49        set cgi_path "/usr/local/www/cgi-bin/"
     50        set httpd_conf_path "/usr/local/etc/apache/"
     51
    3352        # apache port interop
    3453        if {[ file exists ${prefix}/sbin/httpd]} {
     
    3756        }
    3857
    39         system "install -o root -m 755 ${worksrcpath}/cvsweb.cgi ${cgi_path}"
    40         system "install -o root -m 644 ${worksrcpath}/cvsweb.conf ${httpd_conf_path}"
    41        
    42         contents        ${cgi_path}cvsweb.cgi
     58        install {
     59                system "install -o root -m 755 ${worksrcpath}/cvsweb.cgi ${cgi_path}"
     60                system "install -o root -m 644 ${worksrcpath}/cvsweb.conf ${httpd_conf_path}"
     61        }
     62
     63        contents \
     64                ${cgi_path}cvsweb.cgi   
    4365}
Note: See TracChangeset for help on using the changeset viewer.