From ec9777321425d7c7c750020e0b7e3dd6c1a8fef5 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Mon, 22 Feb 2010 12:36:43 +0000
Subject: [PATCH] Initial checkout of a simple, buildout-base system to
 generate RPMs/DEBs from official buildout.

It is not included in software buildout because self-containment is bad: RPM
generation uses software/appliance buildout to create RPM...


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32954 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../createmandrivaspec/createmandrivaspec.py  | 35 -------------
 buildout/recipes/createmandrivaspec/setup.py  | 27 ----------
 ...rp5-official-buildout-mandriva2010.spec.in | 52 -------------------
 3 files changed, 114 deletions(-)
 delete mode 100644 buildout/recipes/createmandrivaspec/createmandrivaspec.py
 delete mode 100644 buildout/recipes/createmandrivaspec/setup.py
 delete mode 100644 buildout/templates/erp5-official-buildout-mandriva2010.spec.in

diff --git a/buildout/recipes/createmandrivaspec/createmandrivaspec.py b/buildout/recipes/createmandrivaspec/createmandrivaspec.py
deleted file mode 100644
index dbd65dce8d..0000000000
--- a/buildout/recipes/createmandrivaspec/createmandrivaspec.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import os
-import collective.recipe.template
-
-class Recipe(collective.recipe.template.Recipe):
-  def __init__(self, buildout, name, options):
-    """
-      Create a Mandriva RPM spec file from a template
-
-      - input: path to spec template
-      - output: path where generated spec should be saved
-      - version: rpm version number, can be either the version
-          or a file path containing the version
-      - (section) name: rpm name
-      - build_requires: a list of Mandriva packages required to build the rpm
-      - svnpath: SVN path to current buildout
-
-      optional:
-        - release: rpm release number. Defaults to 1
-    """
-    package_list = options['package_list'].splitlines()
-    package_list = map(lambda x: x.strip(), package_list)
-    dependencies = ["BuildRequires: %s" % pkg for pkg in package_list if pkg]
-
-    version = options['version'].strip()
-    if os.path.exists(version):
-      version = open(version, 'r').read().strip()
-
-    release = options.get('release', str(1))
-
-    options.update(dependencies="\n".join(dependencies),
-                   version=version,
-                   release=release)
-
-    collective.recipe.template.Recipe.__init__(self, buildout, name, options)
-
diff --git a/buildout/recipes/createmandrivaspec/setup.py b/buildout/recipes/createmandrivaspec/setup.py
deleted file mode 100644
index 81208b60e2..0000000000
--- a/buildout/recipes/createmandrivaspec/setup.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from setuptools import setup, find_packages
-
-name = "createmandrivaspec"
-version = '0.1'
-
-setup(
-    name = name,
-    version = version,
-    author = "Nicolas Dumazet",
-    author_email = "nicolas.dumazet@nexedi.com",
-    description = "ZC Buildout recipe to generate a Mandriva spec file",
-    license = "ZPL 2.1",
-    keywords = "mandriva buildout",
-    packages = find_packages(),
-    scripts = [name+".py",],
-    include_package_data = True,
-    classifiers=[
-      "License :: OSI Approved :: Zope Public License",
-      "Framework :: Buildout",
-      "Operating System :: POSIX :: Linux",
-      ],
-    install_requires = [
-      'collective.recipe.template',
-      ],
-    zip_safe=False,
-    entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
-    )
diff --git a/buildout/templates/erp5-official-buildout-mandriva2010.spec.in b/buildout/templates/erp5-official-buildout-mandriva2010.spec.in
deleted file mode 100644
index 1d3cfd5860..0000000000
--- a/buildout/templates/erp5-official-buildout-mandriva2010.spec.in
+++ /dev/null
@@ -1,52 +0,0 @@
-
-%define version ${:version}
-%define name ${:name}
-%define release ${:release}
-
-# We do not actually use /usr/local/bin/python
-%define _requires_exceptions /usr/local/bin/python
-
-%define fullname %{name}-%{version}
-%define installdir /opt/erp5/%{version}
-
-Name: %{name}
-Version: %{version}
-Release: %mkrel %{release}
-Summary: Open Source ERP Solution
-URL: http://www.erp5.org
-License: GPL
-Vendor: Nexedi
-Packager: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
-Group: Databases
-
-${:dependencies}
-
-BuildRoot: /opt/rpmbuild/%{fullname}-%{release}-root
-
-%description
-%{summary}
-
-%prep
-%{__rm} -rf %{installdir}
-%{__mkdir_p} %{installdir}
-
-%build
-cd %{installdir}
-svn co ${:svnpath} .
-python bootstrap/bootstrap.py
-bin/buildout
-
-%install
-%{__rm} -rf %{buildroot}
-%{__mkdir_p} %{buildroot}
-%{__cp} -ar --parents %{installdir} %{buildroot}
-# cleanup .svn files
-find %{buildroot} -name .svn -print0 | xargs -0 %{__rm} -rf
-
-%files
-%defattr(-, root, root, 0755)
-%{installdir}
-
-%clean
-%{__rm} -rf %{buildroot} %{installdir}
-
-- 
2.30.9