File multimc.spec of Package multimc
#
# spec file for package multimc
#
# Copyright (c) 2020-23 Florian "sp1rit" <packaging@sp1rit.anonaddy.me>
# Copyright (c) 2020 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: multimc
Version: 0.7.0
Release: 0
Group: Amusements/Games/Other
Summary: A custom launcher for Minecraft
License: Apache-2.0
URL: https://multimc.org/
Source0: generate_source.sh/%{version}#/%{name}-%{version}.tar.xz
Source1: https://aur.archlinux.org/cgit/aur.git/plain/multimc.desktop?h=multimc5#/multimc.desktop
Source10: %{name}-get-upstream-mssecret
Source11: README.SUSE
Patch0: modern-java.patch
Patch1: https://aur.archlinux.org/cgit/aur.git/plain/0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch?h=multimc5#/0001-Readd-lin-system-and-LAUNCHER_LINUX_DATADIR.patch
Patch2: https://aur.archlinux.org/cgit/aur.git/plain/fix-jars.patch?h=multimc5#/fix-jars.patch
Patch3: https://aur.archlinux.org/cgit/aur.git/plain/mmc-brand.patch?h=multimc5#/mmc-brand.patch
Patch4: 0001-allow-setting-ms-auth-token-via-env-var.patch
Patch5: 0001-fix-build-on-gcc-13.patch
BuildRequires: gcc-c++ cmake
BuildRequires: pkgconfig(Qt5Core) pkgconfig(Qt5Widgets) pkgconfig(Qt5Concurrent) pkgconfig(Qt5Network) pkgconfig(Qt5Test) pkgconfig(Qt5Xml) pkgconfig(zlib) java-devel
BuildRequires: hicolor-icon-theme
Requires: java
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%global libprefix libLauncher_
%description
MultiMC is a free, open source launcher for Minecraft. It allows
you to have multiple, cleanly separated instances of Minecraft
(each with their own mods, texture packs, saves, etc) and helps
you manage them and their associated options with a simple and
powerful interface.
Features
- Manage multiple instances of Minecraft at once
- Start Minecraft with a custom resolution
- Change Java's runtime options (including memory options)
- Shows Minecraft's console output in a colour coded window
- Kill Minecraft easily if it crashes / freezes
- Custom icons and groups for instances
- Forge integration (automatic installation, version downloads, mod management)
- Minecraft world management
- Import and export Minecraft instances to share them with anyone
- Supports every version of Minecraft that the vanilla launcher does
%prep
%autosetup -p1
%build
%cmake \
-DLauncher_LAYOUT="lin-system" \
-DLauncher_BUILD_PLATFORM="Linux" \
-DLauncher_UPDATER=OFF \
-DLauncher_APP_BINARY_NAME="%{name}" \
-DLauncher_SHARE_DEST_DIR="share/%{name}" \
-DLauncher_LIBRARY_DEST_DIR="%{_lib}/%{name}"
%cmake_build
# Only check on Tumbleweed
%if 0%{?suse_version}
%if 0%{?sle_version}
%else
%check
%ctest
%endif
%endif
%install
%cmake_install
install -Dm644 "launcher/package/ubuntu/multimc/opt/%{name}/icon.svg" "%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg"
install -Dm644 %{SOURCE1} "%{buildroot}%{_datadir}/applications/%{name}.desktop"
install -Dm644 "launcher/package/ubuntu/multimc/usr/share/metainfo/%{name}.metainfo.xml" "%{buildroot}%{_datadir}/metainfo/%{name}.metainfo.xml"
mv %{buildroot}%{_libdir}/%{name}/* %{buildroot}%{_libdir}/
rmdir %{buildroot}%{_libdir}/%{name}
%if 0%{?suse_version}
%suse_update_desktop_file %{name} BlocksGame
%endif
install -Dm 0755 %{SOURCE10} %{buildroot}%{_bindir}/
install -Dm 0644 %{SOURCE11} README.SUSE
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license COPYING.md
%doc README.md changelog.md BUILD.md
%doc README.SUSE
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/jars
%{_bindir}/%{name}
%{_bindir}/%{name}-get-upstream-mssecret
%{_libdir}/%{libprefix}*
%{_datadir}/%{name}/jars/JavaCheck.jar
%{_datadir}/%{name}/jars/NewLaunch.jar
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/metainfo/%{name}.metainfo.xml
%changelog