%define name bugzilla
%define version 2.14
%define release 1mdk

Summary       : A bug tracking system developed by mozilla.org.
Name          : %name
Version       : %version
Release       : %release
License       : MPL
Group         : Networking/WWW
Source        : http://ftp.mozilla.org/pub/webtools/%name-%version.tar.bz2
URL           : http://www.mozilla.org/bugs/
Patch0        : bugzilla-2.14-perlpaths.patch.bz2
BuildRoot     : %{_tmppath}/%{name}-%{version}
Requires      : perl-TimeDate
Requires      : perl-Chart
Requires      : perl-GD
Requires      : perl-Mysql
Requires      : MySQL
Requires      : perl-DBI
Requires      : perl, apache
Prefix        : /var/www/html/bugzilla
BuildArchitectures: noarch


%description
Bugzilla is the bug tracking system developed by mozilla.org.
Mozilla.org is a group within Netscape that acts as a clearinghouse
for Netscape source code. Some modifications have been made for
use with Mandrake Linux.


%prep
rm -rf $RPM_BUILD_ROOT


%setup -q
%patch0 -p1


%build


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{prefix}/data
mkdir -p $RPM_BUILD_ROOT/%{prefix}/shadow
install *.cgi $RPM_BUILD_ROOT/%{prefix}
install *.dtd $RPM_BUILD_ROOT/%{prefix}
install *.html $RPM_BUILD_ROOT/%{prefix}
install *.jpg $RPM_BUILD_ROOT/%{prefix}
install *.js $RPM_BUILD_ROOT/%{prefix}
install *.pm $RPM_BUILD_ROOT/%{prefix}
install *.pl $RPM_BUILD_ROOT/%{prefix}
install processmail $RPM_BUILD_ROOT/%{prefix}
install syncshadowdb $RPM_BUILD_ROOT/%{prefix}
install robots.txt $RPM_BUILD_ROOT/%{prefix}
chmod 1777 $RPM_BUILD_ROOT/%{prefix}/shadow
chmod 1777 $RPM_BUILD_ROOT/%{prefix}/data


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-, root, root)
%dir %{prefix}/
%{prefix}/*
%doc README UPGRADING UPGRADING-pre-2.8
%doc docs/README.docs docs/rel_notes.txt
%doc docs/html docs/images docs/sgml docs/txt
%doc contrib


%changelog
* Wed Sep 12 2001 Don Head <donhead@linux-certified.org> 2.14-1mdk
- Merge with Red Hat:
  - add requirement for perl-DBD-MySQL (Mandrake requires perl-Mysql)
  - updated to 2.14 for security errata
  - added requires for perl-GD
  - forgot to include *.js files. Fixed. (#42795)
  - updated to 2.12, updated perlpath patch
  - added suggested fixes from bug 19497
  - Security fixes 38411
  - Note: This is not the Red Hat version of Bugzilla. You can grab that 
    at ftp://people.redhat.com/dkl
  - fixed bug #16147, dependancy problems.
  - patched all the files which looked for perl in /usr/bonsaitools/bin
  - fixed problem with /usr/bonsai/perl not existing.

* Mon Feb 19 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.11-2mdk
- great fixes from Don Head <donhead@linux-certified.org> :
	- Move to /var/www for FHS
	- Fix perl requires

* Mon Nov 20 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.11-1mdk
- used srpm from  Oden Eriksson <oden@kvikkjokk.com> :
	- 2.11
	- changed the perl path

* Mon Jul 24 2000 Prospector <prospector@redhat.com>
- rebuilt

* Mon Jul 10 2000 Tim Powers <timp@redhat.com>
- rebuilt

* Wed Jun 21 2000 Tim Powers <timp@redhat.com>
- somehow changes were lost, don't know why but they were. Fixed

* Tue Jun 20 2000 Tim Powers <timp@redhat.com>
- fixed location for installation. Now out of /home (it's about time).

* Mon Jun 19 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- 2.10

* Thu Jan 13 2000 Dave Lawrence <dkl@redhat.com>
- Minor cosmetic changes
- Different group permission mechanisms
- Packaged for Powertools
 
* Wed Nov 24 1999 Dave Lawrence <dkl@redhat.com>
- updated to 2.8 (w/Red Hat mods)
- added perl and perl-DBI to requires

* Fri Jul 30 1999 Tim Powers <timp@redhat.com>
- updated to 2.4, updated %post
- added URL and download loc.
- rebuilt for 6.1

* Mon Jan 11 1999 Michael Maher <mike@redhat.com>
- cleaned up spec file a bit.
- ran thru build system

* Thu Dec 10 1998 Andrew Anderson <andrew@redhat.com>
- Initial packaging
