File photocollage.spec of Package photocollage

Summary:        Graphical tool to make photo collage posters
Name:           photocollage
Version:        1.4.4
Release:        0
Url:            https://github.com/adrienverge/PhotoCollage
License:        GPL-2.0+
Group:		Productivity/Graphics/Bitmap Editors

Source0:        %{name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  gettext-runtime
BuildRequires:	update-desktop-files
BuildRequires:	fdupes
BuildRequires:	python3-distutils-extra
BuildRequires:	intltool

Requires:	python3-Pillow
Requires:	python3-gobject
Requires:	python3-cairo
Requires:	gettext-runtime
Requires:	python3-six
BuildRequires:  hicolor-icon-theme

%if 0%{?suse_version} < 1330
Requires(post):		gtk3-tools
Requires(postun):	gtk3-tools
Requires(post): 	update-desktop-files
Requires(postun):	update-desktop-files
%endif

%description
PhotoCollage allows you to create photo collage posters.
It assembles the input photographs it is given to generate
a big poster. Photos are automatically arranged to fill
the whole poster, then you can change the final layout,
dimensions, border or swap photos in the generated grid.
Eventually the final poster image can be saved in any size.
The algorithm generates random layouts that place photos while
taking advantage of all free space. It tries to fill all
space while keeping each photo as large as possible.

%prep
%setup -q -n PhotoCollage-%version

%build
%{_bindir}/python3 setup.py build

%install
%{_bindir}/python3 setup.py install -O1 --root %{buildroot}
%find_lang %{name}
%suse_update_desktop_file -i -r %name Graphics RasterGraphics
%fdupes %{buildroot}%{python3_sitelib}/%{name}

%if 0%{?suse_version} < 1330
%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif

%files -f %name.lang
%defattr(-,root,root,-)
%doc README.rst LICENSE
%{python3_sitelib}/*
%{_bindir}/%name
%{_datadir}/applications/%name.desktop
%dir %{_datadir}/appdata
%{_datadir}/appdata/%name.appdata.xml
%{_datadir}/icons/hicolor/scalable/apps/%name.svg
%{_datadir}/icons/hicolor/*/apps/%name.png

%changelog
* Thu Jan 11 2018 Simone Sclavi <darkhado@gmail.com> - 1.4.4
- 1.4.4 release

* Mon Sep 19 2016 Simone Sclavi <darkhado@gmail.com> - 1.4.3
- 1.4.3 release

* Tue Apr 19 2016 Simone Sclavi <darkhado@gmail.com> - 1.4.2
- 1.4.2 release

* Wed Dec 16 2015 Simone Sclavi <darkhado@gmail.com> - 1.3.1
- 1.3.1 release

* Tue Mar 03 2015 Simone Sclavi <darkhado@gmail.com> - 1.3.0
- 1.3.0 release

* Sat Jul 12 2014 Simone Sclavi <darkhado@gmail.com> - 1.1.0
- 1.1.0 release

* Wed Mar 05 2014 Simone Sclavi <darkhado@gmail.com> - 1.0.2
- initial build