File qtspell.spec of Package qtspell
%define so_ver 0
Name: qtspell
Version: 0.8.5
Release: 1%{?dist}
Summary: Spell checking for Qt text widgets
License: GPL-3.0+
URL: https://github.com/manisandro/qtspell
Source0: https://github.com/manisandro/qtspell/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: libqt4-devel
BuildRequires: libqt5-qtbase-devel
BuildRequires: libqt5-qttools-devel
BuildRequires: enchant-devel
BuildRequires: doxygen
%if 0%{?suse_version} > 1310
BuildRequires: libqt5-qttranslations
%endif
Requires: iso-codes
%description
QtSpell adds spell-checking functionality to Qt's text widgets, using the
enchant spell-checking library.
%package -n lib%{name}-qt4-%{so_ver}
Summary: Spell checking for Qt4 text widgets
Group: System Environment/Libraries
%description -n lib%{name}-qt4-%{so_ver}
QtSpell adds spell-checking functionality to Qt4's text widgets, using the
enchant spell-checking library.
%package qt4-devel
Summary: Development files for %{name}-qt4
Group: Development/Libraries
Requires: lib%{name}-qt4-%{so_ver}%{?_isa} = %{version}-%{release}
%description qt4-devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package -n lib%{name}-qt5-%{so_ver}
Summary: Spell checking for Qt5 text widgets
Group: System Environment/Libraries
%description -n lib%{name}-qt5-%{so_ver}
QtSpell adds spell-checking functionality to Qt5's text widgets, using the
enchant spell-checking library.
%package qt5-devel
Group: Development/Libraries
Summary: Development files for %{name}-qt5
Requires: lib%{name}-qt5-%{so_ver}%{?_isa} = %{version}-%{release}
%description qt5-devel
The %{name}-qt5-devel package contains libraries and header files for
developing applications that use %{name}-qt5.
%package qt5-translations
Summary: Translations for %{name}-qt5
Group: System/Localization
BuildArch: noarch
Requires: lib%{name}-qt5-%{so_ver} = %{version}-%{release}
%if 0%{?suse_version} > 1310
Requires: libqt5-qttranslations
%endif
%description qt5-translations
The %{name}-qt5-translations contains translations for %{name}-qt5.
%package doc
Summary: Developer documentation for %{name}
Group: Documentation
BuildArch: noarch
%description doc
The %{name}-doc package contains the documentation for developing applications
that use %{name}.
%prep
%setup -q -n %{name}-%{version}
%build
mkdir build-qt4
pushd build-qt4
%cmake -DUSE_QT5=OFF ../..
make %{?_smp_mflags}
make doc
popd
mkdir build-qt5
pushd build-qt5
%cmake -DUSE_QT5=ON ../..
make %{?_smp_mflags}
popd
%install
%make_install -C build-qt4/build
%make_install -C build-qt5/build
%post -n lib%{name}-qt4-%{so_ver} -p /sbin/ldconfig
%postun -n lib%{name}-qt4-%{so_ver} -p /sbin/ldconfig
%post -n lib%{name}-qt5-%{so_ver} -p /sbin/ldconfig
%postun -n lib%{name}-qt5-%{so_ver} -p /sbin/ldconfig
%files -n lib%{name}-qt4-%{so_ver}
%defattr (-, root, root)
%doc COPYING
%{_libdir}/libqtspell-qt4.so.*
/usr/share/qt4/translations/QtSpell_*.qm
%files qt4-devel
%defattr (-, root, root)
%{_includedir}/QtSpell-qt4/
%{_libdir}/libqtspell-qt4.so
%{_libdir}/pkgconfig/QtSpell-qt4.pc
%files -n lib%{name}-qt5-%{so_ver}
%defattr (-, root, root)
%doc COPYING
%{_libdir}/libqtspell-qt5.so.*
%files qt5-devel
%defattr (-, root, root)
%{_includedir}/QtSpell-qt5/
%{_libdir}/libqtspell-qt5.so
%{_libdir}/pkgconfig/QtSpell-qt5.pc
%files qt5-translations
%defattr (-, root, root)
%if 0%{?suse_version} <= 1310
%dir /usr/share/qt5/translations/
%endif
/usr/share/qt5/translations/QtSpell_*.qm
%files doc
%defattr (-, root, root)
%doc COPYING
%doc build-qt4/build/doc/html
%changelog
* Fri Sep 28 2018 Sandro Mani <manisandro@gmail.com> - 0.8.5-1
- QtSpell 0.8.5
* Thu Sep 08 2016 Sandro Mani <manisandro@gmail.com> - 0.8.2-1
- QtSpell 0.8.2
* Mon Nov 14 2015 Sandro Mani <manisandro@gmail.com> - 0.8.1-1
- QtSpell 0.8.1
* Sat Oct 17 2015 Sandro Mani <manisandro@gmail.com> - 0.8.0-1
- QtSpell 0.8.0
* Tue May 26 2015 Sandro Mani <manisandro@gmail.com> - 0.7.4-1
- QtSpell 0.7.4
* Mon Mar 30 2015 Sandro Mani <manisandro@gmail.com> - 0.7.2-1
- QtSpell 0.7.2
* Mon Feb 09 2015 Sandro Mani <manisandro@gmail.com> - 0.7.1-1
- QtSpell 0.7.1
* Thu Feb 05 2015 Sandro Mani <manisandro@gmail.com> - 0.7.0-1
- QtSpell 0.7.0
* Sun Jan 04 2015 Sandro Mani <manisandro@gmail.com> - 0.6.0-1
- QtSpell 0.6.0
* Wed Dec 10 2014 Sandro Mani <manisandro@gmail.com> - 0.5.0-1
- QtSpell 0.5.0