File zope-iHotfix.spec of Package zope-iHotfix

%define product   iHotfix
%define version   0.5.2
%define release   5

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

Summary:   Localizer's dynamic patch for Zope
Name:      zope-%{product}
Version:   %{version}
Release:   %{release}
License:   GPL
Group:     Development/Python
Source0:   %{product}-%{version}.tar.bz2
Patch0:    iHotfix-0.5.2-get_request.patch.bz2
URL:       http://www.ikaaro.org/localizer/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
BuildArch: noarch
Requires:  zope python python-itools

#----------------------------------------------------------------------
%description
This product dynamically patches Zope to fix four problems: the global
request, the accept language, unicode for ZPT and mx.DateTime.

#----------------------------------------------------------------------
%prep
%setup -c
%patch0 -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}/README.txt %{product}/TODO.txt %{product}/version.txt
%{software_home}/Products/*

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

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

* Wed Jan 6 2006 Kevin Deldycke <kevin@nexedi.com> 0.5.2-3mdk
- Update spec file to follow Mandriva 2006 rules
- Update the patch

* Tue Apr 25 2005 Yoshinori Okuji <yo@nexedi.com> 0.5.2-2mdk
- Depend on python-itools instead of itools

* Sun Apr 24 2005 Yoshinori Okuji <yo@nexedi.com> 0.5.2-1mdk
- Initial package
openSUSE Build Service is sponsored by