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

Last change on this file since 38957 was 38957, checked in by wsiegrist@…, 11 years ago

Releasing maintainership

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