From 3c1ee9b06ab223af7e136b5f2d124fe5d05e6f48 Mon Sep 17 00:00:00 2001 From: Lin Runze Date: Fri, 20 Sep 2024 21:53:31 +0800 Subject: [PATCH] Enable retrying after build failed (cherry picked from commit c94ec2b7ddba91bdfea6805ab8cdc0de5f1ea18d) --- ghc-pandoc.spec | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/ghc-pandoc.spec b/ghc-pandoc.spec index 3ac471e..3183341 100644 --- a/ghc-pandoc.spec +++ b/ghc-pandoc.spec @@ -4,7 +4,7 @@ Name: ghc-%{pkg_name} Version: 3.1.9 -Release: 1 +Release: 2 Summary: Conversion between markup formats License: GPL-2.0-or-later URL: https://hackage.haskell.org/package/%{pkg_name} @@ -214,7 +214,20 @@ This package provides the Haskell %{pkg_name} profiling library. %autosetup -n %{pkg_name}-%{version} %build -%ghc_lib_build +%ghc_fix_doc_perms +%{?!ghc_debuginfo:%undefine _enable_debug_packages} +%cabal_configure %{?with_ghc_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} +until %cabal build %{?ghc_smp_mflags} %{?cabal_build_options} +do + echo "Build failed, retrying..." +done +%if %{with haddock} +%define pkgname %{?1}%{!?1:%{pkg_name}} +%define pkgver %{?2}%{!?2:%{version}} +if [ -n dist/build/libHS%{pkgname}-%{pkgver}*.so ]; then +%cabal haddock --html --hyperlink-source --hoogle %{?cabal_haddock_options} +fi +%endif %install %ghc_lib_install @@ -403,7 +416,11 @@ This package provides the Haskell %{pkg_name} profiling library. %files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files %changelog -* Wed Nov 22 2023 Lin Runze 3.1.3-1 +* Fri Sep 20 2024 Lin Runze 3.1.9-2 +- Enable retrying after build failed + +* Wed Nov 22 2023 Lin Runze 3.1.9-1 - Bump version to 3.1.9 + * Thu Sep 28 2023 Lin Runze 3.1.3-1 - Initial packaging (Version 3.1.3) -- Gitee