File qtspell.spec of Package qtspell

#
# spec file for package qtspell
#
# Copyright (c) 2015-2022 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define         soname 1

Name:           qtspell
Version:        1.0.1
Release:        0
Summary:        Spell checking for Qt text widgets
License:        GPL-3.0+
Group:          Development/Libraries/X11
Url:            https://github.com/manisandro/qtspell
Source0:        https://github.com/manisandro/qtspell/releases/download/%{version}/%{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  libqt5-qttranslations
BuildRequires:  pkgconfig(enchant)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5UiTools)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
QtSpell adds spell-checking functionality to Qt's text widgets, using
the enchant spell-checking library.

%package qt5-devel
Summary:        Spell checking for Qt text widgets - development files
Group:          Development/Libraries/X11
Requires:       libqtspell-qt5-%{soname} = %{version}

%description qt5-devel
QtSpell adds spell-checking functionality to Qt's text widgets, using
the enchant spell-checking library.

%package -n libqtspell-qt5-%{soname}
Summary:        Spell checking for Qt text widgets - development files
Group:          Development/Libraries/X11

%description -n libqtspell-qt5-%{soname}
QtSpell adds spell-checking functionality to Qt's text widgets, using
the enchant spell-checking library.

%package qt5-translations
Summary:        Spell checking for Qt text widgets - development files
Group:          Development/Libraries/X11
Requires:       libqtspell-qt5-%{soname} = %{version}

%description qt5-translations
QtSpell adds spell-checking functionality to Qt's text widgets, using
the enchant spell-checking library.

%prep
%setup -q

%build
mkdir -p build_qt5
pushd build_qt5
%cmake -DUSE_QT5=ON ../..
make %{?_smp_mflags}
popd

%post -n libqtspell-qt5-%{soname} -p /sbin/ldconfig

%postun -n libqtspell-qt5-%{soname} -p /sbin/ldconfig

%install
%makeinstall -C build_qt5/build
%fdupes -s %{buildroot}

%files -n libqtspell-qt5-%{soname}
%doc AUTHORS ChangeLog COPYING NEWS README.md
%{_libdir}/libqtspell-qt5.so.*

%files qt5-devel
%defattr(-,root,root)
%dir %{_includedir}/QtSpell-qt5
%{_includedir}/QtSpell-qt5/QtSpell*.hpp
%{_libdir}/libqtspell-qt5.so
%{_libdir}/pkgconfig/QtSpell-qt5.pc

%files qt5-translations
%defattr(-,root,root)
/usr/share/qt5/translations/QtSpell*

%changelog
openSUSE Build Service is sponsored by