-%include /usr/lib/rpm/macros.python
-
%define zope_subname CMFQuickInstallerTool
-
-Summary: CMFQuickInstallerTool is a Zope product independent from the former CMFQuickInstaller
-Summary(pl): CMFQuickInstallerToolL jest dodatkiem do Zope niezale¿nym od formy CMFQuickInstaller
+Summary: A Zope product independent from the former CMFQuickInstaller
+Summary(pl): Dodatek do Zope niezale¿ny od poprzedniego CMFQuickInstallera
Name: Zope-%{zope_subname}
-Version: 1.0
-Release: 1
-License: GNU
+Version: 1.5.1
+Release: 2
+License: GPL
Group: Development/Tools
-Source0: http://switch.dl.sourceforge.net/sourceforge/collective/%{zope_subname}_%{version}.tgz
-# Source0-md5: dfcb8b48682a8164b0b955235113ec7b
-URL: http://cvs.bluedynamics.org/viewcvs/CMFQuickInstallerTool/
+Source0: http://dl.sourceforge.net/collective/%{zope_subname}-%{version}.tgz
+# Source0-md5: c31d26cbfb515fb90169aafe17f0bdfa
+URL: http://sourceforge.net/projects/collective/
+BuildRequires: python
%pyrequires_eq python-modules
+Requires: Zope-CMF
Requires: Zope
-Requires: CMF
+Requires(post,postun): /usr/sbin/installzopeproduct
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Conflicts: CMF
%define product_dir /usr/lib/zope/Products
tracking of what a product creates during install.
%description -l pl
-CMFQuickInstallerToolL jest dodatkiem do Zope niezale¿nym od formy
-CMFQuickInstaller. Dodatek w stosunku do CMFQuickInstaller umo¿liwa
-¶ledzenie zmian produktów podczas tworzenia instalacji.
+CMFQuickInstallerTool jest dodatkiem do Zope niezale¿nym od
+poprzedniego CMFQuickInstallera. G³ówna ró¿nica w stosunku do
+CMFQuickInstallera to mo¿liwo¶æ ¶ledzenia, co tworzy dany produkt w
+czasie instalacji.
%prep
-%setup -q -c %{zope_subname}-%{version}
-
-%build
-cd %{zope_subname}
-mkdir docs
-mv -f AUTHORS README.txt docs/
-rm -rf .cvsignore
+%setup -q -n %{zope_subname}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{product_dir}
-cp -af * $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}
+install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
+
+cp -af {forms,interfaces,*.py,*.gif,version.txt,refresh.txt} $RPM_BUILD_ROOT%{_datadir}/%{name}
-%py_comp $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}
-%py_ocomp $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}
+%py_comp $RPM_BUILD_ROOT%{_datadir}/%{name}
+%py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}
-find $RPM_BUILD_ROOT -type f -name "*.py" -exec rm -rf {} \;;
-rm -rf $RPM_BUILD_ROOT%{product_dir}/%{zope_subname}/docs
+# find $RPM_BUILD_ROOT -type f -name "*.py" -exec rm -rf {} \;;
%clean
rm -rf $RPM_BUILD_ROOT
%post
+/usr/sbin/installzopeproduct %{_datadir}/%{name} %{zope_subname}
if [ -f /var/lock/subsys/zope ]; then
/etc/rc.d/init.d/zope restart >&2
fi
-%preun
-
%postun
-if [ -f /var/lock/subsys/zope ]; then
- /etc/rc.d/init.d/zope restart >&2
+if [ "$1" = "0" ]; then
+ /usr/sbin/installzopeproduct -d %{zope_subname}
+ if [ -f /var/lock/subsys/zope ]; then
+ /etc/rc.d/init.d/zope restart >&2
+ fi
fi
%files
%defattr(644,root,root,755)
-%doc %{zope_subname}/docs/*
-%{product_dir}/%{zope_subname}
+%doc AUTHORS README.txt ChangeLog DEPENDS
+%{_datadir}/%{name}