# $Id: Portfile,v 1.4 2005/08/11 21:33:18 rshaw Exp $ PortSystem 1.0 name bugzilla version 2.18 categories devel www databases maintainers darwinports@opendarwin.org description popular and extensive bug-tracking system long_description Bugzilla is a Defect Tracking System or \ Bug-Tracking System. Defect Tracking Systems allow \ individual or groups of developers to keep track of \ outstanding bugs in their product effectively. Most \ commercial defect-tracking software vendors charge \ enormous licensing fees. Despite being free, \ Bugzilla has many features its expensive \ counterparts lack. Consequently, Bugzilla has \ quickly become a favorite of hundreds of \ organizations across the globe. homepage http://www.bugzilla.org/ master_sites http://ftp.mozilla.org/pub/mozilla.org/webtools/ \ ftp://ftp.mozilla.org/pub/mozilla.org/webtools/ checksums md5 243089e2137ecfc8f857dbbeae0ad1d7 depends_lib bin:httpd:apache2 \ lib:libmysqlclient:mysql4 \ path:${prefix}/bin/perl:perl5.8 \ port:p5-appconfig \ port:p5-timedate \ port:p5-dbi \ port:p5-dbd-mysql \ port:p5-xml-parser \ port:p5-patchreader \ port:p5-gd \ port:p5-gdtextutil \ port:p5-gdgraph \ port:p5-chart \ port:p5-template-toolkit \ port:p5-mime-tools \ bin:interdiff:patchutils patchfiles patch-checksetup.pl post-patch { cd ${worksrcpath} foreach item [exec find . -type f -name .cvsignore] { file delete -force ${item} } foreach item [exec find . -type d -name CVS] { file delete -force ${item} } foreach item [glob *.cgi *.pl contrib/*.pl docs/*.pl] { reinplace "s%^#!.*perl%#!${prefix}/bin/perl%" ${item} } foreach item [glob *.pl contrib/*.pl Bugzilla/*.pm docs/html/*.html docs/txt/*.txt docs/xml/*.xml] { reinplace "s%/usr/lib/sendmail%/usr/sbin/sendmail%g" ${item} } } configure.cmd ./checksetup.pl configure.pre_args --check-modules build.cmd ./checksetup.pl build.target destroot { # Warn user if not running as root if {$env(USER) != "root"} { ui_msg "-----------------------------------------------------------" ui_msg "Note that you are not running as root, so files installed" ui_msg "by this port will not end up with proper ownership and" ui_msg "likely not work correctly with Apache." ui_msg "-----------------------------------------------------------" } set wwwRoot "${prefix}/www" xinstall -d -m 0755 ${destroot}${wwwRoot} ui_info "copying ${worksrcpath}\n to ${destroot}${wwwRoot}/${name}" system "cp -R ${worksrcpath}/. ${destroot}${wwwRoot}/${name}" # Fix owner and group on installed data if {$env(USER) == "root"} { foreach item [exec find ${destroot}${wwwRoot}/${name} -type f] { file attributes ${item} -permissions go+r -owner www -group www } foreach item [exec find ${destroot}${wwwRoot}/${name} -type d] { file attributes ${item} -permissions go+rx -owner www -group www } } else { foreach item [exec find ${destroot}${wwwRoot}/${name} -type f] { file attributes ${item} -permissions go+r } foreach item [exec find ${destroot}${wwwRoot}/${name} -type d] { file attributes ${item} -permissions go+rx } } set docRoot "/Library/WebServer/Documents" if {[file isdirectory ${docRoot}]} { xinstall -d -m 0755 ${destroot}${docRoot} ui_info "linking ${destroot}${docRoot}/${name} to ${wwwRoot}/${name}" system "ln -s ${wwwRoot}/${name} ${destroot}${docRoot}/${name}" } set docRoot "${prefix}/www/apache2/htdocs" if {[file isdirectory ${docRoot}]} { xinstall -d -m 0755 ${destroot}${docRoot} ui_info "linking ${destroot}${docRoot}/${name} to ${wwwRoot}/${name}" system "ln -s ${wwwRoot}/${name} ${destroot}${docRoot}/${name}" } set docPath "${prefix}/share/doc/${name}" xinstall -d -m 0755 ${destroot}${docPath} cd ${worksrcpath} xinstall -m 0644 \ README QUICKSTART UPGRADING UPGRADING-pre-2.8 \ ${destroot}${docPath}/ ui_info "copying docs\n to ${destroot}${docPath}/guide" system "cp -R docs ${destroot}${docPath}/guide" foreach item [exec find ${destroot}${docPath}/guide -type f] { file attributes ${item} -permissions go+r } foreach item [exec find ${destroot}${docPath}/guide -type d] { file attributes ${item} -permissions go+rx } } post-install { ui_msg "-----------------------------------------------------------" ui_msg "To complete the installation of ${name}, you should read" ui_msg "the quick start document found here:" ui_msg "" ui_msg " ${prefix}/share/doc/${name}/QUICKSTART" ui_msg "" ui_msg "Steps 1 through 3 have already been completed by the" ui_msg "port installation. For step 1, the following link has" ui_msg "been created:" ui_msg "" set wwwRoot "${prefix}/www" set docRoot "/Library/WebServer/Documents" if {[file isdirectory ${docRoot}]} { ui_msg " ${docRoot}/${name} -> ${wwwRoot}/${name}" } set docRoot "${prefix}/www/apache2/htdocs" if {[file isdirectory ${docRoot}]} { ui_msg " ${docRoot}/${name} -> ${wwwRoot}/${name}" } ui_msg "" ui_msg "This allows access to ${name} from the root of the" ui_msg "webserver as the URL (needed for steps 4 and 8):" ui_msg "" ui_msg " http://[exec hostname]/${name}/" ui_msg "" ui_msg "For step 4, the ${name} configuration file can be" ui_msg "found here:" ui_msg "" ui_msg " ${wwwRoot}/${name}/localconfig" ui_msg "" ui_msg "For the rest of the steps, the main ${name} directory" ui_msg "can be found here (needed for step 7):" ui_msg "" ui_msg " ${wwwRoot}/${name}" ui_msg "-----------------------------------------------------------" }