Commit 7097d407 authored by Julien Cristau's avatar Julien Cristau
Browse files

[packaging] add spec file

parent d6266544b25c
%if 0%{?el5}
%define python python26
%define __python /usr/bin/python2.6
%{!?python_scriptarch: %define python_scriptarch %(%{__python} -c "from distutils.sysconfig import get_python_lib; from os.path import join; print join(get_python_lib(1, 1), 'scripts')")}
%define python python
%define __python /usr/bin/python
%define project_name logilab-mtconverter
%define project_version 0.8.4
%define project_release logilab
Name: %{python}-%{project_name}
Version: 0.8.4
Release: %{project_release}%{?dist}
Summary: a library to convert from a MIME type to another
License: LGPLv2+
Group: Development/Languages/Python
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Logilab <>
Packager: Pierre GM <>
Requires: %{python}, %{python}-logilab-common >= 0.55.2
BuildRequires: %{python}
This package originally a backport of Zope's PortalTransforms tool with
all Zope's internal removed (i.e. most of the code).
%setup -n %{project_name}-%{version}
%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;'
NO_SETUPTOOLS=1 %{__python} --quiet install --no-compile --prefix=%{_prefix} --root="$RPM_BUILD_ROOT" %{?python_scriptarch: --install-scripts=%{python_scriptarch}}
find ${RPM_BUILD_ROOT} -regex '.*/logilab/__init__\.py.?$' -delete
%defattr(-, root, root)
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