Group: Web/Aplications
Source0: http://ftp.mozilla.org/pub/webtools/%{name}-%{version}.tar.gz
Source1: %{name}.conf
+Patch0: %{name}-httpd_user.patch
URL: http://www.bugzilla.org/
Requires: mysql
Requires: perl-DBD-mysql
-#BuildRequires: perl
+REquires: webserver
+BuildRequires: perl
#PreReq: -
#Requires(pre,post): -
#Requires(preun): -
%prep
%setup -q
+%patch0 -p1
%build
perl -pi -e 's@#\!/usr/bonsaitools/bin/perl@#\!/usr/bin/perl@' *cgi *pl Bug.pm processmail syncshadowdb
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/httpd,%{_bugzilladir}/{css,data,docs/{html,images},template},graphs}
+install -d $RPM_BUILD_ROOT{/etc/httpd,%{_bugzilladir}/{css,docs/{html,images},template},/var/lib/%{name}/{data,graphs}}
install *.{cgi,gif,html,jpg,js,pl,pm,txt} processmail syncshadowdb $RPM_BUILD_ROOT%{_bugzilladir}
install css/*.css $RPM_BUILD_ROOT%{_bugzilladir}/css
install docs/images/*.{gif,jpg} $RPM_BUILD_ROOT%{_bugzilladir}/docs/images
cp -r template/en $RPM_BUILD_ROOT%{_bugzilladir}/template
-
find -name CVS -type d | xargs rm -rf
+ln -s /var/lib/%{name}/data $RPM_BUILD_ROOT%{_bugzilladir}
+ln -s /var/lib/%{name}/graphs $RPM_BUILD_ROOT%{_bugzilladir}
+
install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd
%clean
%doc README UPGRADING UPGRADING-pre-2.8 docs/rel_notes.txt docs/txt/Bugzilla-Guide.txt
%config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
%dir %{_bugzilladir}
-
%{_bugzilladir}/css
%{_bugzilladir}/docs
%{_bugzilladir}/template
-
-%attr{775,root,http} %{_bugzilladir}/graphs
-%attr{640,root,http} %config(noreplace) %verify(not size mtime md5) globals.pl
-
+%{_bugzilladir}/data
+%{_bugzilladir}/graphs
+%attr(755,root,root) %{_bugzilladir}/*.cgi
+%attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_bugzilladir}/globals.pl
%{_bugzilladir}/[!g]*.pl
-
-%attr{755,root,root} %{_bugzilladir}/*.cgi
+%{_bugzilladir}/*.pm
+%{_bugzilladir}/*.html
+%{_bugzilladir}/*.js
+%{_bugzilladir}/*.gif
+%{_bugzilladir}/*.jpg
+%{_bugzilladir}/*.txt
+%{_bugzilladir}/processmail
+%{_bugzilladir}/syncshadowdb
+%dir /var/lib/%{name}
+%attr(770,root,http) /var/lib/%{name}/data
+%attr(775,root,http) /var/lib/%{name}/graphs