Commit 2c0e7af4 authored by Florent Cayre's avatar Florent Cayre

default is stable (only centos packaging related changes)

--HG--
branch : stable
# for el5, force use of python2.6
%if 0%{?el5}
%define python python26
%define __python /usr/bin/python2.6
%else
%define python python
%define __python /usr/bin/python
%endif
%{!?_python_sitelib: %define _python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define project_name logilab-mtconverter
%define project_version 0.8.4
Name: %{python}-%{project_name}
Version: %{project_version}
Release: logilab.1%{?dist}
Summary: a library to convert from a MIME type to another
Group: Development/Languages/Python
License: LGPLv2+
Vendor: Logilab <contact@logilab.fr>
URL: http://www.logilab.org/project/%{project_name}
Source0: http://download.logilab.org/pub/mtconverter/%{project_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: %{python}
Requires: %{python}, %{python}-logilab-common >= 0.55.2
%description
This package originally a backport of Zope's PortalTransforms tool with
all Zope's internal removed (i.e. most of the code).
%prep
%setup -n %{project_name}-%{version}
%build
%{__python} setup.py build
%if 0%{?el5}
# change the python version in shebangs
find . -name '*.py' -type f -print0 | xargs -0 sed -i '1,3s;^#!.*python.*$;#! /usr/bin/python2.6;'
%endif
%install
rm -rf $RPM_BUILD_ROOT
NO_SETUPTOOLS=1 %{__python} setup.py install -O1 --skip-build --root="$RPM_BUILD_ROOT"
rm -rf $RPM_BUILD_ROOT%{_python_sitelib}/logilab/__init__.py*
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc README ChangeLog COPYING.LESSER
%{_python_sitelib}/logilab*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment