source: trunk/dports/devel/bugzilla/Portfile @ 13471

Last change on this file since 13471 was 13471, checked in by rshaw, 14 years ago

No longer maintaining these ports.

  • Property svn:eol-style set to native
File size: 5.5 KB
Line 
1# $Id: Portfile,v 1.4 2005/08/11 21:33:18 rshaw Exp $
2PortSystem              1.0
3
4name                    bugzilla
5version                 2.18
6categories              devel www databases
7maintainers             darwinports@opendarwin.org
8description             popular and extensive bug-tracking system
9long_description        Bugzilla is a Defect Tracking System or \
10                                        Bug-Tracking System. Defect Tracking Systems allow \
11                                        individual or groups of developers to keep track of \
12                                        outstanding bugs in their product effectively. Most \
13                                        commercial defect-tracking software vendors charge \
14                                        enormous licensing fees. Despite being free, \
15                                        Bugzilla has many features its expensive \
16                                        counterparts lack. Consequently, Bugzilla has \
17                                        quickly become a favorite of hundreds of \
18                                        organizations across the globe.
19homepage                http://www.bugzilla.org/
20master_sites    http://ftp.mozilla.org/pub/mozilla.org/webtools/ \
21                                ftp://ftp.mozilla.org/pub/mozilla.org/webtools/
22checksums               md5 243089e2137ecfc8f857dbbeae0ad1d7
23
24depends_lib             bin:httpd:apache2 \
25                                lib:libmysqlclient:mysql4 \
26                                path:${prefix}/bin/perl:perl5.8 \
27                                port:p5-appconfig \
28                                port:p5-timedate \
29                                port:p5-dbi \
30                                port:p5-dbd-mysql \
31                                port:p5-xml-parser \
32                                port:p5-patchreader \
33                                port:p5-gd \
34                                port:p5-gdtextutil \
35                                port:p5-gdgraph \
36                                port:p5-chart \
37                                port:p5-template-toolkit \
38                                port:p5-mime-tools \
39                                bin:interdiff:patchutils
40
41patchfiles              patch-checksetup.pl
42post-patch {
43        cd ${worksrcpath}
44        foreach item [exec find . -type f -name .cvsignore] {
45                file delete -force ${item}
46        }
47        foreach item [exec find . -type d -name CVS] {
48                file delete -force ${item}
49        }
50        foreach item [glob *.cgi *.pl contrib/*.pl docs/*.pl] {
51                reinplace "s%^#!.*perl%#!${prefix}/bin/perl%" ${item}
52        }
53        foreach item [glob *.pl contrib/*.pl Bugzilla/*.pm docs/html/*.html docs/txt/*.txt docs/xml/*.xml] {
54                reinplace "s%/usr/lib/sendmail%/usr/sbin/sendmail%g" ${item}
55        }
56}
57
58configure.cmd           ./checksetup.pl
59configure.pre_args      --check-modules
60
61build.cmd                       ./checksetup.pl
62build.target
63
64destroot {
65        # Warn user if not running as root
66        if {$env(USER) != "root"} {
67                ui_msg "-----------------------------------------------------------"
68                ui_msg "Note that you are not running as root, so files installed"
69                ui_msg "by this port will not end up with proper ownership and"
70                ui_msg "likely not work correctly with Apache."
71                ui_msg "-----------------------------------------------------------"
72        }
73
74        set wwwRoot "${prefix}/www"
75        xinstall -d -m 0755 ${destroot}${wwwRoot}
76        ui_info "copying ${worksrcpath}\n     to ${destroot}${wwwRoot}/${name}"
77        system "cp -R ${worksrcpath}/. ${destroot}${wwwRoot}/${name}"
78        # Fix owner and group on installed data
79        if {$env(USER) == "root"} {
80                foreach item [exec find ${destroot}${wwwRoot}/${name} -type f] {
81                        file attributes ${item} -permissions go+r -owner www -group www
82                }
83                foreach item [exec find ${destroot}${wwwRoot}/${name} -type d] {
84                        file attributes ${item} -permissions go+rx -owner www -group www
85                }
86        } else {
87                foreach item [exec find ${destroot}${wwwRoot}/${name} -type f] {
88                        file attributes ${item} -permissions go+r
89                }
90                foreach item [exec find ${destroot}${wwwRoot}/${name} -type d] {
91                        file attributes ${item} -permissions go+rx
92                }
93        }
94
95        set docRoot "/Library/WebServer/Documents"
96        if {[file isdirectory ${docRoot}]} {
97                xinstall -d -m 0755 ${destroot}${docRoot}
98                ui_info "linking ${destroot}${docRoot}/${name} to ${wwwRoot}/${name}"
99                system "ln -s ${wwwRoot}/${name} ${destroot}${docRoot}/${name}"
100        }
101        set docRoot "${prefix}/www/apache2/htdocs"
102        if {[file isdirectory ${docRoot}]} {
103                xinstall -d -m 0755 ${destroot}${docRoot}
104                ui_info "linking ${destroot}${docRoot}/${name} to ${wwwRoot}/${name}"
105                system "ln -s ${wwwRoot}/${name} ${destroot}${docRoot}/${name}"
106        }
107
108        set docPath "${prefix}/share/doc/${name}"
109        xinstall -d -m 0755 ${destroot}${docPath}
110        cd ${worksrcpath}
111        xinstall -m 0644 \
112                README QUICKSTART UPGRADING UPGRADING-pre-2.8 \
113                ${destroot}${docPath}/
114        ui_info "copying docs\n     to ${destroot}${docPath}/guide"
115        system "cp -R docs ${destroot}${docPath}/guide"
116        foreach item [exec find ${destroot}${docPath}/guide -type f] {
117                file attributes ${item} -permissions go+r
118        }
119        foreach item [exec find ${destroot}${docPath}/guide -type d] {
120                file attributes ${item} -permissions go+rx
121        }
122}
123
124post-install {
125        ui_msg "-----------------------------------------------------------"
126        ui_msg "To complete the installation of ${name}, you should read"
127        ui_msg "the quick start document found here:"
128        ui_msg ""
129        ui_msg "  ${prefix}/share/doc/${name}/QUICKSTART"
130        ui_msg ""
131        ui_msg "Steps 1 through 3 have already been completed by the"
132        ui_msg "port installation. For step 1, the following link has"
133        ui_msg "been created:"
134        ui_msg ""
135        set wwwRoot "${prefix}/www"
136        set docRoot "/Library/WebServer/Documents"
137        if {[file isdirectory ${docRoot}]} {
138                ui_msg "  ${docRoot}/${name} -> ${wwwRoot}/${name}"
139        }
140        set docRoot "${prefix}/www/apache2/htdocs"
141        if {[file isdirectory ${docRoot}]} {
142                ui_msg "  ${docRoot}/${name} -> ${wwwRoot}/${name}"
143        }
144        ui_msg ""
145        ui_msg "This allows access to ${name} from the root of the"
146        ui_msg "webserver as the URL (needed for steps 4 and 8):"
147        ui_msg ""
148        ui_msg "  http://[exec hostname]/${name}/"
149        ui_msg ""
150        ui_msg "For step 4, the ${name} configuration file can be"
151        ui_msg "found here:"
152        ui_msg ""
153        ui_msg "  ${wwwRoot}/${name}/localconfig"
154        ui_msg ""
155        ui_msg "For the rest of the steps, the main ${name} directory"
156        ui_msg "can be found here (needed for step 7):"
157        ui_msg ""
158        ui_msg "  ${wwwRoot}/${name}"
159        ui_msg "-----------------------------------------------------------"
160}
161
Note: See TracBrowser for help on using the repository browser.