File zope-ZMailIn.spec of Package zope-ZMailIn

%define product   ZMailIn
%define version   1.0.1
%define release   5

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

Summary:   A Zope product to import emails into Zope sites
Name:      zope-%{product}
Version:   %{version}
Release:   %{release}
License:   GPL
Group:     System/Servers
Source0:   %{product}-%{version}.tar.bz2
URL:       http://www.zope.org/Members/NIP/ZMailIn
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
BuildArch: noarch
Requires:  zope zope-CMF zope-ZMailIn

#----------------------------------------------------------------------
%description
ZMailIn is a Zope product to import emails into Zope sites.

#----------------------------------------------------------------------
%prep
%setup -c

%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}/CREDITS.txt %{product}/INSTALL.txt %{product}/LICENSE.txt %{product}/VERSION.txt %{product}/CHANGES.txt
%{software_home}/Products/*

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

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

* Wed Jan 18 2006 Kevin Deldycke <kevin@nexedi.com> 1.0.1-3mdk
- New release for Mandriva 2006
- Spec file updated

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

* Wed Mar 05 2003 Jean-Paul Smets <jp@nexedi.com> 1.0.1-1nxd
- Initial release
openSUSE Build Service is sponsored by