zbyszek / rpms / pyhunspell

Forked from rpms/pyhunspell 6 years ago
Clone
92eef98
%if 0%{?fedora}
92eef98
%global with_python3 1
92eef98
%else
92eef98
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
92eef98
%endif
92eef98
8db4816
Name:           pyhunspell
5bb1dab
Version:        0.5.0
101174d
Release:        4%{?dist}
8db4816
Summary:        Python bindings for hunspell
8db4816
8db4816
Group:          Development/Languages
8db4816
License:        LGPLv3+
92eef98
URL:            https://github.com/blatinier/pyhunspell
92eef98
Source0:        https://github.com/blatinier/pyhunspell/archive/pyhunspell-%{version}.tar.gz
8db4816
b397ebd
BuildRequires:  python2-devel hunspell-devel
92eef98
%if 0%{?with_python3}
92eef98
BuildRequires:  python3-devel
92eef98
%endif # if with_python3
92eef98
429f03e
# make it build with hunspell-1.5:
101174d
Patch0: pyhunspell-0.5.0-hunspell15.patch
101174d
Patch1: 0001-add-information-on-readme-about-apple-fun.patch
101174d
Patch2: 0002-try-some-MacOS-fix.patch
101174d
Patch3: 0003-add-some-more-explanation-in-the-README.patch
101174d
Patch4: 0004-pop-version.patch
101174d
Patch5: 0005-ignore-dist.patch
101174d
Patch6: 0006-split-linux-macos-params.patch
101174d
Patch7: 0007-pop-version.patch
101174d
Patch8: 0008-Fix-sor-warning-and-make-the-package-wheel-compatibl.patch
101174d
Patch9: 0009-pop-version.patch
101174d
Patch10: 0010-Delete-the-object-on-dealloc.patch
101174d
Patch11: 0011-Update-AUTHOR-CHANGELOG.patch
101174d
Patch12: 0012-fix-encoding-problem-32.patch
910cdbd
c62a9f0
%global _description\
c62a9f0
These are python bindings for hunspell, that allow to use the hunspell library\
8db4816
in python.
8db4816
c62a9f0
%description %_description
c62a9f0
c62a9f0
%package -n python2-pyhunspell
c62a9f0
Summary: %summary
c62a9f0
%{?python_provide:%python_provide python2-pyhunspell}
c62a9f0
# Remove before F30
eabe803
Provides: pyhunspell = %{version}-%{release}
c62a9f0
Provides: pyhunspell%{?_isa} = %{version}-%{release}
c62a9f0
Obsoletes: pyhunspell < %{version}-%{release}
c62a9f0
c62a9f0
%description -n python2-pyhunspell %_description
c62a9f0
92eef98
%if 0%{?with_python3}
92eef98
%package python3
92eef98
Summary:        Python3 bindings for hunspell allowing to use the hunspell library in Python3
92eef98
Group:          Development/Languages
92eef98
License:        LGPLv3+
92eef98
Requires:       %{name} = %{version}-%{release}
101174d
# Remove before F30
101174d
Provides: pyhunspell = %{version}-%{release}
101174d
Provides: pyhunspell%{?_isa} = %{version}-%{release}
101174d
Obsoletes: pyhunspell < %{version}-%{release}
92eef98
92eef98
%description python3
92eef98
This package contains a Python3 module to use the hunspell library
92eef98
from Python3.
92eef98
92eef98
%endif # with_python3
8db4816
8db4816
%prep
92eef98
%setup -q -n pyhunspell-%{version}
101174d
%patch1 -p1
101174d
%patch2 -p1
101174d
%patch3 -p1
101174d
%patch4 -p1
101174d
%patch5 -p1
101174d
%patch6 -p1
101174d
%patch7 -p1
101174d
%patch8 -p1
101174d
%patch9 -p1
101174d
%patch10 -p1
101174d
%patch11 -p1
101174d
%patch12 -p1
910cdbd
%patch0 -p1 -b .hunspell13
92eef98
92eef98
%if 0%{?with_python3}
92eef98
rm -rf %{py3dir}
92eef98
cp -a . %{py3dir}
92eef98
%endif # with_python3
8db4816
8db4816
%build
8db4816
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
8db4816
92eef98
%if 0%{?with_python3}
92eef98
pushd %{py3dir}
92eef98
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
92eef98
popd
92eef98
%endif # with_python3
92eef98
8db4816
8db4816
%install
8db4816
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
8db4816
92eef98
%if 0%{?with_python3}
92eef98
pushd %{py3dir}
92eef98
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
92eef98
popd
92eef98
%endif # with_python3
8db4816
c62a9f0
%files -n python2-pyhunspell
d13f446
%doc AUTHORS.md CHANGELOG.md COPYING COPYING.LESSER gpl-3.0.txt lgpl-3.0.txt PKG-INFO README.md
8db4816
%{python_sitearch}/hunspell.so
8db4816
%{python_sitearch}/hunspell-*.egg-info
8db4816
92eef98
%if 0%{?with_python3}
92eef98
%files python3
101174d
%doc AUTHORS.md CHANGELOG.md COPYING COPYING.LESSER gpl-3.0.txt lgpl-3.0.txt PKG-INFO README.md
92eef98
%{python3_sitearch}/*
92eef98
%endif # with_python3
8db4816
8db4816
%changelog
101174d
* Tue Mar 06 2018 Mike FABIAN <mfabian@redhat.com> - 0.5.0-4
101174d
- Apply fix for encoding problem from upstream.
101174d
  (See: https://github.com/blatinier/pyhunspell/issues/32)
101174d
- Provide “pyhunspell” also from the pyhunspell-python3 package, otherwise
101174d
  one cannot install pyhunspell-python3 because there is no “pyhunspell” package
101174d
  anymore.
101174d
82f1bb1
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
82f1bb1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
82f1bb1
4ac09a5
* Mon Dec 04 2017 Caolán McNamara <caolanm@redhat.com> - 0.5.0-2
4ac09a5
- rebuild for hunspell 1.6.2
4ac09a5
5bb1dab
* Fri Sep 01 2017 Mike FABIAN <mfabian@redhat.com> - 0.5.0-1
5bb1dab
- update to 0.5.0
5bb1dab
eabe803
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4.1-10
eabe803
- Add Provides for the old name without %%_isa
eabe803
c62a9f0
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4.1-9
c62a9f0
- Python 2 binary package renamed to python2-pyhunspell
c62a9f0
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
c62a9f0
8975c73
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-8
8975c73
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
8975c73
01695aa
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-7
01695aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
01695aa
e1b2caa
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-6
e1b2caa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e1b2caa
e51935e
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.4.1-5
e51935e
- Rebuild for Python 3.6
e51935e
8fccde2
* Tue Dec 13 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.4.1-4
8fccde2
- Rebuild for hunspell 1.5.x
8fccde2
08e7ac8
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
08e7ac8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
08e7ac8
9ebdca4
* Mon Apr 18 2016 Caolán McNamara <caolanm@redhat.com> - 0.4.1-2
9ebdca4
- rebuild for hunspell 1.4.0
9ebdca4
d0c61cf
* Mon Apr 04 2016 Mike FABIAN <mfabian@redhat.com> - 0.4.1-1
d0c61cf
- update to 0.4.1
d0c61cf
d13f446
* Mon Mar 21 2016 Mike FABIAN <mfabian@redhat.com> - 0.4.0-1
d13f446
- update to 0.4.0
d13f446
8c572a1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-2
8c572a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8c572a1
92eef98
* Tue Dec 22 2015 Mike FABIAN <mfabian@redhat.com> - 0.3.3-1
92eef98
- update to 0.3.3
92eef98
- remove patch for the leaks found with the gcc-with-cpychecker
92eef98
  static analyzer, it is included upstream
92eef98
- add a python3 sub-package
92eef98
- Resolves: rhbz#800116
92eef98
f0383e9
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-14
f0383e9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f0383e9
17fe297
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-13
17fe297
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
17fe297
6a6a546
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-12
6a6a546
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
6a6a546
4b6c04a
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-11
4b6c04a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4b6c04a
47684d7
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-10
47684d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
47684d7
1f9170d
* Fri Jan 11 2013 Mike FABIAN <mfabian@redhat.com> - 0.1-9
1f9170d
- Resolves: #800116 - Bugs found in pyhunspell-0.1-6.fc17 using gcc-with-cpychecker static analyzer 
1f9170d
de991c8
* Wed Jan 09 2013 Till Maas <opensource@till.name> - 0.1-8
de991c8
- python site_arch macro is not needed now, remove it
de991c8
- remove buildroot tag
de991c8
- Add comment/bz reference for patch
cd9e072
- removal of buildroot in %%install
de991c8
- remove %%clean section
de991c8
- remove defattr(-,root,root,-)
de991c8
- Add PKG-INFO to %%doc
de991c8
- BuildRequires should be python2-devel and not just python-devel
de991c8
1c22c15
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-7
1c22c15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1c22c15
1300637
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-6
1300637
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1300637
910cdbd
* Wed May 25 2011 Caolán McNamara <caolanm@redhat.com> - 0.1-5
910cdbd
- rebuild for new hunspell
910cdbd
8278083
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-4
8278083
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8278083
a8d8508
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.1-3
a8d8508
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a8d8508
8db4816
* Tue Aug 25 2009 Till Maas <opensource@till.name> - 0.1-2
8db4816
- Remove CFLAGS, whiche are used automagically
8db4816
- Change the %%description to a full sentence
8db4816
- Adjust the license tag, it's actually LGPLv3+
8db4816
8db4816
* Wed Jul 29 2009 Till Maas <opensource@till.name> - 0.1-1
8db4816
- Initial spec for Fedora