File jd-gui.spec of Package jd-gui

Name:           jd-gui
Version:        1.0.0
Release:        1.1
License:        GPL-3.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Group:          Development/Tools/Other
Summary:        A standalone graphical utility that displays Java source codes of class files
URL:		    http://jd.benow.ca/
Source0:        https://github.com/java-decompiler/%{name}/releases/download/v{%version}/%{name}-%{version}.jar
Source1:	    %name.png
Source2:	    %name.desktop
BuildRequires:  update-desktop-files
BuildArch:      noarch
Requires:       java

%description
A standalone graphical utility that displays Java source codes of ".class" 
files. You can browse the reconstructed source code with the JD-GUI for 
instant access to methods and fields.

%prep
cp %_sourcedir/%name.png .

%build

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

install -d $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 644 %name.png $RPM_BUILD_ROOT/usr/share/pixmaps/%name.png

%suse_update_desktop_file -i %{name}

%clean
rm -rf "$RPM_BUILD_ROOT"

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

%changelog

openSUSE Build Service is sponsored by