source: trunk/dports/devel/bugzilla/Portfile

Last change on this file was 151915, checked in by mojca@…, 13 months ago

bugzilla: switch to perl5.24 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.5 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 151915 2016-08-23 22:05:33Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7name                bugzilla
8version             4.4.5
9revision            2
10license             MPL-2
11categories          devel www databases
12maintainers         nomaintainer
13platforms           darwin
14description         popular and extensive bug-tracking system
15long_description    Bugzilla is a Defect Tracking System or \
16                    Bug-Tracking System. Defect Tracking Systems allow \
17                    individual or groups of developers to keep track of \
18                    outstanding bugs in their product effectively. Most \
19                    commercial defect-tracking software vendors charge \
20                    enormous licensing fees. Despite being free, \
21                    Bugzilla has many features its expensive \
22                    counterparts lack. Consequently, Bugzilla has \
23                    quickly become a favorite of hundreds of \
24                    organizations across the globe.
25
26homepage            http://www.bugzilla.org/
27master_sites        http://ftp.mozilla.org/pub/mozilla.org/webtools/
28
29checksums           rmd160  af53b39d035de36f636f615e3e3dabef6d051772 \
30                    sha256  70609fa5bbe55a3b802afcf749a098824d7a96dc87b91ce07b000cfdd7987da5
31
32perl5.branches      5.24
33
34depends_lib         port:apache2 \
35                    port:perl${perl5.major} \
36                    port:p${perl5.major}-cgi \
37                    port:p${perl5.major}-timedate \
38                    port:p${perl5.major}-datetime \
39                    port:p${perl5.major}-datetime-timezone \
40                    port:p${perl5.major}-dbi \
41                    port:p${perl5.major}-template-toolkit \
42                    port:p${perl5.major}-digest-sha \
43                    port:p${perl5.major}-email-send \
44                    port:p${perl5.major}-email-mime \
45                    port:p${perl5.major}-uri \
46                    port:p${perl5.major}-list-moreutils \
47                    port:p${perl5.major}-math-random-isaac \
48                    port:p${perl5.major}-dbd-mysql \
49                    port:p${perl5.major}-gd \
50                    port:p${perl5.major}-chart \
51                    port:p${perl5.major}-template-gd \
52                    port:p${perl5.major}-gdtextutil \
53                    port:p${perl5.major}-gdgraph \
54                    port:p${perl5.major}-mime-tools \
55                    port:p${perl5.major}-xml-twig \
56                    port:p${perl5.major}-libwww-perl \
57                    port:p${perl5.major}-patchreader \
58                    port:p${perl5.major}-perl-ldap \
59                    port:p${perl5.major}-authen-sasl \
60                    port:p${perl5.major}-net-smtp-ssl \
61                    port:p${perl5.major}-soap-lite \
62                    port:p${perl5.major}-json-xs \
63                    port:p${perl5.major}-test-taint \
64                    port:p${perl5.major}-html-parser \
65                    port:p${perl5.major}-html-scrubber \
66                    port:p${perl5.major}-encode \
67                    port:p${perl5.major}-encode-detect \
68                    port:p${perl5.major}-file-mimeinfo \
69                    port:p${perl5.major}-io-stringy \
70                    port:patchutils
71
72variant mysql5 description "Use mysql5 database" {
73    depends_lib-append  path:bin/mysql_config5:mysql5
74}
75
76default_variants    +mysql5
77
78post-patch {
79    foreach item [glob ${worksrcpath}/*.cgi ${worksrcpath}/*.pl \
80                       ${worksrcpath}/contrib/*.pl ${worksrcpath}/docs/*.pl] {
81        reinplace -locale C "s%^#!.*perl%#!${perl5.bin}%" ${item}
82    }
83    foreach item [glob ${worksrcpath}/*.pl ${worksrcpath}/contrib/*.pl \
84                       ${worksrcpath}/Bugzilla/*.pm ${worksrcpath}/docs/html/*.html \
85                       ${worksrcpath}/docs/txt/*.txt ${worksrcpath}/docs/xml/*.xml] {
86        reinplace -locale C "s%/usr/lib/sendmail%/usr/sbin/sendmail%g" ${item}
87    }
88}
89
90configure.cmd       ./checksetup.pl
91configure.pre_args  --check-modules
92
93build.cmd           ./checksetup.pl
94build.target
95
96destroot {
97    # Warn user if not running as root
98    if {[geteuid] != 0} {
99        ui_msg "-----------------------------------------------------------"
100        ui_msg "Note that you are not running as root, so files installed"
101        ui_msg "by this port will not end up with proper ownership and"
102        ui_msg "likely not work correctly with Apache."
103        ui_msg "-----------------------------------------------------------"
104    }
105
106    set wwwRoot "${prefix}/www"
107    xinstall -d -m 0755 ${destroot}${wwwRoot}
108    ui_info "copying ${worksrcpath}\n     to ${destroot}${wwwRoot}/${name}"
109    system "cp -R ${worksrcpath}/. ${destroot}${wwwRoot}/${name}"
110    # Fix owner and group on installed data
111    if {[geteuid] == 0} {
112        foreach item [exec find ${destroot}${wwwRoot}/${name} -type f] {
113            file attributes ${item} -permissions go+r -owner www -group www
114        }
115        foreach item [exec find ${destroot}${wwwRoot}/${name} -type d] {
116            file attributes ${item} -permissions go+rx -owner www -group www
117        }
118    } else {
119        foreach item [exec find ${destroot}${wwwRoot}/${name} -type f] {
120            file attributes ${item} -permissions go+r
121        }
122        foreach item [exec find ${destroot}${wwwRoot}/${name} -type d] {
123            file attributes ${item} -permissions go+rx
124        }
125    }
126
127    set docPath "${prefix}/share/doc/${name}"
128    xinstall -d -m 0755 ${destroot}${docPath}
129    xinstall -m 0644 \
130        ${worksrcpath}/README \
131        ${destroot}${docPath}/
132    ui_info "copying docs\n     to ${destroot}${docPath}/guide"
133    system "cp -R ${worksrcpath}/docs ${destroot}${docPath}/guide"
134    foreach item [exec find ${destroot}${docPath}/guide -type f] {
135        file attributes ${item} -permissions go+r
136    }
137    foreach item [exec find ${destroot}${docPath}/guide -type d] {
138        file attributes ${item} -permissions go+rx
139    }
140}
141
142notes "
143To complete the installation of ${name}, you should read the Bugzilla Quick Start Guide
144section of the README document found here:
145
146    ${prefix}/share/doc/${name}/README
147
148For step 4, the ${name} configuration file can be found here:
149
150    ${prefix}/www/${name}/localconfig
151
152For the rest of the steps, the main ${name} directory can be found here\
153(needed for step 7):
154
155    ${prefix}/www/${name}
156"
157
158livecheck.type  regex
159livecheck.url   ${master_sites}
160livecheck.regex ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)${extract.suffix}
161
Note: See TracBrowser for help on using the repository browser.