%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: pyhunspell
Version: 0.1
Release: 2%{?dist}
Summary: Python bindings for hunspell
Group: Development/Languages
License: LGPLv3+
URL: http://code.google.com/p/pyhunspell/
Source0: http://pyhunspell.googlecode.com/files/hunspell-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel hunspell-devel
%description
These are python bindings for hunspell, that allow to use the hunspell library
in python.
%prep
%setup -q -n hunspell-%{version}
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
%{python_sitearch}/hunspell.so
%{python_sitearch}/hunspell-*.egg-info
%changelog
* Tue Aug 25 2009 Till Maas <opensource@till.name> - 0.1-2
- Remove CFLAGS, whiche are used automagically
- Change the %%description to a full sentence
- Adjust the license tag, it's actually LGPLv3+
* Wed Jul 29 2009 Till Maas <opensource@till.name> - 0.1-1
- Initial spec for Fedora