2 # - Split DB packages for mysql/pgsql
3 # - fill brr and add autodeps bcond
4 %include /usr/lib/rpm/macros.perl
5 Summary: Bug tracking system
6 Summary(pl.UTF-8): System śledzenia błędów
11 Group: Applications/WWW
12 Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz
13 # Source0-md5: 9a56a47cdbfcb70a85ad73d923ac7e9d
15 Source2: %{name}-localconfig.pl
17 Patch0: %{name}-pld.patch
18 URL: http://www.bugzilla.org/
19 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRequires: rpmbuild(macros) >= 1.268
21 BuildRequires: sed >= 4.0
22 Requires: perl(Email::MIME::Modifier)
23 Requires: perl(Email::Send) >= 2.00
24 Requires: perl-DBD-mysql
25 Requires: perl-DBI >= 1.41
26 Requires: perl-MailTools >= 1.67
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _webapps /etc/webapps
33 %define _webapp %{name}
34 %define _sysconfdir %{_webapps}/%{_webapp}
35 %define _appdir %{_datadir}/%{_webapp}
36 # Don't enforce DBD driver and exclude optional packages according to release notes
37 %define _noautoreq 'perl(DBD::.*)' perl(Chart::Base) perl(GD) perl(GD::Graph) perl(GD::Text::Align) perl(Net::LDAP) perl(PatchReader) perl(XML::Twig) perl(Image::Magick)
39 #D perl-Apache-DBI-1.01-1, perl-AppConfig-1.56-2, perl-BSD-Resource-1.28-1, perl-Class-Inspector-1.16-1,
40 #D perl-DBD-Pg-1.49-1, perl-Data-Flow-0.09-2, perl-Email-Abstract-2.13-1, perl-Email-Address-1.86-1,
41 #D perl-Email-MIME-1.85-1, perl-Email-MIME-Attachment-Stripper-1.3-1, perl-Email-MIME-ContentType-1.0-1,
42 #D perl-Email-MIME-Creator-1.45-1, perl-Email-MIME-Encodings-1.3-2, perl-Email-MIME-Modifier-1.43-1,
43 #D perl-Email-MessageID-1.35-1, perl-Email-Reply-1.1-1, perl-Email-Send-1.46-1, perl-Email-Simple-1.96-1,
44 #D perl-Email-Simple-Creator-1.41-1, perl-IO-All-0.33-2, perl-IO-String-1.08-1, perl-Module-Pluggable-3.1-4,
45 #D perl-Return-Value-1.28-1, perl-Spiffy-0.30-1, perl-Template-Toolkit-2.15-1, perl-mixin-0.04-1, perl-mod_perl-2.0.3-2
49 Bugzilla is the Bug-Tracking System from the Mozilla project.
51 %description -l pl.UTF-8
52 System śledzenia błędów.
55 %setup -q %{?_rc:-n %{name}-%{version}%{_rc}}
59 s,use lib ".",use lib "%{_appdir}",
60 s,use lib qw(.),use lib "%{_appdir}",
63 find -name CVS -type d | xargs rm -rf
64 find '(' -name '*~' -o -name '*.orig' -o -name '.cvsignore' ')' | xargs -r rm -v
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/htdocs,/var/lib/%{name}/{data,graphs}} \
72 $RPM_BUILD_ROOT%{perl_vendorlib}
74 install *.pl $RPM_BUILD_ROOT%{_appdir}
75 cp -a template $RPM_BUILD_ROOT%{_appdir}
76 cp -a Bugzilla{,.pm} $RPM_BUILD_ROOT%{perl_vendorlib}
78 install *.{cgi,js,txt,dtd,xul} $RPM_BUILD_ROOT%{_appdir}/htdocs
79 cp -a images js skins $RPM_BUILD_ROOT%{_appdir}/htdocs
81 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_appdir}/htdocs
83 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
84 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
85 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/localconfig.pl
86 install -D %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.daily/bugzilla
89 rm -rf $RPM_BUILD_ROOT
93 # shamelessly stolen from gentoo
94 %banner -e %{name} <<'EOF'
95 0. Bugzilla has been installed into %{_appdir}
97 1. To finish the installation, please read
98 http://www.bugzilla.org/docs/%{version}/html/installation.html
99 You will need to run %{_appdir}/checksetup.pl
101 IMPORTANT: If you have customized the values in your
102 Status/Resolution field, you must edit checksetup.pl BEFORE YOU RUN
103 IT. Please see the Release Notes for more details.
105 2. Please read the Release Notes, especially if you are upgrading:
106 http://www.bugzilla.org/releases/%{version}/release-notes.html
110 %triggerin -- apache1 < 1.3.37-3, apache1-base
111 %webapp_register apache %{_webapp}
113 %triggerun -- apache1 < 1.3.37-3, apache1-base
114 %webapp_unregister apache %{_webapp}
116 %triggerin -- apache < 2.2.0, apache-base
117 %webapp_register httpd %{_webapp}
119 %triggerun -- apache < 2.2.0, apache-base
120 %webapp_unregister httpd %{_webapp}
123 %defattr(644,root,root,755)
124 %doc QUICKSTART README UPGRADING* docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
125 %doc contrib docs/html
126 %dir %attr(750,root,http) %{_sysconfdir}
127 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
128 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
129 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.pl
131 %attr(755,root,root) /etc/cron.daily/bugzilla
133 %{perl_vendorlib}/Bugzilla
134 %{perl_vendorlib}/Bugzilla.pm
138 %attr(755,root,root) %{_appdir}/*.pl
140 %dir %{_appdir}/htdocs
141 %{_appdir}/htdocs/*.dtd
142 %{_appdir}/htdocs/*.js
143 %{_appdir}/htdocs/*.txt
144 %{_appdir}/htdocs/*.xul
145 %{_appdir}/htdocs/graphs
146 %{_appdir}/htdocs/images
148 %{_appdir}/htdocs/skins
149 %attr(755,root,root) %{_appdir}/htdocs/*.cgi
151 %dir /var/lib/%{name}
152 %attr(770,root,http) /var/lib/%{name}/data
153 %attr(770,root,http) /var/lib/%{name}/graphs