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): 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: bd8638501bc3f6ce93499ae0227d1ec2
15 Patch0: %{name}-httpd_user.patch
16 Patch1: %{name}-chdir.patch
17 URL: http://www.bugzilla.org/
18 BuildRequires: rpmbuild(macros) >= 1.268
19 Requires: mysql >= 3.23.41
20 Requires: perl-DBD-mysql
21 Requires: perl-DBI >= 1.36
23 Requires: webserver = apache
24 Conflicts: apache1 < 1.3.33-2
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define _noautoreq 'perl(DBD::Pg)'
30 %define _bugzilladir %{_datadir}/bugzilla
31 %define _sysconfdir /etc/%{name}
34 Bugzilla is the Bug-Tracking System from the Mozilla project.
37 System ¶ledzenia b³êdów.
44 find -name CVS -type d | xargs rm -rf
45 find '(' -name '*~' -o -name '*.orig' -o -name '.cvsignore' ')' | xargs -r rm -v
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bugzilladir}/Bugzilla,/var/lib/%{name}/{data,graphs}}
51 install *.{cgi,html,jpg,js,pl,pm,txt,dtd,xul} $RPM_BUILD_ROOT%{_bugzilladir}
52 cp -a Bugzilla $RPM_BUILD_ROOT%{_bugzilladir}
53 cp -a images js skins template $RPM_BUILD_ROOT%{_bugzilladir}
55 ln -s /var/lib/%{name}/data $RPM_BUILD_ROOT%{_bugzilladir}
56 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_bugzilladir}
58 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
61 rm -rf $RPM_BUILD_ROOT
63 %triggerpostun -- %{name} < 2.20
64 # migrate from old config location (only apache2, as there was no apache1 support)
65 if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
66 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
67 mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/apache.conf
68 %service -q httpd reload
71 # nuke very-old config location (this mostly for Ra)
72 if [ ! -d /etc/httpd/httpd.conf ]; then
73 sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
74 %service -q httpd reload
77 # place new config location, as trigger puts config only on first install, do it here.
79 if [ -d /etc/apache/conf.d ]; then
80 ln -sf %{_sysconfdir}/apache.conf /etc/apache/conf.d/99_%{name}.conf
81 %service -q apache reload
84 if [ -d /etc/httpd/httpd.conf ]; then
85 ln -sf %{_sysconfdir}/apache.conf /etc/httpd/httpd.conf/99_%{name}.conf
86 %service -q httpd reload
89 %triggerin -- apache1 >= 1.3.33-2
90 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
92 %triggerun -- apache1 >= 1.3.33-2
93 %apache_config_uninstall -v 1
95 %triggerin -- apache >= 2.0.0
96 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
98 %triggerun -- apache >= 2.0.0
99 %apache_config_uninstall -v 2
102 %defattr(644,root,root,755)
103 %doc QUICKSTART README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
104 %doc contrib docs/html
105 %attr(750,root,http) %dir %{_sysconfdir}
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
109 %{_bugzilladir}/Bugzilla
111 %{_bugzilladir}/graphs
112 %{_bugzilladir}/images
114 %{_bugzilladir}/skins
115 %{_bugzilladir}/template
116 %attr(755,root,root) %{_bugzilladir}/*.cgi
117 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_bugzilladir}/globals.pl
118 %{_bugzilladir}/[!g]*.pl
119 %{_bugzilladir}/*.dtd
120 %{_bugzilladir}/*.html
122 %{_bugzilladir}/*.jpg
124 %{_bugzilladir}/*.txt
125 %{_bugzilladir}/*.xul
126 %dir /var/lib/%{name}
127 %attr(770,root,http) /var/lib/%{name}/data
128 %attr(775,root,http) /var/lib/%{name}/graphs