- Spec file cleanup:

* Simplified macro usage
  * Removed outdated %clean section
  * Set SPDX-style license
  * No CFLAGS for noarch package

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyenchant?expand=0&rev=2
This commit is contained in:
Sascha Peilicke 2012-02-20 13:35:59 +00:00 committed by Git OBS Bridge
parent 552c31b433
commit 4223490696
2 changed files with 20 additions and 26 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Feb 20 13:35:38 UTC 2012 - saschpe@suse.de
- Spec file cleanup:
* Simplified macro usage
* Removed outdated %clean section
* Set SPDX-style license
* No CFLAGS for noarch package
-------------------------------------------------------------------
Fri Apr 15 13:20:39 UTC 2011 - saschpe@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pyenchant
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,59 +15,44 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define mod_name pyenchant
Name: python-%{mod_name}
Name: python-pyenchant
Version: 1.6.5
Release: 0
Url: http://www.rfk.id.au/software/pyenchant/
Summary: Python bindings for the Enchant spellchecking system
License: LGPLv2.1
License: LGPL-2.1
Group: Development/Languages/Python
Source: %{mod_name}-%{version}.tar.gz
Source: pyenchant-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: enchant
BuildRequires: python-devel
BuildRequires: python-distribute
Requires: enchant
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1010
BuildRequires: fdupes
%endif
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
Obsoletes: python-enchant < %{version}
Provides: python-enchant = %{version}
Provides: PyEnchant
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
PyEnchant is a spellchecking library for Python, based on the excellent Enchant library.
%prep
%setup -q -n %{mod_name}-%{version}
%setup -q -n pyenchant-%{version}
%build
python setup.py build
%install
export CFLAGS="%{optflags}"
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%if 0%{?suse_version} > 1010
%fdupes %{buildroot}
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt TODO.txt
%python_sitelib/*
%{python_sitelib}/*
%changelog