Package xaos: Specfile

# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
%define _localstatedir %{_var}

Name: xaos
Epoch: 1
Version: 4.2.1
Release: alt1
Summary: A real-time fractal zoomer
License: GPLv3+
Group: Sciences/Mathematics
Packager: Igor Vlasenko <viy@altlinux.org>
URL: https://xaos-project.github.io
VCS: https://github.com/xaos-project/XaoS
Source0: %{name}-%{version}.tar

Source10: %name.16.xpm
Source11: xaos.png
Source12: %name.48.xpm

Provides : XaoS = %version, %name-aalib = %version
Obsoletes: XaoS, %name-aalib

BuildRequires(pre): rpm-macros-qt5
BuildRequires: gcc-c++
BuildRequires: qt5-base-devel >= 5.7
BuildRequires: qt5-designer qt5-tools

%description
XaoS is a fast portable real-time interactive fractal zoomer. It
displays the Mandelbrot set (among other escape time fractals) and
allows you to zoom smoothly into the fractal.  Various coloring modes
are provided for both the points inside and outside the selected set.
In addition, switching between Julia and Mandelbrot fractal types and
displaying planes is provided.

%prep
%setup -q

%build
%qmake_qt5
%make_build STRIP=:

%install
# Empty install target generated by qmake => install files manually
# Binary
install -D -m 0755 --target-directory %buildroot%_bindir bin/%name

# Data; Datapath forced to %%{alt_name} (not configurable)
install -D --mode 0644 --target-directory %buildroot%_datadir/XaoS/catalogs catalogs/*.cat
cp --archive examples tutorial %buildroot%_datadir/XaoS

# icon
install -D -m 644 %SOURCE10 %buildroot%_miconsdir/%name.xpm
install -D -m 644 %SOURCE11 %buildroot%_niconsdir/%name.png
install -D -m 644 %SOURCE12 %buildroot%_liconsdir/%name.xpm
install -D -m 644 xdg/%name.png %buildroot%_iconsdir/hicolor/256x256/apps/%name.png

# .desktop, AppData
install -D --mode 0644 --target-directory %buildroot%_datadir/metainfo xdg/%name.appdata.xml
install -D --mode 0644 --target-directory %buildroot%_desktopdir xdg/%name.desktop

# Man
install -D --mode 0644 --target-directory %{buildroot}%{_mandir}/man6 doc/%{name}.6

%files
%doc CREDITS.md NEWS doc/README
#doc COPYING
%_bindir/%name
%_datadir/XaoS
%_mandir/man6/*
%_desktopdir/%name.desktop
%_datadir/metainfo/%name.appdata.xml
%_miconsdir/%name.xpm
%_niconsdir/%name.png
%_liconsdir/%name.xpm
%_iconsdir/hicolor/256x256/apps/%name.png

%changelog
* Fri Jan 14 2022 Igor Vlasenko <viy@altlinux.org> 1:4.2.1-alt1
- new version

* Wed Feb 27 2019 Dmitry V. Levin <ldv@altlinux.org> 1:3.6-alt3
- NMU: updated build dependencies.

* Tue Aug 29 2017 Aleksei Nikiforov <darktemplar@altlinux.org> 1:3.6-alt2
- Rebuilt with new libgsl.

* Thu Dec 03 2015 Igor Vlasenko <viy@altlinux.ru> 1:3.6-alt1.1.1
- NMU: added BR: texinfo

* Fri Mar 13 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1:3.6-alt1.1
- Built with libgsl90 instead of libgsl

* Sat Mar 01 2014 Ilya Mashkin <oddity@altlinux.ru> 1:3.6-alt1
- 3.6

* Mon Feb 04 2013 Igor Vlasenko <viy@altlinux.ru> 1:3.5-alt3
- bugfix release

* Wed Jan 23 2013 Igor Vlasenko <viy@altlinux.ru> 1:3.5-alt2
- resurrected from orphaned

* Mon Apr 18 2011 Igor Vlasenko <viy@altlinux.ru> 1:3.5-alt1.qa1
- NMU: converted menu to desktop file

* Sun Sep 06 2009 Ilya Mashkin <oddity@altlinux.ru> 1:3.5-alt1
- 3.5
- fix icons locations

* Fri Feb 28 2009 Ilya Mashkin <oddity@altlinux.ru> 1:3.4-alt1
- 3.4

* Tue Mar 18 2008 Alex Karpov <karpov@altlinux.ru> 1:3.3-alt1
- 3.3

* Mon Jan 15 2007 Alex Karpov <karpov@altlinux.ru> 1:3.2.3-alt1
- picked from orphaned
- new version

* Thu Jan 20 2005 Stanislav Ievlev <inger@altlinux.org> 1:3.1-alt4
- fix building with gcc3.4

* Thu Apr 22 2004 Stanislav Ievlev <inger@altlinux.org> 1:3.1-alt3
- change internal font to font with russian letters

* Wed Apr 21 2004 Stanislav Ievlev <inger@altlinux.org> 1:3.1-alt2
- remove aalib subpackage
- added russian translation by Valentina Vaneeva

* Tue May 20 2003 Stanislav Ievlev <inger@altlinux.ru> 1:3.1-alt1
- 3.1 final

* Tue Oct 15 2002 Stanislav Ievlev <inger@altlinux.ru> 3.1pre5-alt1
- pre5
- sync with MDK

* Fri Oct 12 2001 Stanislav Ievlev <inger@altlinux.ru> 3.1pre1-ipl18mdk
- spec cleanup.
- rebuild with new libpng.

* Wed Jan 17 2001 AEN <aen@logic.ru>
- RE adaptation

* Fri Nov  3 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-16mdk
- some forgotten `obsoletes' tags

* Fri Nov  3 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-15mdk
- change name to xaos (e.g. uppercase names suck)

* Wed Aug 30 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-14mdk
- fixed missing install_info

* Wed Aug 23 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-13mdk
- automatically added packager tag

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.1pre1-12mdk
- automatically added BuildRequires

* Wed Jul 19 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-11mdk
- rebuild for buggy %% clean_menus

* Tue Jul 18 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-10mdk
- BM
- macros for menu/icons

* Mon Jul 17 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-9mdk
- macros

* Fri May 26 2000 Adam Lebsack <adam@mandrakesoft.com> 3.1pre1-8mdk
- added ppc ExclusiveArch

* Tue May  9 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-7mdk
- added exclusivearch with the help of S. Van der Eijk

* Fri Apr 28 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-6mdk
- added 32x32 icons, fixed hardcoded path in menu entries
- added lacking [ $1 = 0 ] in postun script

* Fri Apr 14 2000 David BAUDENS <baudens@mandrakesoft.com> 3.1pre1-5mdk
- Don't own shared directiries
- Use $RPM_OPT_FLAGS, don't build for i686 when I say i586

* Fri Apr 14 2000 David BAUDENS <baudens@mandrakesoft.com> 3.1pre1-4mdk
- Fix group

* Mon Apr 10 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-3mdk
- added icon

* Mon Mar 27 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-2mdk
- add menu entry

* Sat Mar 18 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 3.1pre1-1mdk
- 3.1pre1
- holy patch to remove crash when invoking help