File minecraft-launcher.spec of Package minecraft-launcher

#
# spec file for package minecraft-launcher
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2019 Stasiek Michalski <hellcp@opensuse.org>.
#
# 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:           minecraft-launcher
Version:        2.1.16102
Release:        0
Summary:        Play Minecraft Java Edition
License:        NonFree
Group:          Amusements/Games/Other
URL:            https://minecraft.net
Source0:        https://launcher.mojang.com/download/Minecraft.tar.gz
Source1:        LICENSE.md
Source2:        %{name}.desktop
Source3:        %{name}.svg
Source4:        %{name}-symbolic.svg
Source5:        %{name}.appdata.xml

BuildRequires:  chrpath
BuildRequires:  hicolor-icon-theme

Requires:       hicolor-icon-theme
Requires:       java-1_8_0-openjdk

ExclusiveArch:  x86_64

%description
Minecraft Launcher allows you to play your favourite block building game on your device equipped with Java.

%prep
%setup -qn %{name}

%build
# Skip build

%install
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -r * %{buildroot}%{_libexecdir}/%{name}
rm %{buildroot}%{_libexecdir}/%{name}/chrome-sandbox
install -Dm644 %SOURCE1 %{buildroot}%{_docdir}/%{name}/LICENSE.md
install -Dm644 %SOURCE2 %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dm644 %SOURCE3 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -Dm644 %SOURCE4 %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/%{name}-symbolic.svg
install -Dm644 %SOURCE5 %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml

mkdir -p %{buildroot}%{_bindir}
ln -s %{_libexecdir}/%{name}/%{name} %{buildroot}%{_bindir}/%{name}

chrpath -r '$ORIGIN/.' %{buildroot}%{_libexecdir}/%{name}/%{name}

%files
%dir %{_docdir}/%{name}
%license %{_docdir}/%{name}/LICENSE.md
%{_bindir}/%{name}
%dir %{_libexecdir}/%{name}
%attr(644,-,-) %{_libexecdir}/%{name}/*.{bin,so*,dat,pak,log}
%attr(755,-,-) %{_libexecdir}/%{name}/%{name}
%{_libexecdir}/%{name}/locales
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/icons/hicolor/symbolic/apps/%{name}-symbolic.svg
%{_datadir}/metainfo/%{name}.appdata.xml

%changelog
openSUSE Build Service is sponsored by