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 Requires: mysql >= 3.23.41
19 Requires: perl-DBD-mysql
20 Requires: perl-DBI >= 1.36
22 Requires: webserver = apache
23 Conflicts: apache1 < 1.3.33-2
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _noautoreq 'perl(DBD::Pg)'
29 %define _bugzilladir %{_datadir}/bugzilla
30 %define _sysconfdir /etc/%{name}
33 Bugzilla is the Bug-Tracking System from the Mozilla project.
36 System ¶ledzenia b³êdów.
43 find -name CVS -type d | xargs rm -rf
44 find '(' -name '*~' -o -name '*.orig' -o -name '.cvsignore' ')' | xargs -r rm -v
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bugzilladir}/Bugzilla,/var/lib/%{name}/{data,graphs}}
50 install *.{cgi,html,jpg,js,pl,pm,txt,dtd,xul} $RPM_BUILD_ROOT%{_bugzilladir}
51 cp -a Bugzilla $RPM_BUILD_ROOT%{_bugzilladir}
52 cp -a images js skins template $RPM_BUILD_ROOT%{_bugzilladir}
54 ln -s /var/lib/%{name}/data $RPM_BUILD_ROOT%{_bugzilladir}
55 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_bugzilladir}
57 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
60 rm -rf $RPM_BUILD_ROOT
62 %triggerpostun -- %{name} < 2.20
63 # migrate from old config location (only apache2, as there was no apache1 support)
64 if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
65 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
66 mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/apache.conf
67 if [ -f /var/lock/subsys/httpd ]; then
68 /etc/rc.d/init.d/httpd reload 1>&2
72 # nuke very-old config location (this mostly for Ra)
73 if [ ! -d /etc/httpd/httpd.conf ]; then
74 sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
75 if [ -f /var/lock/subsys/httpd ]; then
76 /etc/rc.d/init.d/httpd reload 1>&2
80 # place new config location, as trigger puts config only on first install, do it here.
82 if [ -d /etc/apache/conf.d ]; then
83 ln -sf %{_sysconfdir}/apache.conf /etc/apache/conf.d/99_%{name}.conf
84 if [ -f /var/lock/subsys/apache ]; then
85 /etc/rc.d/init.d/apache reload 1>&2
89 if [ -d /etc/httpd/httpd.conf ]; then
90 ln -sf %{_sysconfdir}/apache.conf /etc/httpd/httpd.conf/99_%{name}.conf
91 if [ -f /var/lock/subsys/httpd ]; then
92 /etc/rc.d/init.d/httpd reload 1>&2
96 %triggerin -- apache1 >= 1.3.33-2
97 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
99 %triggerun -- apache1 >= 1.3.33-2
100 %apache_config_uninstall -v 1
102 %triggerin -- apache >= 2.0.0
103 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
105 %triggerun -- apache >= 2.0.0
106 %apache_config_uninstall -v 2
109 %defattr(644,root,root,755)
110 %doc QUICKSTART README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
111 %doc contrib docs/html
112 %attr(750,root,http) %dir %{_sysconfdir}
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
116 %{_bugzilladir}/Bugzilla
118 %{_bugzilladir}/graphs
119 %{_bugzilladir}/images
121 %{_bugzilladir}/skins
122 %{_bugzilladir}/template
123 %attr(755,root,root) %{_bugzilladir}/*.cgi
124 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_bugzilladir}/globals.pl
125 %{_bugzilladir}/[!g]*.pl
126 %{_bugzilladir}/*.dtd
127 %{_bugzilladir}/*.html
129 %{_bugzilladir}/*.jpg
131 %{_bugzilladir}/*.txt
132 %{_bugzilladir}/*.xul
133 %dir /var/lib/%{name}
134 %attr(770,root,http) /var/lib/%{name}/data
135 %attr(775,root,http) /var/lib/%{name}/graphs