1 %include /usr/lib/rpm/macros.perl
2 Summary: Bug tracking system
3 Summary(pl): System ¶ledzenia b³êdów
9 Source0: http://ftp.mozilla.org/pub/webtools/%{name}-%{version}.tar.gz
10 # Source0-md5: c5b66336cd5666a2b995ed5ead050edc
12 Patch0: %{name}-httpd_user.patch
13 URL: http://www.bugzilla.org/
15 Requires(post,postun): apache
16 Requires(post,postun): grep
17 Requires(postun): fileutils
19 Requires: mysql >= 3.23.41
20 Requires: perl-DBD-mysql
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _noautoreq 'perl(localconfig)' 'perl(data::params)' 'perl(data::versioncache)'
25 %define _bugzilladir /usr/share/bugzilla
31 System ¶ledzenia b³êdów.
38 perl -pi -e 's@#\!/usr/bonsaitools/bin/perl@#\!/usr/bin/perl@' *cgi *pl Bug.pm processmail syncshadowdb
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{/etc/httpd,%{_bugzilladir}/{css,docs/{html,images},template},/var/lib/%{name}/{data,graphs}}
44 install *.{cgi,gif,html,jpg,js,pl,pm,txt} $RPM_BUILD_ROOT%{_bugzilladir}
45 install css/*.css $RPM_BUILD_ROOT%{_bugzilladir}/css
46 install docs/html/*.html $RPM_BUILD_ROOT%{_bugzilladir}/docs/html
47 install docs/images/*.gif $RPM_BUILD_ROOT%{_bugzilladir}/docs/images
49 cp -r template/en $RPM_BUILD_ROOT%{_bugzilladir}/template
50 find -name CVS -type d | xargs rm -rf
52 ln -s /var/lib/%{name}/data $RPM_BUILD_ROOT%{_bugzilladir}
53 ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_bugzilladir}
55 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd
58 rm -rf $RPM_BUILD_ROOT
61 if [ "$1" = "1" ]; then
62 if [ -f /etc/httpd/httpd.conf ] && \
63 ! grep -q "^Include.*/bugzilla.conf" /etc/httpd/httpd.conf; then
64 echo "Include /etc/httpd/bugzilla.conf" >> /etc/httpd/httpd.conf
66 if [ -f /var/lock/subsys/httpd ]; then
67 /etc/rc.d/init.d/httpd restart 1>&2
72 if [ "$1" = "0" ]; then
74 grep -E -v "^Include.*bugzilla.conf" /etc/httpd/httpd.conf > \
75 /etc/httpd/httpd.conf.tmp
76 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
77 if [ -f /var/lock/subsys/httpd ]; then
78 /etc/rc.d/init.d/httpd restart 1>&2
83 %defattr(644,root,root,755)
84 %doc README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
85 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
89 %{_bugzilladir}/template
91 %{_bugzilladir}/graphs
92 %attr(755,root,root) %{_bugzilladir}/*.cgi
93 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_bugzilladir}/globals.pl
94 %{_bugzilladir}/[!g]*.pl
96 %{_bugzilladir}/*.html
100 %{_bugzilladir}/*.txt
101 %dir /var/lib/%{name}
102 %attr(770,root,http) /var/lib/%{name}/data
103 %attr(775,root,http) /var/lib/%{name}/graphs