File gtkspellmm3.spec of Package gtkspellmm3

%define so_ver -3_0-0

Name:          gtkspellmm3
Version:       3.0.5
Release:       1%{?dist}
License:       GPL-2.0+
Summary:       On-the-fly spell checking for GtkTextView widgets - C++ bindings
URL:           http://gtkspell.sourceforge.net/
Source0:       http://sourceforge.net/projects/gtkspell/files/gtkspellmm/gtkspellmm-%{version}.tar.xz

BuildRequires: gtkspell3-devel gtkmm3-devel gtkmm3-doc gcc-c++

%description
GtkSpell provides word-processor-style highlighting and replacement of 
misspelled words in a GtkTextView widget as you type. Right-clicking a
misspelled word pops up a menu of suggested replacements.

%package -n libgtkspellmm%{so_ver}
Summary:       On-the-fly spell checking for GtkTextView widgets - C++ bindings
Group:         System Environment/Libraries

%description -n libgtkspellmm%{so_ver}
GtkSpell provides word-processor-style highlighting and replacement of 
misspelled words in a GtkTextView widget as you type. Right-clicking a
misspelled word pops up a menu of suggested replacements.

%package       devel
Summary:       Development files for gtkspellmm3
Group:         Development/Libraries
Requires:      libgtkspellmm%{so_ver}%{?_isa} = %{version}-%{release}

%description   devel
The gtkspellmm3-devel package provides header and documentation files for
developing C++ applications which use GtkSpell.

%package       doc
Summary:       Documentation for %{name}
Group:         Documentation
BuildArch:     noarch
Requires:      gtkmm3-doc

%description   doc
This package contains the full API documentation for %{name}.

%prep
%setup -q -n gtkspellmm-%{version}

%build
export CFLAGS="%optflags -std=c++11"
export CXXFLAGS="%optflags -std=c++11"
%configure

make %{?_smp_mflags}

%install
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -name "*.la" -exec rm {} \;

%post -n libgtkspellmm%{so_ver} -p /sbin/ldconfig

%postun -n libgtkspellmm%{so_ver} -p /sbin/ldconfig

%files -n libgtkspellmm%{so_ver}
%defattr (-, root, root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/libgtkspellmm-3.0.so.0*

%files devel
%defattr (-, root, root)
%{_includedir}/gtkspellmm-3.0
%{_libdir}/libgtkspellmm-3.0.so
%{_libdir}/pkgconfig/gtkspellmm-3.0.pc
%{_libdir}/gtkspellmm-3.0

%files doc
%defattr (-, root, root)
%doc COPYING
%{_datadir}/devhelp/books/gtkspellmm-3.0
%{_datadir}/doc/gtkspellmm-3.0

%changelog
* Fri Oct 14 2016 Sandro Mani <manisandro@gmail.com> - 3.0.5-1
- gtkspellmm3-3.0.5