%define version ${:version} %define name ${:name} %define release ${:release} # XXX: instancehome might be controlled by caller or buildout %define instancehome /var/lib/erp5 %define fullname %{name}-%{version} %define installdir /opt/erp5/%{version} Name: %{name} Version: %{version} Release: %{release} Summary: Open Source ERP Solution URL: http://www.erp5.org License: GPL Vendor: Nexedi Packager: Lucas Carvalho Group: Databases AutoReqProv:0 Provides: erp5 ${:requires} ${: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}