%define ver 1.6

%define _unpackaged_files_terminate_build 1

Summary: A C++ wrapper for atk
Summary(ja): atk の C++ ラッパー
Name: atkmm
Version: 2.28.0
Release: 1%{?_dist_release}
Vendor: Project Vine
Distribution: Vine Linux

License: LGPL
%global shortver %(echo %{version} | sed -e 's/\.[0-9]*$//')
Source: https://download.gnome.org/sources/%{name}/%{shortver}/%{name}-%{version}.tar.xz

Buildroot: %{_tmppath}/%{name}-%{version}-root

Requires:	atk >= 1.12.0
Requires:	glibmm >= 2.24.0
BuildRequires:	atk-devel >= 1.12.0
BuildRequires:	glibmm-devel >= 2.24.0

%description
Atkmm is a C++ wrapper for atk.


%package	devel
Summary: 	Development tools for atkmm applications.
Summary(ja): 	atkmm アプリケーションの開発用ファイル
Group: 		Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:	atk-devel >= 1.12.0
Requires:	glibmm-devel >= 2.24.0

%description devel
Header files and libraries for building a extension library for the atkmm.


%prep
%setup -q 


%build
%configure --disable-static
make %{?_smp_mflags}


%install
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}

make install DESTDIR=%{buildroot}

find %{buildroot} -type f -name "*.a" -exec rm -f {} ';'
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'

# Fix documentation installation, put everything under gtk-doc
mkdir -p %{buildroot}%{_datadir}/gtk-doc/html/%{name}-%{ver}
mv ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{ver}/* %{buildroot}%{_datadir}/gtk-doc/html/%{name}-%{ver}/

# devhelp path fix
sed -i 's:doc/%{name}-%{ver}:gtk-doc/html/%{name}-%{ver}:g' %{buildroot}%{_datadir}/devhelp/books/%{name}-%{ver}/%{name}-%{ver}.devhelp2

# remove demos, examples
rm -rf %{buildroot}%{_datadir}/%{name}-%{ver}/demo
rm -rf %{buildroot}%{_datadir}/%{name}-%{ver}/examples


%clean
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/lib*.so.*

%files  devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/%{name}-*
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gtk-doc/html/*
%{_datadir}/devhelp/books/*


%changelog
* Sun Aug 02 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.28.0-1
- new upstream release.

* Sat Jan 06 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.24.2-3
- renuilt with atk-2.27.1 anf glibmm-2.54.1.

* Wed Jun 29 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.24.2-2
- rebuild with gcc-5.4.0

* Sat Dec 19 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.24.2-1
- new upstream release

* Sat Oct 31 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.24.1-1
- new upstream release

* Sun Feb 08 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.22.7-2
- rebuild with VineSeed environment

* Sat May 18 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.22.7-1
- new upstream release

* Thu Nov 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.22.6-1
- new upstream release

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.22.5-1
- new upstream release

* Sun Jan 09 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.22.2-1
- new upstream release

* Sat Dec 18 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.22.1-1
- new upstream release

* Sat Oct 02 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.22.0-1
- initial build for Vine Linux

