File stellarium.spec of Package stellarium

#
# spec file for package stellarium
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#


Name:           stellarium
Version:        0.16.1
Release:        0
Summary:        Astronomical Sky Simulator
License:        GPL-2.0+
Group:          Productivity/Scientific/Astronomy
Url:            http://stellarium.sourceforge.net
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRequires:  cmake >= 2.8.11
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Concurrent) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Gui) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Multimedia) >= 5.6.0
BuildRequires:  pkgconfig(Qt5MultimediaWidgets) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Network) >= 5.6.0
BuildRequires:  pkgconfig(Qt5OpenGL) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Positioning) >= 5.6.0
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Script) >= 5.5.0
BuildRequires:  pkgconfig(Qt5SerialPort)
BuildRequires:  pkgconfig(Qt5Test) >= 5.6.0
BuildRequires:  pkgconfig(Qt5UiTools) >= 5.6.0
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.6.0
BuildRequires:  pkgconfig(dri)
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(zlib)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Stellarium is a software to render 3D photo-realistic skies in real
time, similar to what can be observed with human eyes through
binoculars or a small telescope.

%prep
%setup -q

%build
%cmake -DENABLE_SOUND=1
%make_jobs

%install
%cmake_install

# Remove .xpm icon from /usr/share/pixmaps as we already
# install appropriate icons in the hicolor directory
rm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm

%suse_update_desktop_file -c stellarium Stellarium "Planetarium in your computer" stellarium stellarium Science Astronomy
mkdir -p %{buildroot}/%{_datadir}/stellarium/data/script_internet_update
%fdupes %{buildroot}%{_datadir}/%{name}

#%%find_lang %%{name}
#%%find_lang %%{name}-skycultures
#cat %%{name}-skycultures.lang >> %%{name}.lang

%post
%if 0%{?suse_version} > 1130
%icon_theme_cache_post
%else
gtk-update-icon-cache
%endif

%postun
%if 0%{?suse_version} > 1130
%icon_theme_cache_postun
%else
gtk-update-icon-cache
%endif

%files
%defattr(-,root,root,755)
%doc AUTHORS ChangeLog COPYING README
%dir %{_datadir}/icons/hicolor/512x512/
%dir %{_datadir}/icons/hicolor/512x512/apps/
%{_bindir}/%{name}
%{_datadir}/%{name}
%dir %{_datadir}/appdata
%{_datadir}/appdata/stellarium.appdata.xml
%{_datadir}/applications/%{name}*.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_mandir}/man1/%{name}.1%{ext_man}

%changelog
openSUSE Build Service is sponsored by