File planets.spec of Package planets

# spec file for package planets
# Copyright (c) 2020 SUSE LLC
# Copyright © 2002 Yaron M. Minsky <>
# Copyright © 2018–2019 Markus S. <>
# 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

Name:           planets
Version:        0.1.13
Release:        0
Summary:        A simple and fun planetary simulator
License:        GPL-2.0-or-later
Source0:        %{name}-%{version}.tar.bz2
Source1:        planets_icon_by_KMi_CC-BY-SA-4.0.svg
# PATCH-FIX-DEBIAN -- Fix buildflags
Patch0:         planets-0.1.13-buildflags.patch
# PATCH-FIX-DEBIAN -- Fix random_bodies string
Patch1:         planets-0.1.13-string_random_bodies.patch
# PATCH-FIX-DEBIAN -- Add German translation
Patch2:         planets-0.1.13-german_translation.patch
# PATCH-FIX-DEBIAN -- Fix Ocaml4 typing
Patch3:         planets-0.1.13-ocaml4_typing.patch
# PATCH-FIX-OPENSUSE -- Add missing entries to .desktop file
Patch4:         planets-0.1.13-desktop_file.patch
# PATCH-FIX-FEDORA -- Bytes.to_string
Patch5:         planets-0.1.13-bytes.patch
# PATCH-FIX-FEDORA -- camlp5o instead of camlp4o
Patch6:         planets-0.1.13-camlp5o.patch
BuildRequires:  hicolor-icon-theme
BuildRequires:  ocaml
BuildRequires:  ocaml-camlp5
BuildRequires:  ocaml-labltk-devel
BuildRequires:  tcl-devel
BuildRequires:  tk-devel
BuildRequires:  xorg-x11-devel
Requires:       hicolor-icon-theme

Planets is a simple interactive program for playing with
simulations of planetary systems. The user interface is
aimed at being simple enough that a fairly young kid can get
some joy out of it but it is probably as much if not more
fun for adults.

%autosetup -p1

make %{?_smp_mflags} all

mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/{applications,pixmaps}
mkdir -p %{buildroot}%{_mandir}/man1
%makeinstall PREFIX=%{buildroot}%{_prefix}

# Remove low quality icon
rm -rf %{buildroot}%{_datadir}/pixmaps

mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -Dm 644 %{S:1} "%{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/planets.svg"

find %{buildroot}%{_datadir} -type f -exec chmod -v 644 {} \;
chmod -v 644 %{buildroot}%{_mandir}/man1/*

%doc uni.9
%doc getting_started.html
%license LICENSE

openSUSE Build Service is sponsored by