File freeplane.spec of Package freeplane
#
# spec file for package freeplane
#
# Copyright (c) 2024 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.
%define freeplane_git_revision 9503e09f1c
%define freeplane_version 1.12.9.pre14
Name: freeplane
Version: %{freeplane_version}
Release: 0
Summary: Mind mapping
License: GPL-2.0-or-later
Group: Productivity/Office/Other
URL: https://freeplane.sourceforge.net
Source0: freeplane-%{version}-git%{freeplane_git_revision}.tar.bz2
Source1: %{name}.desktop
BuildRequires: update-alternatives
BuildRequires: update-desktop-files
BuildRequires: gradle >= 8.12
BuildRequires: java-21-openjdk-devel >= 21.0.6
Requires: java >= 21
BuildArch: noarch
%description
Freeplane is free and open source software to support thinking, sharing
information and getting things done at work, in school and at home. The
core of the software consists of functions for mind mapping, also called
concept mapping or information mapping, and tools for using mapped
information. Freeplane runs on any operating system on which a current
version of Java is installed and from USB.
%prep
%setup -q -n freeplane
%build
gradle --offline clean build
%install
install -d -m 755 %{buildroot}%{_datadir}/%{name}
install -d -m 755 %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}/%{name}-%{version}
cp -r %{name}-%{version}/* %{buildroot}%{_datadir}/%{name}
ln -sf %{_datadir}/%{name}/freeplane.sh %{buildroot}%{_bindir}/freeplane
install -d -m 755 %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}
%files
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/freeplane/%{name}.svg
%changelog