Skip to content
Permalink
Browse files

broke the install procedure into two platform variants. this port is

weird becase the install location is not determined until install time...

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@1544 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Jean-Pierre Mouilleseaux
Jean-Pierre Mouilleseaux committed Jan 4, 2003
1 parent 28c80d8 commit 532816d76665bc5a2e8199442ebe1d1694826a42
Showing with 38 additions and 16 deletions.
  1. +38 −16 devel/cvsweb/Portfile
@@ -5,7 +5,12 @@ revision 0
categories devel www
maintainers jpm@opendarwin.org
description WWW interface for CVS repositories
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.
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.
#homepage http://www.freebsd.org/projects/cvsweb.html
platforms darwin
master_sites ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/scop/ \
ftp://ftp.se.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/scop/ \
@@ -16,28 +21,45 @@ master_sites ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/scop/ \
checksums md5 fd15c8521b26be858616a7ba52fc2c22
configure {}
build {}
install {
contents

set cgi_path ""
set httpd_conf_path ""
variant darwin {
global cgi_path httpd_conf_path
set cgi_path "/Library/WebServer/CGI-Executables/"
set httpd_conf_path "/private/etc/httpd/"

# apache port interop
if {[ file exists ${prefix}/sbin/httpd]} {
set cgi_path "${prefix}/www/cgi-bin/"
set httpd_conf_path "${prefix}/etc/apache/"
}

switch ${os.platform} {
darwin {
set cgi_path "/Library/WebServer/CGI-Executables/"
set httpd_conf_path "/private/etc/httpd/"
} freebsd {
set cgi_path "/usr/local/www/cgi-bin/"
set httpd_conf_path "/usr/local/etc/apache/"
} default {
puts stdout "and it was like, beep beep beep beep beep..."
}
install {
system "install -o root -m 755 ${worksrcpath}/cvsweb.cgi ${cgi_path}"
system "install -o root -m 644 ${worksrcpath}/cvsweb.conf ${httpd_conf_path}"
}

contents \
${cgi_path}cvsweb.cgi
}
variant freebsd {
global cgi_path httpd_conf_path
set cgi_path "/usr/local/www/cgi-bin/"
set httpd_conf_path "/usr/local/etc/apache/"

# apache port interop
if {[ file exists ${prefix}/sbin/httpd]} {
set cgi_path "${prefix}/www/cgi-bin/"
set httpd_conf_path "${prefix}/etc/apache/"
}

system "install -o root -m 755 ${worksrcpath}/cvsweb.cgi ${cgi_path}"
system "install -o root -m 644 ${worksrcpath}/cvsweb.conf ${httpd_conf_path}"

contents ${cgi_path}cvsweb.cgi
install {
system "install -o root -m 755 ${worksrcpath}/cvsweb.cgi ${cgi_path}"
system "install -o root -m 644 ${worksrcpath}/cvsweb.conf ${httpd_conf_path}"
}

contents \
${cgi_path}cvsweb.cgi
}

0 comments on commit 532816d

Please sign in to comment.
You can’t perform that action at this time.