diff --git a/anda/games/prismlauncher-nightly/0001-find-cmark-with-pkgconfig.patch b/anda/games/prismlauncher-nightly/0001-find-cmark-with-pkgconfig.patch deleted file mode 100644 index d41ef66bec..0000000000 --- a/anda/games/prismlauncher-nightly/0001-find-cmark-with-pkgconfig.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 5a38fc2c9a329e88c8337af541dfeccaeff1fefb Mon Sep 17 00:00:00 2001 -From: seth -Date: Sun, 15 Jan 2023 14:47:49 -0500 -Subject: [PATCH] find cmark with pkgconfig - -Signed-off-by: seth ---- - cmake/Findcmark.cmake | 59 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 59 insertions(+) - create mode 100755 cmake/Findcmark.cmake - -diff --git a/cmake/Findcmark.cmake b/cmake/Findcmark.cmake -new file mode 100755 -index 00000000..9858e5df ---- /dev/null -+++ b/cmake/Findcmark.cmake -@@ -0,0 +1,59 @@ -+# SPDX-FileCopyrightText: 2019 Black Hat -+# SPDX-License-Identifier: GPL-3.0-only -+ -+# -+# CMake module to search for the cmark library -+# -+ -+# first try to find cmark-config.cmake -+# path to a file not in the search path can be set with 'cmake -Dcmark_DIR=some/path/' -+find_package(cmark CONFIG QUIET) -+if(cmark_FOUND AND TARGET cmark::cmark) -+ # found it! -+ return() -+endif() -+ -+find_package(PkgConfig QUIET) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PC_CMARK QUIET cmark) -+endif() -+ -+if(NOT CMARK_INCLUDE_DIR) -+ find_path(CMARK_INCLUDE_DIR -+ NAMES cmark.h -+ PATHS -+ ${PC_CMARK_INCLUDEDIR} -+ ${PC_CMARK_INCLUDE_DIRS} -+ /usr/include -+ /usr/local/include) -+endif() -+ -+if(NOT CMARK_LIBRARY) -+ find_library(CMARK_LIBRARY -+ NAMES cmark -+ HINTS -+ ${PC_CMARK_LIBDIR} -+ ${PC_CMARK_LIBRARY_DIRS} -+ /usr/lib -+ /usr/local/lib) -+endif() -+ -+if(NOT TARGET cmark::cmark) -+ add_library(cmark::cmark UNKNOWN IMPORTED) -+ set_target_properties(cmark::cmark -+ PROPERTIES INTERFACE_INCLUDE_DIRECTORIES -+ ${CMARK_INCLUDE_DIR}) -+ set_property(TARGET cmark::cmark APPEND -+ PROPERTY IMPORTED_LOCATION ${CMARK_LIBRARY}) -+endif() -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(cmark -+ DEFAULT_MSG -+ CMARK_INCLUDE_DIR -+ CMARK_LIBRARY) -+ -+mark_as_advanced(CMARK_LIBRARY CMARK_INCLUDE_DIR) -+ -+set(CMARK_LIBRARIES ${CMARK_LIBRARY}) -+set(CMARK_INCLUDE_DIRS ${CMARK_INCLUDE_DIR}) --- -2.39.0 - diff --git a/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec b/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec index 39c87818af..7102a9d76c 100644 --- a/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec +++ b/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec @@ -38,23 +38,26 @@ %global build_platform CentOS %endif +%if %{with qt6} Name: prismlauncher-nightly +%else +Name: prismlauncher-qt5-nightly +%endif Version: 7.0^%{snapshot_info} -Release: 1%{?dist} +Release: %autorelease Summary: Minecraft launcher with ability to manage multiple instances -License: GPL-3.0-only +License: GPL-3.0-only AND Apache-2.0 AND LGPL-3.0-only AND GPL-3.0-or-later AND GPL-2.0-or-later AND ISC AND OFL-1.1 AND LGPL-2.1-only AND MIT AND BSD-2-Clause-FreeBSD AND BSD-3-Clause AND LGPL-3.0-or-later Group: Amusements/Games URL: https://prismlauncher.org/ Source0: https://github.com/PrismLauncher/PrismLauncher/archive/%{commit}/%{real_name}-%{shortcommit}.tar.gz Source1: https://github.com/PrismLauncher/libnbtplusplus/archive/%{libnbtplusplus_commit}/libnbtplusplus-%{libnbtplusplus_commit}.tar.gz Source2: https://github.com/stachenov/quazip/archive/%{quazip_commit}/quazip-%{quazip_commit}.tar.gz Source3: https://github.com/marzer/tomlplusplus/archive/%{tomlplusplus_commit}/tomlplusplus-%{tomlplusplus_commit}.tar.gz -Patch0: 0001-find-cmark-with-pkgconfig.patch BuildRequires: cmake >= 3.15 BuildRequires: extra-cmake-modules BuildRequires: gcc-c++ -BuildRequires: java-devel >= 17 +BuildRequires: java-17-openjdk-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: cmake(ghc_filesystem) @@ -71,8 +74,6 @@ BuildRequires: cmake(Qt6Core5Compat) %endif BuildRequires: pkgconfig(libcmark) -# https://bugzilla.redhat.com/show_bug.cgi?id=2166815 -BuildRequires: cmark BuildRequires: pkgconfig(scdoc) BuildRequires: pkgconfig(zlib) @@ -82,7 +83,7 @@ Requires(postun): desktop-file-utils Requires: qt%{qt_version}-qtimageformats Requires: qt%{qt_version}-qtsvg Requires: javapackages-filesystem -Requires: java >= 17 +Requires: java-17-openjdk Requires: java-1.8.0-openjdk # xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 @@ -92,8 +93,11 @@ Recommends: flite # Prism supports enabling gamemode Suggests: gamemode -Conflicts: prismlauncher -Conflicts: prismlauncher-qt5 +Conflicts: %{real_name} +Conflicts: %{real_name}-qt5 +%if %{without qt6} +Conflicts: %{real_name}-nightly +%endif %description @@ -108,7 +112,7 @@ tar -xzf %{SOURCE1} -C libraries tar -xvf %{SOURCE2} -C libraries tar -xvf %{SOURCE3} -C libraries -rmdir libraries/{libnbtplusplus,quazip,tomlplusplus}/ +rmdir libraries/{extra-cmake-modules,filesystem,libnbtplusplus,quazip,tomlplusplus,zlib}/ mv -f libraries/libnbtplusplus-%{libnbtplusplus_commit} libraries/libnbtplusplus mv -f libraries/quazip-%{quazip_commit} libraries/quazip mv -f libraries/tomlplusplus-%{tomlplusplus_commit} libraries/tomlplusplus @@ -137,24 +141,26 @@ sed -i "s|\$ORIGIN/||" CMakeLists.txt %check -## disabled due to inconsistent results in copr builds that are not reproducible locally -%dnl %ctest +%ctest -%if 0%{?fedora} > 35 -appstream-util validate-relax --nonet \ - %{buildroot}%{_metainfodir}/org.prismlauncher.PrismLauncher.metainfo.xml -%endif +%if 0%{?rhel} > 8 +# disabled due to rhel not shipping a new enough version of libappstream-glib +# appstream-util validate-relax --nonet \ +# %{buildroot}%{_metainfodir}/org.prismlauncher.PrismLauncher.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/org.prismlauncher.PrismLauncher.desktop - +%endif %post +%if 0%{?rhel} > 8 /usr/bin/update-desktop-database &> /dev/null || : /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /bin/touch --no-create %{_datadir}/mime/packages &>/dev/null || : +%endif %postun +%if 0%{?rhel} > 8 /usr/bin/update-desktop-database &> /dev/null || : if [ $1 -eq 0 ] ; then @@ -162,18 +168,21 @@ if [ $1 -eq 0 ] ; then /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : fi +%endif %posttrans +%if 0%{?rhel} > 8 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : +%endif %files %doc README.md %license LICENSE COPYING.md %dir %{_datadir}/%{real_name} -%{_bindir}/prismlauncher +%{_bindir}/%{real_name} %{_datadir}/%{real_name}/NewLaunch.jar %{_datadir}/%{real_name}/JavaCheck.jar %{_datadir}/applications/org.prismlauncher.PrismLauncher.desktop @@ -186,13 +195,16 @@ fi %changelog +* Wed Jun 07 2023 seth - 7.0^20230603.954d4d7-1 +- specify jdk 17 + cleanup outdated patches/scriptlets + * Sun May 14 2023 seth - 7.0^20230513.c5aff7c-1 - add qtlogging.ini to files list * Mon Mar 20 2023 seth - 7.0^20230319.6dcf34a-1 - recommend flite to support narrator in minecraft -* Fri Feb 03 2023 seth flynn - 7.0^20230203.58d9ced-1 +* Fri Feb 03 2023 seth - 7.0^20230203.58d9ced-1 - disable tests and explicitly require cmark * Sun Jan 15 2023 seth - 7.0^20230115.f1247d2-1 diff --git a/anda/games/prismlauncher-qt5-nightly/0001-find-cmark-with-pkgconfig.patch b/anda/games/prismlauncher-qt5-nightly/0001-find-cmark-with-pkgconfig.patch deleted file mode 100644 index d41ef66bec..0000000000 --- a/anda/games/prismlauncher-qt5-nightly/0001-find-cmark-with-pkgconfig.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 5a38fc2c9a329e88c8337af541dfeccaeff1fefb Mon Sep 17 00:00:00 2001 -From: seth -Date: Sun, 15 Jan 2023 14:47:49 -0500 -Subject: [PATCH] find cmark with pkgconfig - -Signed-off-by: seth ---- - cmake/Findcmark.cmake | 59 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 59 insertions(+) - create mode 100755 cmake/Findcmark.cmake - -diff --git a/cmake/Findcmark.cmake b/cmake/Findcmark.cmake -new file mode 100755 -index 00000000..9858e5df ---- /dev/null -+++ b/cmake/Findcmark.cmake -@@ -0,0 +1,59 @@ -+# SPDX-FileCopyrightText: 2019 Black Hat -+# SPDX-License-Identifier: GPL-3.0-only -+ -+# -+# CMake module to search for the cmark library -+# -+ -+# first try to find cmark-config.cmake -+# path to a file not in the search path can be set with 'cmake -Dcmark_DIR=some/path/' -+find_package(cmark CONFIG QUIET) -+if(cmark_FOUND AND TARGET cmark::cmark) -+ # found it! -+ return() -+endif() -+ -+find_package(PkgConfig QUIET) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PC_CMARK QUIET cmark) -+endif() -+ -+if(NOT CMARK_INCLUDE_DIR) -+ find_path(CMARK_INCLUDE_DIR -+ NAMES cmark.h -+ PATHS -+ ${PC_CMARK_INCLUDEDIR} -+ ${PC_CMARK_INCLUDE_DIRS} -+ /usr/include -+ /usr/local/include) -+endif() -+ -+if(NOT CMARK_LIBRARY) -+ find_library(CMARK_LIBRARY -+ NAMES cmark -+ HINTS -+ ${PC_CMARK_LIBDIR} -+ ${PC_CMARK_LIBRARY_DIRS} -+ /usr/lib -+ /usr/local/lib) -+endif() -+ -+if(NOT TARGET cmark::cmark) -+ add_library(cmark::cmark UNKNOWN IMPORTED) -+ set_target_properties(cmark::cmark -+ PROPERTIES INTERFACE_INCLUDE_DIRECTORIES -+ ${CMARK_INCLUDE_DIR}) -+ set_property(TARGET cmark::cmark APPEND -+ PROPERTY IMPORTED_LOCATION ${CMARK_LIBRARY}) -+endif() -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(cmark -+ DEFAULT_MSG -+ CMARK_INCLUDE_DIR -+ CMARK_LIBRARY) -+ -+mark_as_advanced(CMARK_LIBRARY CMARK_INCLUDE_DIR) -+ -+set(CMARK_LIBRARIES ${CMARK_LIBRARY}) -+set(CMARK_INCLUDE_DIRS ${CMARK_INCLUDE_DIR}) --- -2.39.0 - diff --git a/anda/games/prismlauncher-qt5-nightly/prismlauncher-qt5-nightly.spec b/anda/games/prismlauncher-qt5-nightly/prismlauncher-qt5-nightly.spec index fd208d424f..b91a0d7adf 100644 --- a/anda/games/prismlauncher-qt5-nightly/prismlauncher-qt5-nightly.spec +++ b/anda/games/prismlauncher-qt5-nightly/prismlauncher-qt5-nightly.spec @@ -38,23 +38,26 @@ %global build_platform CentOS %endif +%if %{with qt6} +Name: prismlauncher-nightly +%else Name: prismlauncher-qt5-nightly +%endif Version: 7.0^%{snapshot_info} -Release: 1%{?dist} +Release: %autorelease Summary: Minecraft launcher with ability to manage multiple instances -License: GPL-3.0-only +License: GPL-3.0-only AND Apache-2.0 AND LGPL-3.0-only AND GPL-3.0-or-later AND GPL-2.0-or-later AND ISC AND OFL-1.1 AND LGPL-2.1-only AND MIT AND BSD-2-Clause-FreeBSD AND BSD-3-Clause AND LGPL-3.0-or-later Group: Amusements/Games URL: https://prismlauncher.org/ Source0: https://github.com/PrismLauncher/PrismLauncher/archive/%{commit}/%{real_name}-%{shortcommit}.tar.gz Source1: https://github.com/PrismLauncher/libnbtplusplus/archive/%{libnbtplusplus_commit}/libnbtplusplus-%{libnbtplusplus_commit}.tar.gz Source2: https://github.com/stachenov/quazip/archive/%{quazip_commit}/quazip-%{quazip_commit}.tar.gz Source3: https://github.com/marzer/tomlplusplus/archive/%{tomlplusplus_commit}/tomlplusplus-%{tomlplusplus_commit}.tar.gz -Patch0: 0001-find-cmark-with-pkgconfig.patch BuildRequires: cmake >= 3.15 BuildRequires: extra-cmake-modules BuildRequires: gcc-c++ -BuildRequires: java-devel >= 17 +BuildRequires: java-17-openjdk-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: cmake(ghc_filesystem) @@ -71,8 +74,6 @@ BuildRequires: cmake(Qt6Core5Compat) %endif BuildRequires: pkgconfig(libcmark) -# https://bugzilla.redhat.com/show_bug.cgi?id=2166815 -BuildRequires: cmark BuildRequires: pkgconfig(scdoc) BuildRequires: pkgconfig(zlib) @@ -82,7 +83,7 @@ Requires(postun): desktop-file-utils Requires: qt%{qt_version}-qtimageformats Requires: qt%{qt_version}-qtsvg Requires: javapackages-filesystem -Requires: java >= 17 +Requires: java-17-openjdk Requires: java-1.8.0-openjdk # xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 @@ -92,9 +93,11 @@ Recommends: flite # Prism supports enabling gamemode Suggests: gamemode -Conflicts: prismlauncher -Conflicts: prismlauncher-qt5 -Conflicts: primslauncher-nightly +Conflicts: %{real_name} +Conflicts: %{real_name}-qt5 +%if %{without qt6} +Conflicts: %{real_name}-nightly +%endif %description @@ -109,7 +112,7 @@ tar -xzf %{SOURCE1} -C libraries tar -xvf %{SOURCE2} -C libraries tar -xvf %{SOURCE3} -C libraries -rmdir libraries/{libnbtplusplus,quazip,tomlplusplus}/ +rmdir libraries/{extra-cmake-modules,filesystem,libnbtplusplus,quazip,tomlplusplus,zlib}/ mv -f libraries/libnbtplusplus-%{libnbtplusplus_commit} libraries/libnbtplusplus mv -f libraries/quazip-%{quazip_commit} libraries/quazip mv -f libraries/tomlplusplus-%{tomlplusplus_commit} libraries/tomlplusplus @@ -138,24 +141,26 @@ sed -i "s|\$ORIGIN/||" CMakeLists.txt %check -## disabled due to inconsistent results in copr builds that are not reproducible locally -%dnl %ctest +%ctest -%if 0%{?fedora} > 35 -appstream-util validate-relax --nonet \ - %{buildroot}%{_metainfodir}/org.prismlauncher.PrismLauncher.metainfo.xml -%endif +%if 0%{?rhel} > 8 +# disabled due to rhel not shipping a new enough version of libappstream-glib +# appstream-util validate-relax --nonet \ +# %{buildroot}%{_metainfodir}/org.prismlauncher.PrismLauncher.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/org.prismlauncher.PrismLauncher.desktop - +%endif %post +%if 0%{?rhel} > 8 /usr/bin/update-desktop-database &> /dev/null || : /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /bin/touch --no-create %{_datadir}/mime/packages &>/dev/null || : +%endif %postun +%if 0%{?rhel} > 8 /usr/bin/update-desktop-database &> /dev/null || : if [ $1 -eq 0 ] ; then @@ -163,18 +168,21 @@ if [ $1 -eq 0 ] ; then /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : fi +%endif %posttrans +%if 0%{?rhel} > 8 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : +%endif %files %doc README.md %license LICENSE COPYING.md %dir %{_datadir}/%{real_name} -%{_bindir}/prismlauncher +%{_bindir}/%{real_name} %{_datadir}/%{real_name}/NewLaunch.jar %{_datadir}/%{real_name}/JavaCheck.jar %{_datadir}/applications/org.prismlauncher.PrismLauncher.desktop @@ -187,13 +195,16 @@ fi %changelog +* Wed Jun 07 2023 seth - 7.0^20230603.954d4d7-1 +- specify jdk 17 + cleanup outdated patches/scriptlets + * Sun May 14 2023 seth - 7.0^20230513.c5aff7c-1 - add qtlogging.ini to files list * Mon Mar 20 2023 seth - 7.0^20230319.6dcf34a-1 - recommend flite to support narrator in minecraft -* Fri Feb 03 2023 seth flynn - 7.0^20230203.58d9ced-1 +* Fri Feb 03 2023 seth - 7.0^20230203.58d9ced-1 - disable tests and explicitly require cmark * Sun Jan 15 2023 seth - 7.0^20230115.f1247d2-1 diff --git a/anda/games/prismlauncher-qt5/0001-find-cmark-with-pkgconfig.patch b/anda/games/prismlauncher-qt5/0001-find-cmark-with-pkgconfig.patch deleted file mode 100644 index d41ef66bec..0000000000 --- a/anda/games/prismlauncher-qt5/0001-find-cmark-with-pkgconfig.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 5a38fc2c9a329e88c8337af541dfeccaeff1fefb Mon Sep 17 00:00:00 2001 -From: seth -Date: Sun, 15 Jan 2023 14:47:49 -0500 -Subject: [PATCH] find cmark with pkgconfig - -Signed-off-by: seth ---- - cmake/Findcmark.cmake | 59 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 59 insertions(+) - create mode 100755 cmake/Findcmark.cmake - -diff --git a/cmake/Findcmark.cmake b/cmake/Findcmark.cmake -new file mode 100755 -index 00000000..9858e5df ---- /dev/null -+++ b/cmake/Findcmark.cmake -@@ -0,0 +1,59 @@ -+# SPDX-FileCopyrightText: 2019 Black Hat -+# SPDX-License-Identifier: GPL-3.0-only -+ -+# -+# CMake module to search for the cmark library -+# -+ -+# first try to find cmark-config.cmake -+# path to a file not in the search path can be set with 'cmake -Dcmark_DIR=some/path/' -+find_package(cmark CONFIG QUIET) -+if(cmark_FOUND AND TARGET cmark::cmark) -+ # found it! -+ return() -+endif() -+ -+find_package(PkgConfig QUIET) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PC_CMARK QUIET cmark) -+endif() -+ -+if(NOT CMARK_INCLUDE_DIR) -+ find_path(CMARK_INCLUDE_DIR -+ NAMES cmark.h -+ PATHS -+ ${PC_CMARK_INCLUDEDIR} -+ ${PC_CMARK_INCLUDE_DIRS} -+ /usr/include -+ /usr/local/include) -+endif() -+ -+if(NOT CMARK_LIBRARY) -+ find_library(CMARK_LIBRARY -+ NAMES cmark -+ HINTS -+ ${PC_CMARK_LIBDIR} -+ ${PC_CMARK_LIBRARY_DIRS} -+ /usr/lib -+ /usr/local/lib) -+endif() -+ -+if(NOT TARGET cmark::cmark) -+ add_library(cmark::cmark UNKNOWN IMPORTED) -+ set_target_properties(cmark::cmark -+ PROPERTIES INTERFACE_INCLUDE_DIRECTORIES -+ ${CMARK_INCLUDE_DIR}) -+ set_property(TARGET cmark::cmark APPEND -+ PROPERTY IMPORTED_LOCATION ${CMARK_LIBRARY}) -+endif() -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(cmark -+ DEFAULT_MSG -+ CMARK_INCLUDE_DIR -+ CMARK_LIBRARY) -+ -+mark_as_advanced(CMARK_LIBRARY CMARK_INCLUDE_DIR) -+ -+set(CMARK_LIBRARIES ${CMARK_LIBRARY}) -+set(CMARK_INCLUDE_DIRS ${CMARK_INCLUDE_DIR}) --- -2.39.0 - diff --git a/anda/games/prismlauncher-qt5/prismlauncher-qt5.spec b/anda/games/prismlauncher-qt5/prismlauncher-qt5.spec index 21158e0409..39bb132edd 100644 --- a/anda/games/prismlauncher-qt5/prismlauncher-qt5.spec +++ b/anda/games/prismlauncher-qt5/prismlauncher-qt5.spec @@ -1,4 +1,4 @@ -%define real_name prismlauncher +%global real_name prismlauncher %bcond_with qt6 # Change this variables if you want to use custom keys @@ -28,20 +28,25 @@ %global build_platform CentOS %endif +%if %{with qt6} +Name: prismlauncher +%else Name: prismlauncher-qt5 +%endif Version: 6.3 -Release: 2%{?dist} +Release: %autorelease Summary: Minecraft launcher with ability to manage multiple instances -License: GPL-3.0-only +# see COPYING.md for more information +# each file in the source also contains a SPDX-License-Identifier header that declares its license +License: GPL-3.0-only AND Apache-2.0 AND LGPL-3.0-only AND GPL-3.0-or-later AND GPL-2.0-or-later AND ISC AND OFL-1.1 AND LGPL-2.1-only AND MIT AND BSD-2-Clause-FreeBSD AND BSD-3-Clause AND LGPL-3.0-or-later Group: Amusements/Games URL: https://prismlauncher.org/ Source0: https://github.com/PrismLauncher/PrismLauncher/releases/download/%{version}/%{real_name}-%{version}.tar.gz -Patch0: 0001-find-cmark-with-pkgconfig.patch BuildRequires: cmake >= 3.15 BuildRequires: extra-cmake-modules BuildRequires: gcc-c++ -BuildRequires: java-devel >= 17 +BuildRequires: java-17-openjdk-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: cmake(ghc_filesystem) @@ -58,8 +63,6 @@ BuildRequires: cmake(Qt6Core5Compat) %endif BuildRequires: pkgconfig(libcmark) -# https://bugzilla.redhat.com/show_bug.cgi?id=2166815 -BuildRequires: cmark BuildRequires: pkgconfig(scdoc) BuildRequires: pkgconfig(zlib) @@ -69,7 +72,7 @@ Requires(postun): desktop-file-utils Requires: qt%{qt_version}-qtimageformats Requires: qt%{qt_version}-qtsvg Requires: javapackages-filesystem -Requires: java >= 17 +Requires: java-17-openjdk Requires: java-1.8.0-openjdk # xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 @@ -79,8 +82,9 @@ Recommends: flite # Prism supports enabling gamemode Suggests: gamemode -Conflicts: prismlauncher - +%if %{without qt6} +Conflicts: %{real_name} +%endif %description A custom launcher for Minecraft that allows you to easily manage @@ -88,7 +92,9 @@ multiple installations of Minecraft at once (Fork of MultiMC) %prep -%autosetup -p1 -n PrismLauncher-%{version} +%autosetup -n PrismLauncher-%{version} + +rm -rf libraries/{extra-cmake-modules,filesystem,zlib} # Do not set RPATH sed -i "s|\$ORIGIN/||" CMakeLists.txt @@ -114,35 +120,41 @@ sed -i "s|\$ORIGIN/||" CMakeLists.txt %check -## disabled due to inconsistent results in copr builds that are not reproducible locally -%dnl %ctest +%ctest -%if 0%{?fedora} > 35 -appstream-util validate-relax --nonet \ - %{buildroot}%{_metainfodir}/org.prismlauncher.PrismLauncher.metainfo.xml -%endif +%if 0%{?rhel} > 8 +# disabled due to rhel not shipping a new enough version of libappstream-glib +# appstream-util validate-relax --nonet \ +# %{buildroot}%{_metainfodir}/org.prismlauncher.PrismLauncher.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/org.prismlauncher.PrismLauncher.desktop +%endif %post +%if 0%{?rhel} > 8 /usr/bin/update-desktop-database &> /dev/null || : /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /bin/touch --no-create %{_datadir}/mime/packages &>/dev/null || : +%endif %postun +%if 0%{?rhel} > 8 /usr/bin/update-desktop-database &> /dev/null || : if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : fi +%endif %posttrans +%if 0%{?rhel} > 8 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : +%endif %files @@ -161,6 +173,9 @@ fi %changelog +* Thu Jun 08 2023 seth - 6.3-3 +- specify jdk 17 + cleanup outdated patches/scriptlets + * Mon Mar 20 2023 seth - 6.3-2 - recommend flite to support narrator in minecraft diff --git a/anda/games/prismlauncher/0001-find-cmark-with-pkgconfig.patch b/anda/games/prismlauncher/0001-find-cmark-with-pkgconfig.patch deleted file mode 100644 index d41ef66bec..0000000000 --- a/anda/games/prismlauncher/0001-find-cmark-with-pkgconfig.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 5a38fc2c9a329e88c8337af541dfeccaeff1fefb Mon Sep 17 00:00:00 2001 -From: seth -Date: Sun, 15 Jan 2023 14:47:49 -0500 -Subject: [PATCH] find cmark with pkgconfig - -Signed-off-by: seth ---- - cmake/Findcmark.cmake | 59 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 59 insertions(+) - create mode 100755 cmake/Findcmark.cmake - -diff --git a/cmake/Findcmark.cmake b/cmake/Findcmark.cmake -new file mode 100755 -index 00000000..9858e5df ---- /dev/null -+++ b/cmake/Findcmark.cmake -@@ -0,0 +1,59 @@ -+# SPDX-FileCopyrightText: 2019 Black Hat -+# SPDX-License-Identifier: GPL-3.0-only -+ -+# -+# CMake module to search for the cmark library -+# -+ -+# first try to find cmark-config.cmake -+# path to a file not in the search path can be set with 'cmake -Dcmark_DIR=some/path/' -+find_package(cmark CONFIG QUIET) -+if(cmark_FOUND AND TARGET cmark::cmark) -+ # found it! -+ return() -+endif() -+ -+find_package(PkgConfig QUIET) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PC_CMARK QUIET cmark) -+endif() -+ -+if(NOT CMARK_INCLUDE_DIR) -+ find_path(CMARK_INCLUDE_DIR -+ NAMES cmark.h -+ PATHS -+ ${PC_CMARK_INCLUDEDIR} -+ ${PC_CMARK_INCLUDE_DIRS} -+ /usr/include -+ /usr/local/include) -+endif() -+ -+if(NOT CMARK_LIBRARY) -+ find_library(CMARK_LIBRARY -+ NAMES cmark -+ HINTS -+ ${PC_CMARK_LIBDIR} -+ ${PC_CMARK_LIBRARY_DIRS} -+ /usr/lib -+ /usr/local/lib) -+endif() -+ -+if(NOT TARGET cmark::cmark) -+ add_library(cmark::cmark UNKNOWN IMPORTED) -+ set_target_properties(cmark::cmark -+ PROPERTIES INTERFACE_INCLUDE_DIRECTORIES -+ ${CMARK_INCLUDE_DIR}) -+ set_property(TARGET cmark::cmark APPEND -+ PROPERTY IMPORTED_LOCATION ${CMARK_LIBRARY}) -+endif() -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(cmark -+ DEFAULT_MSG -+ CMARK_INCLUDE_DIR -+ CMARK_LIBRARY) -+ -+mark_as_advanced(CMARK_LIBRARY CMARK_INCLUDE_DIR) -+ -+set(CMARK_LIBRARIES ${CMARK_LIBRARY}) -+set(CMARK_INCLUDE_DIRS ${CMARK_INCLUDE_DIR}) --- -2.39.0 - diff --git a/anda/games/prismlauncher/prismlauncher.spec b/anda/games/prismlauncher/prismlauncher.spec index 7fb6a02b25..2988d2da3c 100644 --- a/anda/games/prismlauncher/prismlauncher.spec +++ b/anda/games/prismlauncher/prismlauncher.spec @@ -1,3 +1,4 @@ +%global real_name prismlauncher %bcond_without qt6 # Change this variables if you want to use custom keys @@ -27,20 +28,25 @@ %global build_platform CentOS %endif +%if %{with qt6} Name: prismlauncher +%else +Name: prismlauncher-qt5 +%endif Version: 6.3 -Release: 2%{?dist} +Release: %autorelease Summary: Minecraft launcher with ability to manage multiple instances -License: GPL-3.0-only +# see COPYING.md for more information +# each file in the source also contains a SPDX-License-Identifier header that declares its license +License: GPL-3.0-only AND Apache-2.0 AND LGPL-3.0-only AND GPL-3.0-or-later AND GPL-2.0-or-later AND ISC AND OFL-1.1 AND LGPL-2.1-only AND MIT AND BSD-2-Clause-FreeBSD AND BSD-3-Clause AND LGPL-3.0-or-later Group: Amusements/Games URL: https://prismlauncher.org/ -Source0: https://github.com/PrismLauncher/PrismLauncher/releases/download/%{version}/%{name}-%{version}.tar.gz -Patch0: 0001-find-cmark-with-pkgconfig.patch +Source0: https://github.com/PrismLauncher/PrismLauncher/releases/download/%{version}/%{real_name}-%{version}.tar.gz BuildRequires: cmake >= 3.15 BuildRequires: extra-cmake-modules BuildRequires: gcc-c++ -BuildRequires: java-devel >= 17 +BuildRequires: java-17-openjdk-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: cmake(ghc_filesystem) @@ -57,8 +63,6 @@ BuildRequires: cmake(Qt6Core5Compat) %endif BuildRequires: pkgconfig(libcmark) -# https://bugzilla.redhat.com/show_bug.cgi?id=2166815 -BuildRequires: cmark BuildRequires: pkgconfig(scdoc) BuildRequires: pkgconfig(zlib) @@ -68,7 +72,7 @@ Requires(postun): desktop-file-utils Requires: qt%{qt_version}-qtimageformats Requires: qt%{qt_version}-qtsvg Requires: javapackages-filesystem -Requires: java >= 17 +Requires: java-17-openjdk Requires: java-1.8.0-openjdk # xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 @@ -78,6 +82,9 @@ Recommends: flite # Prism supports enabling gamemode Suggests: gamemode +%if %{without qt6} +Conflicts: %{real_name} +%endif %description A custom launcher for Minecraft that allows you to easily manage @@ -85,7 +92,9 @@ multiple installations of Minecraft at once (Fork of MultiMC) %prep -%autosetup -p1 -n PrismLauncher-%{version} +%autosetup -n PrismLauncher-%{version} + +rm -rf libraries/{extra-cmake-modules,filesystem,zlib} # Do not set RPATH sed -i "s|\$ORIGIN/||" CMakeLists.txt @@ -111,44 +120,50 @@ sed -i "s|\$ORIGIN/||" CMakeLists.txt %check -## disabled due to inconsistent results in copr builds that are not reproducible locally -%dnl %ctest +%ctest -%if 0%{?fedora} > 35 -appstream-util validate-relax --nonet \ - %{buildroot}%{_metainfodir}/org.prismlauncher.PrismLauncher.metainfo.xml -%endif +%if 0%{?rhel} > 8 +# disabled due to rhel not shipping a new enough version of libappstream-glib +# appstream-util validate-relax --nonet \ +# %{buildroot}%{_metainfodir}/org.prismlauncher.PrismLauncher.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/org.prismlauncher.PrismLauncher.desktop +%endif %post +%if 0%{?rhel} > 8 /usr/bin/update-desktop-database &> /dev/null || : /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /bin/touch --no-create %{_datadir}/mime/packages &>/dev/null || : +%endif %postun +%if 0%{?rhel} > 8 /usr/bin/update-desktop-database &> /dev/null || : if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : fi +%endif %posttrans +%if 0%{?rhel} > 8 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : +%endif %files %doc README.md %license LICENSE COPYING.md -%dir %{_datadir}/%{name} +%dir %{_datadir}/%{real_name} %{_bindir}/prismlauncher -%{_datadir}/%{name}/NewLaunch.jar -%{_datadir}/%{name}/JavaCheck.jar +%{_datadir}/%{real_name}/NewLaunch.jar +%{_datadir}/%{real_name}/JavaCheck.jar %{_datadir}/applications/org.prismlauncher.PrismLauncher.desktop %{_datadir}/icons/hicolor/scalable/apps/org.prismlauncher.PrismLauncher.svg %{_datadir}/mime/packages/modrinth-mrpack-mime.xml @@ -158,6 +173,9 @@ fi %changelog +* Thu Jun 08 2023 seth - 6.3-3 +- specify jdk 17 + cleanup outdated patches/scriptlets + * Mon Mar 20 2023 seth - 6.3-2 - recommend flite to support narrator in minecraft