diff --git a/product/ERP5/spec/CMFActivity.spec b/product/ERP5/spec/CMFActivity.spec
index 847f2c48eab9d28764a6f295a67cd4091891436e..cce0b985cfc48d474690e5bf446c5e29235e5f81 100755
--- a/product/ERP5/spec/CMFActivity.spec
+++ b/product/ERP5/spec/CMFActivity.spec
@@ -1,67 +1,63 @@
-Name:               CMFActivity
-Summary:            Activity Tool for zope
-Version:            0.9
-Release:            1mdk
-Group:              Development/Python
-Requires:           zope
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Sebastien Robin <seb@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product CMFActivity
+%define version 0.9.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   Activity Tool for Zope
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope zope-CMF
 
 #----------------------------------------------------------------------
 %description
-This tools allows to implement activities for zope objects. 
-
-http://www.erp5.org
+This tools add activities for Zope objects.
 
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
-
-#----------------------------------------------------------------------
 %build
 
-#----------------------------------------------------------------------
+
 %install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Activity
-install %{name}-%{version}/Activity/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Activity
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install %{name}-%{version}/Constraint/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install %{name}-%{version}/Document/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install %{name}-%{version}/Interface/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install %{name}-%{version}/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install %{name}-%{version}/help/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/activity
-install %{name}-%{version}/skins/activity/*.zsql $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/activity
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install %{name}-%{version}/tests/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__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(-,zope,zope,0755)
+%defattr(0644, root, root, 0755)
 %doc VERSION.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.9.20060110-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
 * Tue Sep 01 2004 Sebastien Robin <seb@nexedi.com> 0.8-1mdk
 - Final relase for Mandrake 10.1
 
diff --git a/product/ERP5/spec/CMFCategory.spec b/product/ERP5/spec/CMFCategory.spec
index 2673dfaebd7c35bd82e9a2a4b658c90f38c0e7d9..1cda72e8b5e0627be527b859025c87aef80b65c4 100755
--- a/product/ERP5/spec/CMFCategory.spec
+++ b/product/ERP5/spec/CMFCategory.spec
@@ -1,16 +1,21 @@
-Name:               CMFCategory
-Summary:            All algorithms related to categories and relations in CMF
-Version:            0.9
-Release:            1mdk
-Group:              Development/Python
-Requires:           zope
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Sebastien Robin <seb@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product CMFCategory
+%define version 0.9.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   All algorithms related to categories and relations in CMF
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope zope-CMF
 
 #----------------------------------------------------------------------
 %description
@@ -19,54 +24,45 @@ in an ERP5 portal. For example, a document may be assigned a color
 attribute (red, blue, green). Rather than assigning an attribute
 with a pop-up menu (which is still a possibility), we can prefer
 in certain cases to associate to the object a category. In this
-example, the category will be named color/red, color/blue or color/green
-
-
-http://www.erp5.org
+example, the category will be named color/red, color/blue or color/green.
 
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
-
-#----------------------------------------------------------------------
 %build
 
-#----------------------------------------------------------------------
+
 %install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install %{name}-%{version}/Constraint/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install %{name}-%{version}/Document/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install %{name}-%{version}/Interface/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/doc
-install %{name}-%{version}/doc/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/doc
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install %{name}-%{version}/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install %{name}-%{version}/tests/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/www
-install %{name}-%{version}/www/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/www
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__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(-,zope,zope,0755)
+%defattr(0644, root, root, 0755)
 %doc VERSION.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.9.20060110-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
 * Tue Sep 01 2004 Sebastien Robin <seb@nexedi.com> 0.8-1mdk
 - Final relase for Mandrake 10.1
 
diff --git a/product/ERP5/spec/ERP5.spec b/product/ERP5/spec/ERP5.spec
index 4f1cd2fe8d5682265481555bf83f237a807842b5..1668fb6dccfaec7df9bb6bf891359929134c65c5 100755
--- a/product/ERP5/spec/ERP5.spec
+++ b/product/ERP5/spec/ERP5.spec
@@ -1,16 +1,21 @@
-Name:               ERP5
-Summary:            A Zope framework to implement ERP software
-Version:            0.9
-Release:            1mdk
-Group:              Development/Python
-Requires:           zope, ExtFile, ZSQLCatalog, Photo, CMFPhoto, BTreeFolder2, Formulator, Localizer, CMFReportTool, CMFMailIn, ZMySQLDA, PyXML, python-reportlab, ERP5Catalog, ERP5Form, ERP5SyncML, CMFCategory, ERP5Type, python-imaging, TranslationService, python-numeric, python-psyco, python-glpk, CMFActivity
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Sebastien Robin <seb@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product ERP5
+%define version 0.9.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   A Zope framework to implement ERP software
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope-erp5, MySQL-Max >= 5, erp5-CMFPhoto, erp5-Formulator, zope-CMFReportTool, zope-Localizer, zope-Photo, zope-ZMySQLDA, zope-BTreeFolder2, zope-CMFMailIn, zope-ERP5Catalog, zope-ERP5Form, zope-ERP5SyncML, zope-CMFCategory, zope-ERP5Type, zope-TranslationService, python-numeric, python-psyco, python-glpk, zope-CMFActivity, zope-ERP5Security, zope-ERP5OOo
 
 #----------------------------------------------------------------------
 %description
@@ -19,120 +24,47 @@ It includes a Rapid Application Development system and a Universal
 Business Model which together allow to model any business process in
 very short time.
 
-http://www.erp5.org
-
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
+%build
+
+
+%install
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
+%clean
+%{__rm} -rf %{buildroot}
 
-#----------------------------------------------------------------------
 %post
 mkdir /var/lib/zope/Extensions
-mkdir /var/lib/zope/Document
 mkdir /var/lib/zope/PropertySheet
 mkdir /var/lib/zope/Constraint
-ln -s %{_libdir}/zope/lib/python/Products/%{name}/Extensions/InventoryBrain.py /var/lib/zope/Extensions/
+ln -s %{software_home}/Products/%{name}/Extensions/zsqlbrain.py /var/lib/zope/Extensions/
+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
 
-#----------------------------------------------------------------------
-%build
-
-#----------------------------------------------------------------------
-%install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.gif $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Capacity
-install %{name}-%{version}/Capacity/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Capacity
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install %{name}-%{version}/Constraint/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Core
-install %{name}-%{version}/Core/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Core
-install %{name}-%{version}/Core/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Core
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/DeliverySolver
-install %{name}-%{version}/DeliverySolver/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/DeliverySolver
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install %{name}-%{version}/Document/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Extensions
-install %{name}-%{version}/Extensions/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Extensions
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install %{name}-%{version}/Interface/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Simulation
-install %{name}-%{version}/Simulation/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Simulation
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/TargetSolver
-install %{name}-%{version}/TargetSolver/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/TargetSolver
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Tool
-install %{name}-%{version}/Tool/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Tool
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Tool/dtml
-install %{name}-%{version}/Tool/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Tool/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/bootstrap
-install %{name}-%{version}/bootstrap/*.xml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/bootstrap
-install %{name}-%{version}/bootstrap/*.bt5 $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/bootstrap
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install %{name}-%{version}/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/functest
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/functest/anonymous
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/functest/member
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install %{name}-%{version}/help/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/import
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/patch
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_test
-install %{name}-%{version}/skins/erp5_test/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_test
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_html_style
-install %{name}-%{version}/skins/erp5_html_style/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_html_style
-install %{name}-%{version}/skins/erp5_html_style/*.pt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_html_style
-install %{name}-%{version}/skins/erp5_html_style/*.jpg $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_html_style
-install %{name}-%{version}/skins/erp5_html_style/*.props $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_html_style
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_html_style/images
-install %{name}-%{version}/skins/erp5_html_style/images/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_html_style/images
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_trade
-install %{name}-%{version}/skins/erp5_trade/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_trade
-install %{name}-%{version}/skins/erp5_trade/*.pt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_trade
-install %{name}-%{version}/skins/erp5_trade/*.form $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_trade
-install %{name}-%{version}/skins/erp5_trade/*.zsql $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_trade
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_crm
-install %{name}-%{version}/skins/erp5_crm/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_crm
-install %{name}-%{version}/skins/erp5_crm/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_crm
-install %{name}-%{version}/skins/erp5_crm/*.pt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_crm
-install %{name}-%{version}/skins/erp5_crm/*.form $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_crm
-install %{name}-%{version}/skins/erp5_crm/*.zsql $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_crm
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_generator
-install %{name}-%{version}/skins/erp5_generator/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_generator
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_core
-install %{name}-%{version}/skins/erp5_core/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_core
-install %{name}-%{version}/skins/erp5_core/*.pt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_core
-install %{name}-%{version}/skins/erp5_core/*.form $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_core
-install %{name}-%{version}/skins/erp5_core/*.zsql $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_core
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_accounting
-install %{name}-%{version}/skins/erp5_accounting/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_accounting
-install %{name}-%{version}/skins/erp5_accounting/*.pt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_accounting
-install %{name}-%{version}/skins/erp5_accounting/*.form $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_accounting
-install %{name}-%{version}/skins/erp5_accounting/*.zsql $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/erp5_accounting
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/spec
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install %{name}-%{version}/tests/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/www
-install %{name}-%{version}/www/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/www
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-#----------------------------------------------------------------------
 %files
-%defattr(-,zope,zope,0755)
-%doc README.txt INSTALL.txt CREDITS.txt GPL.txt ZPL.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%defattr(0644, root, root, 0755)
+%doc VERSION.txt README.txt INSTALL.txt CREDITS.txt GPL.txt ZPL.txt
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.9.20060110-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
 * Tue Sep 01 2004 Sebastien Robin <seb@nexedi.com> 0.8-1mdk
 - New release for Mandrake 10.1
 
diff --git a/product/ERP5/spec/ERP5Catalog.spec b/product/ERP5/spec/ERP5Catalog.spec
index 5f9eaf33619306d58c7eea419e7b55c8e5830e60..6b6455121476fb29939e001a2bd024a49f62d694 100755
--- a/product/ERP5/spec/ERP5Catalog.spec
+++ b/product/ERP5/spec/ERP5Catalog.spec
@@ -1,72 +1,63 @@
-Name:               ERP5Catalog
-Summary:            Catalog that filter queries
-Version:            0.9
-Release:            1mdk
-Group:              Development/Python
-Requires:           zope ZSQLCatalog ERP5Type
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Sebastien Robin <seb@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product ERP5Catalog
+%define version 0.9.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   This Zope product for ERP5 is a catalog that filter queries
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  erp5-zope zope-ZSQLCatalog zope-ERP5Type
 
 #----------------------------------------------------------------------
 %description
-This is a Catalog that filters catalog queries.
-It is based on ZSQLCatalog
-
-http://www.erp5.org
+This is a Catalog that filters catalog queries. It is based on ZSQLCatalog.
 
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
-
-#----------------------------------------------------------------------
 %build
 
-#----------------------------------------------------------------------
+
 %install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install %{name}-%{version}/Constraint/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install %{name}-%{version}/Document/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install %{name}-%{version}/Interface/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install %{name}-%{version}/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install %{name}-%{version}/help/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/sql
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/sql/erp5_mysql
-install %{name}-%{version}/sql/erp5_mysql/*.zsql $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/sql/erp5_mysql
-install %{name}-%{version}/sql/erp5_mysql/*.xml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/sql/erp5_mysql
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/sql/common_mysql
-install %{name}-%{version}/sql/common_mysql/*.zsql $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/sql/common_mysql
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/sql/cps3_mysql
-install %{name}-%{version}/sql/cps3_mysql/*.zsql $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/sql/cps3_mysql
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install %{name}-%{version}/tests/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__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(-,zope,zope,0755)
+%defattr(0644, root, root, 0755)
 %doc VERSION.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.9.20060110-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
 * Tue Sep 01 2004 Sebastien Robin <seb@nexedi.com> 0.8-1mdk
 - Final relase for Mandrake 10.1
 
diff --git a/product/ERP5/spec/ERP5Form.spec b/product/ERP5/spec/ERP5Form.spec
index f907c9dde7268aaced878668028602b9809c277a..cc03bb1468390cc368d5bea382f0d20d06b70a0e 100755
--- a/product/ERP5/spec/ERP5Form.spec
+++ b/product/ERP5/spec/ERP5Form.spec
@@ -1,16 +1,21 @@
-Name:               ERP5Form
-Summary:            Form specific to ERP5
-Version:            0.9
-Release:            1mdk
-Group:              Development/Python
-Requires:           zope
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Sebastien Robin <seb@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product ERP5Form
+%define version 0.9.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   A Zope product that add easy to use form to ERP5
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope-erp5 erp5-Formulator
 
 #----------------------------------------------------------------------
 %description
@@ -20,48 +25,43 @@ and rendered automatically by page template. Context variables (here,
 form...) are provided to each field at rendering time. Together with
 ERP5Type, ERP5Form defines a fast rapid application environment.
 
-http://www.erp5.org
-
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
-
-#----------------------------------------------------------------------
 %build
 
-#----------------------------------------------------------------------
+
 %install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install %{name}-%{version}/Constraint/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install %{name}-%{version}/Document/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install %{name}-%{version}/Interface/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install %{name}-%{version}/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/www
-install %{name}-%{version}/www/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/www
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__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(-,zope,zope,0755)
-%doc TODO.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%defattr(0644, root, root, 0755)
+%doc TODO.txt VERSION.txt
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.9.20060110-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
 * Tue Sep 01 2004 Sebastien Robin <seb@nexedi.com> 0.8-1mdk
 - Final relase for Mandrake 10.1
 
diff --git a/product/ERP5/spec/ERP5OOo.spec b/product/ERP5/spec/ERP5OOo.spec
index 99239985773933dd3276834bd3b0324008826867..426b451bc639bd20f944da41e7bb8c0d6d79e6a7 100755
--- a/product/ERP5/spec/ERP5OOo.spec
+++ b/product/ERP5/spec/ERP5OOo.spec
@@ -1,52 +1,62 @@
-Name:               ERP5OOo
-Summary:            OpenOffice documents parser for ERP5
-Version:            0.1
-Release:            1nxd
-Group:              Development/Python
-Requires:           zope
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Kevin Deldycke <kevin@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product ERP5Form
+%define version 0.1.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   OpenOffice documents parser for ERP5
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope-erp5
 
 #----------------------------------------------------------------------
 %description
-General purpose tools to parse and handle OpenOffice v1.x documents in ERP5
+General purpose tools to parse and handle OpenOffice v1.x documents in ERP5.
 
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
-
-#----------------------------------------------------------------------
 %build
 
-#----------------------------------------------------------------------
+
 %install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install %{name}-%{version}/help/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install %{name}-%{version}/skins/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/scripts
-install %{name}-%{version}/scripts/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/scripts
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__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(-,zope,zope,0755)
+%defattr(0644, root, root, 0755)
 %doc VERSION.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
-* Sat Apr 30 2003 Kevin Deldycke <seb@nexedi.com> 0.1-1nxd
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.2-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
+* Sat Apr 30 2005 Kevin Deldycke <kevin@nexedi.com> 0.1-1nxd
 - Create the spec file
diff --git a/product/ERP5/spec/ERP5Security.spec b/product/ERP5/spec/ERP5Security.spec
new file mode 100755
index 0000000000000000000000000000000000000000..a65bd8951d364882677aef815eafa88e13c6dae3
--- /dev/null
+++ b/product/ERP5/spec/ERP5Security.spec
@@ -0,0 +1,59 @@
+%define product ERP5Security
+%define version 0.1.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   A collection of plugins for Pluggable Auth Service to manage ERP5 security
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope-erp5 zope-PluggableAuthService
+
+#----------------------------------------------------------------------
+%description
+This zope product is a plugin to Pluggable Auth Service, to manage roles,
+groups and users in ERP5. It also add fine security management features to
+ERP5.
+
+#----------------------------------------------------------------------
+%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, root, root, 0755)
+%{software_home}/Products/*
+
+#----------------------------------------------------------------------
+%changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.1.20060110-1mdk
+- Initial release
diff --git a/product/ERP5/spec/ERP5SyncML.spec b/product/ERP5/spec/ERP5SyncML.spec
index 09a1288425cd5c6bcb72cc83eb58e440e849be95..1954232e7193b37932ec925132141aad6869a9f5 100755
--- a/product/ERP5/spec/ERP5SyncML.spec
+++ b/product/ERP5/spec/ERP5SyncML.spec
@@ -1,68 +1,65 @@
-Name:               ERP5SyncML
-Summary:            SyncML for ERP5
-Version:            0.9
-Release:            1mdk
-Group:              Development/Python
-Requires:           zope, ERP5Type, erp5diff
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Sebastien Robin <seb@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product ERP5SyncML
+%define version 0.9.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   SyncML for ERP5
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope-erp5
 
 #----------------------------------------------------------------------
 %description
-To be written
-
-http://www.erp5.org
+ERP5Type contains most importants objects for ERP5. ERP5Type defines
+most of methods that will be used by every object. It also implements
+the Rapid Application Developpement feature used in ERP5.
 
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
-
-#----------------------------------------------------------------------
 %build
 
-#----------------------------------------------------------------------
+
 %install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Conduit
-install %{name}-%{version}/Conduit/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Conduit
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install %{name}-%{version}/Constraint/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install %{name}-%{version}/Document/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install %{name}-%{version}/Interface/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install %{name}-%{version}/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install %{name}-%{version}/help/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install %{name}-%{version}/skins/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/redd
-install %{name}-%{version}/skins/redd/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins/redd
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install %{name}-%{version}/tests/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__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(-,zope,zope,0755)
+%defattr(0644, root, root, 0755)
 %doc VERSION.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.9.20060110-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
 * Tue Sep 01 2004 Sebastien Robin <seb@nexedi.com> 0.8-1mdk
 - Final relase for Mandrake 10.1
 
@@ -76,4 +73,4 @@ rm -rf $RPM_BUILD_ROOT
 - Update spec in order to follows Mandrake Rules
 
 * Mon May 12 2003 Sebastien Robin <seb@nexedi.com> 0.1-1nxd
-- Create the spec file
+- Create the spec file
\ No newline at end of file
diff --git a/product/ERP5/spec/ERP5Type.spec b/product/ERP5/spec/ERP5Type.spec
index 394f2a2ab55393248f2a1a4f4117826ff65e837e..309504dfa96776fabef224fcb6f706a124f46cb8 100755
--- a/product/ERP5/spec/ERP5Type.spec
+++ b/product/ERP5/spec/ERP5Type.spec
@@ -1,16 +1,21 @@
-Name:               ERP5Type
-Summary:            Base objects for ERP5
-Version:            0.9
-Release:            1mdk
-Group:              Development/Python
-Requires:           zope
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Sebastien Robin <seb@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product ERP5Type
+%define version 0.9.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   Base objects for ERP5
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope-erp5
 
 #----------------------------------------------------------------------
 %description
@@ -18,56 +23,44 @@ ERP5Type contains most importants objects for ERP5. ERP5Type defines
 most of methods that will be used by every object. It also implements
 the Rapid Application Developpement feature used in ERP5.
 
-http://www.erp5.org
-
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
-
-#----------------------------------------------------------------------
 %build
 
-#----------------------------------------------------------------------
-%post
-mkdir /var/lib/zope/Document
 
-#----------------------------------------------------------------------
 %install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.png $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Accessor
-install %{name}-%{version}/Accessor/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Accessor
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install %{name}-%{version}/Constraint/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Constraint
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install %{name}-%{version}/Document/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Document
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install %{name}-%{version}/Interface/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Interface
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install %{name}-%{version}/PropertySheet/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/PropertySheet
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Tool
-install %{name}-%{version}/Tool/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/Tool
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install %{name}-%{version}/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install %{name}-%{version}/help/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/skins
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install %{name}-%{version}/tests/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
+
+%post
+mkdir /var/lib/zope/Document
+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(-,zope,zope,0755)
+%defattr(0644, root, root, 0755)
 %doc VERSION.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.9.20060110-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
 * Tue Sep 01 2004 Sebastien Robin <seb@nexedi.com> 0.8-1mdk
 - Final relase for Mandrake 10.1
 
diff --git a/product/ERP5/spec/ZSQLCatalog.spec b/product/ERP5/spec/ZSQLCatalog.spec
index c9849189c8f5ab88c2ca3121845c9b2db425f789..6fedf3c06b5eb303c7c6e89cda4418d439960a66 100755
--- a/product/ERP5/spec/ZSQLCatalog.spec
+++ b/product/ERP5/spec/ZSQLCatalog.spec
@@ -1,16 +1,21 @@
-Name:               ZSQLCatalog
-Summary:            A Zope product to search the Zope database with SQL requests
-Version:            0.9
-Release:            1mdk
-Group:              Development/Python
-Requires:           zope
-License:            GPL
-URL:                http://www.erp5.org
-Packager:           Sebastien Robin <seb@nexedi.com>
-BuildRoot:          %{_tmppath}/%{name}-%{version}-rootdir
-Buildarch:          noarch
-
-Source: %{name}-%{version}.tar.bz2
+%define product ZSQLCatalog
+%define version 0.9.20060110
+%define release 1
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   A Zope product to search the Zope database with SQL requests
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+URL:       http://www.erp5.org
+Source0:   %{product}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope-erp5
 
 #----------------------------------------------------------------------
 %description
@@ -18,48 +23,45 @@ ZSQLCatalog is a Zope product which allows to search the Zope database
 with SQL requests. It replaces the standard Zope Catalog with a meta-catalog
 which can be connected to any SQL relationnal database through ZSQLMethods.
 
-http://www.erp5.org
-
 #----------------------------------------------------------------------
 %prep
+%setup -c
 
-rm -rf $RPM_BUILD_ROOT
-%setup -a 0
+%build
 
-#----------------------------------------------------------------------
-%post
-mkdir /var/lib/zope/Extensions
-ln -s %{_libdir}/zope/lib/python/Products/%{name}/zsqlbrain.py /var/lib/zope/Extensions/
 
+%install
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
 
-#----------------------------------------------------------------------
-%build
 
-#----------------------------------------------------------------------
-%install
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install %{name}-%{version}/*.txt $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install %{name}-%{version}/dtml/*.dtml $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/dtml
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install %{name}-%{version}/help/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install %{name}-%{version}/help/*.stx $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/help
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/spec
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install %{name}-%{version}/tests/*.py $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/tests
-install -d $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/www
-install %{name}-%{version}/www/*.gif $RPM_BUILD_ROOT%{_libdir}/zope/lib/python/Products/%{name}/www
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
+
+%post
+mkdir /var/lib/zope/Extensions
+ln -s %{software_home}/Products/%{name}/zsqlbrain.py /var/lib/zope/Extensions/
+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(-,zope,zope,0755)
+%defattr(0644, root, root, 0755)
 %doc README.txt INSTALL.txt CREDITS.txt GPL.txt ZPL.txt
-%{_libdir}/zope/lib/python/Products/%{name}/
+%{software_home}/Products/*
+
 #----------------------------------------------------------------------
 %changelog
+* Tue Jan 10 2006 Kevin Deldycke <kevin@nexedi.com> 0.9.20060110-1mdk
+- New release for Mandriva 2006
+- Spec file updated
+
 * Tue Sep 01 2004 Sebastien Robin <seb@nexedi.com> 0.8-1mdk
 - Final relase for Mandrake 10.1
 
@@ -77,7 +79,7 @@ rm -rf $RPM_BUILD_ROOT
   of a problem with the script which create the rpm
 
 * Thu Sep 04 2003 Sebatien Robin <seb@nexedi.com> 0.2.1-5mdk
-- change in the spec file '/usr/lib' by %{_libdir}
+- change in the spec file '/usr/lib' by %%{_libdir}
 
 * Thu Sep 04 2003 Sébastien Robin <seb@nexedi.com> 0.2.1-4mdk
 - Update spec in order to follows Mandrake Rules