[Erp5-report] r41000 lucas - in /erp5/trunk/utils/rpmgen: ./ profiles/ templates/

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Dec 1 21:20:30 CET 2010


Author: lucas
Date: Wed Dec  1 21:20:30 2010
New Revision: 41000

URL: http://svn.erp5.org?rev=41000&view=rev
Log:
Added draft support to build RPM package for CentOS 5.5

Added:
    erp5/trunk/utils/rpmgen/profiles/centos5.5.cfg
    erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-centos5.5.spec.in
Modified:
    erp5/trunk/utils/rpmgen/Makefile

Modified: erp5/trunk/utils/rpmgen/Makefile
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/Makefile?rev=41000&r1=40999&r2=41000&view=diff
==============================================================================
--- erp5/trunk/utils/rpmgen/Makefile [utf8] (original)
+++ erp5/trunk/utils/rpmgen/Makefile [utf8] Wed Dec  1 21:20:30 2010
@@ -21,6 +21,9 @@ opensuse-dependencies:
 fedora-dependencies:
 	sudo yum install -y auto-buildrequires
 
+centos-dependencies:
+	sudo yum install -y rpm-build
+
 mandriva: clean mandriva-dependencies run_buildout install
 	sudo rpmbuild -bb specs/erp5-official-buildout-mandriva2010.spec
 	if test -d ~/rpmbuild/RPMS/x86_64; \
@@ -38,3 +41,6 @@ fedora: clean fedora-dependencies run_bu
 	sudo rpmbuild -bb specs/erp5-official-buildout-fedora.spec
 	find ~/rpmbuild/RPMS -name erp5-$(VERSION)*.rpm -print0 | xargs -0 sudo yum install -y --nogpgcheck
 	sudo rpmbuild -bb specs/tiolive-application-buildout-fedora.spec
+
+centos: clean centos-dependencies run_buildout install
+	sudo rpmbuild -bb specs/erp5-official-buildout-centos5.5.spec

Added: erp5/trunk/utils/rpmgen/profiles/centos5.5.cfg
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/profiles/centos5.5.cfg?rev=41000&view=auto
==============================================================================
--- erp5/trunk/utils/rpmgen/profiles/centos5.5.cfg (added)
+++ erp5/trunk/utils/rpmgen/profiles/centos5.5.cfg [utf8] Wed Dec  1 21:20:30 2010
@@ -0,0 +1,24 @@
+# This profile is used to build only ERP5 Appliance software using Zope 2.12
+[buildout]
+parts =
+  checkout
+  create-software-centos-spec
+
+develop =
+  recipes/createmandrivaspec
+
+[checkout]
+recipe = infrae.subversion
+urls =
+  https://svn.erp5.org/repos/public/erp5/trunk/buildout .
+
+[create-software-centos-spec]
+recipe = createmandrivaspec
+name = erp5-official-buildout
+input = templates/${:base}.in
+output = specs/${:base}
+base = erp5-official-buildout-centos5.5.spec
+
+version = trunk
+release = 001
+requires_x86_64 =

Added: erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-centos5.5.spec.in
URL: http://svn.erp5.org/erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-centos5.5.spec.in?rev=41000&view=auto
==============================================================================
--- erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-centos5.5.spec.in (added)
+++ erp5/trunk/utils/rpmgen/templates/erp5-official-buildout-centos5.5.spec.in [utf8] Wed Dec  1 21:20:30 2010
@@ -0,0 +1,52 @@
+%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 <lucas at nexedi.com>
+Group: Databases
+
+AutoReqProv:1
+
+Provides: erp5
+${:requires}
+
+${:dependencies}
+
+BuildRoot: /opt/rpmbuild/%{fullname}-%{release}-root
+
+%description
+%{summary}
+
+%build
+cd %{installdir}
+curl -s http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py | python -S - -c buildout-2.12.cfg
+bin/buildout -v -c buildout-2.12.cfg
+
+# 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}



More information about the Erp5-report mailing list