%define version ${:version} %define name ${:name} %define release ${:release} # XXX: instancehome might be controlled by caller or buildout %define instancehome /var/lib/erp5 # We do not actually use /usr/local/bin/python %define _requires_exceptions ${:requires_exceptions} %define fullname %{name}-%{version} %define installdir /opt/erp5/%{version} %define __find_provides ${:find_provides} Name: %{name} Version: %{version} Release: %mkrel %{release} Summary: Open Source ERP Solution URL: http://www.erp5.org License: GPL Vendor: Nexedi Packager: Nicolas Dumazet Group: Databases Provides: erp5 ${:dependencies} BuildRoot: /opt/rpmbuild/%{fullname}-%{release}-root %description %{summary} %build cd %{installdir} python -S bootstrap/bootstrap.py bin/buildout -vv # cleanup .svn and .pyc files find %{installdir} -depth -name .svn -exec rm -rf {} \; find %{installdir} -name '*.pyc' -delete # remove the content of downloads folder # and remove all the folders used to build any software. %{__rm} -rf downloads/* parts/*__unpack__ %install %{__rm} -rf %{buildroot} %{__mkdir_p} %{buildroot} %{__cp} -ar --parents %{installdir} %{buildroot} %files %defattr(-, root, root, 0755) %{installdir} %clean %{__rm} -rf %{buildroot} %{installdir}