File recaf.spec of Package Recaf

#
# spec file for package recaf
#
# 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.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           recaf
Version:        2.21.14 
Release:        1.0
Summary:        An easy to use modern Java bytecode editor that abstracts away the complexities of Java programs.
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        MIT 
URL:            https://www.coley.software/Recaf/
Source0:        %{name}-%{version}.jar
Source1:        %name.png
Source2:        %name.desktop
Source3:        LICENSE
BuildRequires:  update-desktop-files
Requires:       java
BuildArch:      noarch
Group:          Development/Tools/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       java
BuildRequires:  unzip

%description
Recaf is an open-source Java bytecode editor that simplifies the process of editing compiled Java applications. To make things easier Recaf abstracts away much of the internal class file format. Difficult tasks such as updating stack-frames are done automatically. Along with additional features to assist in the process of editing classes, Recaf is the most feature-rich free bytecode editor available.

%prep
cp %{SOURCE1} .
cp %{SOURCE3} .

%build

%install

install -d %{buildroot}/usr/share/java
install -p %{SOURCE0} %{buildroot}/usr/share/java

install -d $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 644 %name.png $RPM_BUILD_ROOT/usr/share/pixmaps/%name.png
mkdir -p %{buildroot}/%{_licensedir}/recaf
cp LICENSE %{buildroot}/%{_licensedir}/recaf
# install -D LICENSE $RPM_BUILD_ROOT/usr/share/licenses/recaf

%suse_update_desktop_file -i %{name}

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
/usr/share/java
/usr/share/java/%{name}-%{version}.jar
/usr/share/applications/%name.desktop
/usr/share/pixmaps/%name.png
/usr/share/licenses/recaf/LICENSE
%license LICENSE

%changelog

openSUSE Build Service is sponsored by