]>
Commit | Line | Data |
---|---|---|
cfd1a589 ER |
1 | # TODO |
2 | # - Split DB packages for mysql/pgsql | |
3 | # - fill brr and add autodeps bcond | |
8274a9bf TO |
4 | %include /usr/lib/rpm/macros.perl |
5 | Summary: Bug tracking system | |
59e2cd84 | 6 | Summary(pl.UTF-8): System śledzenia błędów |
8274a9bf | 7 | Name: bugzilla |
2ffbd3ad | 8 | Version: 3.0 |
f59432ca | 9 | Release: 0.1 |
8274a9bf | 10 | License: GPL |
29309029 | 11 | Group: Applications/WWW |
f59432ca ER |
12 | Source0: http://ftp.mozilla.org/pub/mozilla.org/webtools/%{name}-%{version}.tar.gz |
13 | # Source0-md5: 9a56a47cdbfcb70a85ad73d923ac7e9d | |
8274a9bf | 14 | Source1: %{name}.conf |
6f24946d | 15 | Source2: %{name}-localconfig.pl |
4ff49655 | 16 | Source3: %{name}.cron |
6f24946d | 17 | Patch0: %{name}-pld.patch |
8274a9bf | 18 | URL: http://www.bugzilla.org/ |
90c1b784 | 19 | BuildRequires: rpm-perlprov >= 4.1-13 |
ce824031 | 20 | BuildRequires: rpmbuild(macros) >= 1.268 |
3e50bea3 | 21 | BuildRequires: sed >= 4.0 |
f59432ca ER |
22 | Requires: perl(Email::MIME::Modifier) |
23 | Requires: perl(Email::Send) >= 2.00 | |
8274a9bf | 24 | Requires: perl-DBD-mysql |
2ffbd3ad | 25 | Requires: perl-DBI >= 1.41 |
6f24946d | 26 | Requires: perl-MailTools >= 1.67 |
cfd1a589 | 27 | Requires: smtpdaemon |
bd1423d3 | 28 | Requires: webapps |
cfd1a589 | 29 | BuildArch: noarch |
8274a9bf TO |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
bd1423d3 ER |
32 | %define _webapps /etc/webapps |
33 | %define _webapp %{name} | |
34 | %define _sysconfdir %{_webapps}/%{_webapp} | |
35 | %define _appdir %{_datadir}/%{_webapp} | |
d15bced7 | 36 | # Don't enforce DBD driver and exclude optional packages according to release notes |
2ffbd3ad ER |
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) |
38 | ||
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 | |
46 | ||
8274a9bf TO |
47 | |
48 | %description | |
cfd1a589 | 49 | Bugzilla is the Bug-Tracking System from the Mozilla project. |
8274a9bf | 50 | |
b31e80bd JR |
51 | %description -l pl.UTF-8 |
52 | System śledzenia błędów. | |
8274a9bf TO |
53 | |
54 | %prep | |
2ffbd3ad | 55 | %setup -q %{?_rc:-n %{name}-%{version}%{_rc}} |
a8d6ba6e | 56 | %patch0 -p1 |
6f24946d ER |
57 | |
58 | sed -i -e ' | |
59 | s,use lib ".",use lib "%{_appdir}", | |
60 | s,use lib qw(.),use lib "%{_appdir}", | |
61 | ' *.cgi | |
8274a9bf | 62 | |
cfd1a589 ER |
63 | find -name CVS -type d | xargs rm -rf |
64 | find '(' -name '*~' -o -name '*.orig' -o -name '.cvsignore' ')' | xargs -r rm -v | |
8274a9bf | 65 | |
6f24946d ER |
66 | # won't package tests |
67 | rm -f runtests.pl | |
68 | ||
8274a9bf TO |
69 | %install |
70 | rm -rf $RPM_BUILD_ROOT | |
6f24946d ER |
71 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/htdocs,/var/lib/%{name}/{data,graphs}} \ |
72 | $RPM_BUILD_ROOT%{perl_vendorlib} | |
73 | ||
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} | |
8274a9bf | 77 | |
6f24946d ER |
78 | install *.{cgi,js,txt,dtd,xul} $RPM_BUILD_ROOT%{_appdir}/htdocs |
79 | cp -a images js skins $RPM_BUILD_ROOT%{_appdir}/htdocs | |
8274a9bf | 80 | |
6f24946d | 81 | ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_appdir}/htdocs |
a8d6ba6e | 82 | |
cfd1a589 | 83 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
bd1423d3 | 84 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
6f24946d | 85 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/localconfig.pl |
4ff49655 | 86 | install -D %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.daily/bugzilla |
8274a9bf TO |
87 | |
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
6f24946d ER |
91 | %post |
92 | if [ "$1" = 1 ]; then | |
4ff49655 ER |
93 | # shamelessly stolen from gentoo |
94 | %banner -e %{name} <<'EOF' | |
95 | 0. Bugzilla has been installed into %{_appdir} | |
96 | ||
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 | |
100 | ||
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. | |
104 | ||
105 | 2. Please read the Release Notes, especially if you are upgrading: | |
106 | http://www.bugzilla.org/releases/%{version}/release-notes.html | |
6f24946d ER |
107 | EOF |
108 | fi | |
109 | ||
04eebeb6 | 110 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
bd1423d3 ER |
111 | %webapp_register apache %{_webapp} |
112 | ||
04eebeb6 | 113 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
bd1423d3 ER |
114 | %webapp_unregister apache %{_webapp} |
115 | ||
116 | %triggerin -- apache < 2.2.0, apache-base | |
117 | %webapp_register httpd %{_webapp} | |
118 | ||
119 | %triggerun -- apache < 2.2.0, apache-base | |
120 | %webapp_unregister httpd %{_webapp} | |
8274a9bf TO |
121 | |
122 | %files | |
123 | %defattr(644,root,root,755) | |
d15bced7 | 124 | %doc QUICKSTART README UPGRADING* docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt |
cfd1a589 | 125 | %doc contrib docs/html |
bd1423d3 | 126 | %dir %attr(750,root,http) %{_sysconfdir} |
cfd1a589 | 127 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf |
bd1423d3 | 128 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf |
d15bced7 | 129 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.pl |
bd1423d3 | 130 | |
4ff49655 ER |
131 | %attr(755,root,root) /etc/cron.daily/bugzilla |
132 | ||
6f24946d ER |
133 | %{perl_vendorlib}/Bugzilla |
134 | %{perl_vendorlib}/Bugzilla.pm | |
135 | ||
bd1423d3 | 136 | %dir %{_appdir} |
bd1423d3 | 137 | %{_appdir}/template |
6f24946d ER |
138 | %attr(755,root,root) %{_appdir}/*.pl |
139 | ||
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 | |
147 | %{_appdir}/htdocs/js | |
148 | %{_appdir}/htdocs/skins | |
149 | %attr(755,root,root) %{_appdir}/htdocs/*.cgi | |
150 | ||
a8d6ba6e TO |
151 | %dir /var/lib/%{name} |
152 | %attr(770,root,http) /var/lib/%{name}/data | |
6f24946d | 153 | %attr(770,root,http) /var/lib/%{name}/graphs |