File ephepm.spec of Package ephepm
#
# spec file for package ephepm
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%if 0%{?suse_version} >= 1600
%bcond_without gcc13
%endif
%define _name ru.mail.bobilev_yury.EphEPM
Name: ephepm
Version: @SERVICE@
Release: 0
Summary: EphEPM calculates barycentric coordinates of some Solar System bodies
Summary(ru): Программа для расчёта координат тел Солнечной системы
License: GPL-3.0-or-later
Group: Productivity/Scientific/Astronomy
URL: https://github.com/ProfessorNavigator/eph-epm
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: cmake(mathgl2)
BuildRequires: gcc-c++
%{!?with_gcc13:BuildRequires: gcc13-c++}
BuildRequires: hicolor-icon-theme
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gsl)
#uildRequires: pkgconfig(gmpxx)
BuildRequires: gmp-devel
BuildRequires: pkgconfig(gtkmm-4.0)
BuildRequires: sofa_c-devel
BuildRequires: update-desktop-files
Recommends: %{name}-lang
%description
EphEPM is a program to calculate barycentric coordinates of some Solar
System bodies. EphEPM uses EPM (https://iaaras.ru/dept/ephemeris/epm/)
ephemeris to calculate coordinates. It also can plot orbits diagram.
%description -l ru
EphEPM - программа для расчёта координат тел Солнечной системы. EphEPM
использует эфемериды EPM (https://iaaras.ru/dept/ephemeris/epm/) для
расчёта координат. Программа также может построить график орбит.
%lang_package
%prep
%autosetup -p1
# ?invalid-desktopfile?, non-executable-script: #!/usr/bin/env xdg-open
sed -i '/xdg-open/d' %{_name}.desktop
# https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
sed -i '/Version/s/1.5/1.0/' %{_name}.desktop
%build
%define __builder ninja
%cmake \
%{!?with_gcc13:-DCMAKE_CXX_COMPILER=%{_bindir}/g++-13}
%cmake_build
%install
%cmake_install
%suse_update_desktop_file -n -r %{_name} Science Astronomy
install -Dm 0644 COPYING -t %{buildroot}%{_datadir}/licenses/%{name}/
ln -sfn ../licenses/%{name}/COPYING %{buildroot}%{_datadir}/EphEPM/COPYING
%find_lang %{name}
%files
%doc README*.md
%{_bindir}/%{name}
%{_datadir}/EphEPM
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%license COPYING
%files lang -f %{name}.lang
%changelog