File zope-ZMySQLDA.spec of Package zope-ZMySQLDA

%define product   ZMySQLDA
%define version   2.0.9b2
%define release   9

%define zope_home %{_prefix}/lib/zope
%define software_home %{zope_home}/lib/python

Summary:   A Zope connector to Mysql
Name:      zope-%{product}
Version:   %{version}
Release:   %{release}
License:   GPL
Group:     System/Servers
Source:    %{product}-%{version}.tar.bz2
Patch0:    ZMySQLDA-2.0.9b2_with_MySQL-python-0.9.0.patch.bz2
Patch1:    ZMySQLDA-2.0.9b2_release-unlocked-lock.patch.bz2
URL:       http://www.zope.org/Members/adustman/Products/ZMySQLDA
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
BuildArch: noarch
Requires:  zope MySQL-python

# Same problem as the Localizer one:
# (kevin) This "Provides:" statement don't resolve the conflit of pre-existing
# Localizer package in Mandriva 2006 repository. When you type "urpmi Localizer",
# nothing is prompt to ask you which version of Localizer you want to install
# (the mandriva one or the nexedi one): the mandriva version is automatically
# selected. To obtain the Nexedi's one, you have to type "urpmi zope-Localizer".
# The solution could be to add a "Provides:  Localizer" statement in Mandriva
# Spec file.
Provides:  ZMySQLDA

#----------------------------------------------------------------------
%description
ZMySQLDA allows to quickly connect to Mysql with Zope.

#----------------------------------------------------------------------
%prep
%setup -c
%patch0 -p1
%patch1 -p1

%build

%install
%{__rm} -rf %{buildroot}
%{__mkdir_p} %{buildroot}/%{software_home}/Products
%{__cp} -a * %{buildroot}%{software_home}/Products/


%clean
%{__rm} -rf %{buildroot}

%post
if [ "`%{_prefix}/bin/zopectl status`" != "daemon manager not running" ] ; then
  service zope restart
fi

%postun
if [ -f "%{_prefix}/bin/zopectl" ] && [ "`%{_prefix}/bin/zopectl status`" != "daemon manager not running" ] ; then
  service zope restart
fi

%files
%defattr(0644, zope, zope, 0755)
%doc %{product}/CHANGES.txt %{product}/DEPENDENCIES.txt %{product}/README.txt %{product}/VERSION.txt
%{software_home}/Products/*

#----------------------------------------------------------------------
%changelog
* Mon Jan 22 2007 Kevin Deldycke <kevin@nexedi.com> 2.0.9b2-9mdv2007.0
- Rebuild for Mandriva 2007.0

* Wed Feb 01 2006 Kevin Deldycke <kevin@nexedi.com> 2.0.9b2-8mdk
- Give ownership to zope

* Tue Jan 24 2006 Kevin Deldycke <kevin@nexedi.com> 2.0.9b2-7mdk
- Delete requirement of MySQL-Max server because the MySQL server can be located on another machine

* Wed Jan 05 2006 Kevin Deldycke <kevin@nexedi.com> 2.0.9b2-6mdk
- Merge nexedi 10.2 spec file with Mandriva 2006 spec file

* Tue Jun 15 2004 Sebastien Robin <seb@nexedi.com> 2.0.9b2-5mdk
- Added dependency with MySQL

* Wed Sep 12 2003 Sebastien Robin <seb@nexedi.com> 2.0.9b2-4mdk
- Make now signed rpm

* Wed Sep 05 2003 Sebastien Robin <seb@nexedi.com> 2.0.9b2-3mdk
- Change in the requires field "Zope" by "zope"

* Wed Sep 05 2003 Sebastien Robin <seb@nexedi.com> 2.0.9b2-2mdk
- Update spec in order to follows Mandrake Rules

* Mon Apr 28 2003 Sebastien Robin <seb@nexedi.com> 2.0.9b2-1nxd
- It was first made by converting a Debian Package. But since
we need to modify it, we needed to build by the rpm way.

* Wed Mar 23 2003 Sebastien Robin <seb@nexedi.com> 2.0.8-2nxd
- It was first made by converting a Debian Package. But since
we need to modify it, we needed to build by the rpm way.
openSUSE Build Service is sponsored by