%define pkg_name    stellarium
%define pkg_version 0.18.2
%define pkg_release 1%{?_dist_release}

Summary:     A free open source planetarium
Summary(ja): オープンソースのプラネタリウム
Name:        %{pkg_name}
Version:     %{pkg_version}
Release:     %{pkg_release}

License: GPLv2
Group:   Applications/Edutainment
URL:     http://www.stellarium.org/
Source0: %{name}-%{version}.tar.gz
Source1: stellarium.desktop

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

BuildRequires: cmake
BuildRequires: freetype2-devel
BuildRequires: zlib-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtlocation-devel
BuildRequires: qt5-qtmultimedia-devel
BuildRequires: qt5-qtserialport-devel
BuildRequires: qt5-qtscript-devel
BuildRequires: qt5-qttools-devel

Requires: freetype2
Requires: qt5-qtbase
Requires: qt5-qtlocation
Requires: qt5-qtmultimedia
Requires: qt5-qtserialport
Requires: qt5-qtscript
Requires: qt5-qttools

Vendor: Project Vine
Distribution: Vine Linux
Packager: ara_t


%description
Stellarium is a free open source planetarium for your computer.
It shows a realistic sky in 3D, just like what you see with the naked eye,
binoculars or a telescope.
It is being used in planetarium projectors.
Just set your coordinates and go.

%description -l ja
Stellariumは、無料のオープンソースプラネタリウムです。
また、裸眼や双眼鏡で見える星空と同等の、リアルな3Dの星空を表示します。
Stellariumは、プラネタリウムのプロジェクタでも使われています。
あなたの現在位置を設定して、プラネタリウムを楽しみましょう。


%prep
%{__rm} -rf ${RPM_BUILD_ROOT}
%setup -q

%build
%{__cmake} -DCMAKE_INSTALL_PREFIX=%{_prefix}
%{__make} %{?_smp_mflags}

%install
%{make_install}

# menu / icon
%{__mkdir_p} ${RPM_BUILD_ROOT}%{_datadir}/applications/
%{__cp} %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/applications/

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%doc ChangeLog COPYING CREDITS.md README.md
%defattr(-,root,root)
%{_bindir}/
%{_datadir}/applications/
%{_datadir}/icons/
%{_datadir}/metainfo/
%{_datadir}/pixmaps/
%{_datadir}/stellarium/
%{_mandir}/man1/


%changelog
* Sun Aug 19 2018 Toshiaki Ara <ara_t@384.jp> 0.18.2-1
- update to 0.18.2
- add BuildRequires: qt5-qtlocation-devel

* Sat Nov 05 2016 Toshiaki Ara <ara_t@384.jp> 0.15.0-1vl7
- update to 0.15.0
- add BuildRequires: qt5-qtmultimedia-devel
- add Requires: qt5-qtmultimedia

* Tue Jul 19 2016 Toshiaki Ara <ara_t@384.jp> 0.14.3-1vl7
- update to 0.14.3 for VineSeed
- change to BuildRequires: qt5-qtbase-devel qt5-qtserialport-devel
- change to BuildRequires: qt5-qtserialport-devel qt5-qttools-devel
- change to Requires: qt5-qtbase  qt5-qtserialport qt5-qtserialpor qt5-qttools

* Fri Jul 08 2016 Toshiaki Ara <ara_t@384.jp> 0.12.6-2vl7
- rebuild with gcc-5.4.0

* Mon Apr 25 2016 Toshiaki Ara <ara_t@384.jp> 0.12.6-1vl7
- update to 0.12.6 for VineSeed

* Mon Apr 25 2016 Toshiaki Ara <ara_t@384.jp> 0.10.6-1
- new package

