diff --git a/disable-debuginfo.patch b/disable-debuginfo.patch new file mode 100644 index 0000000000000000000000000000000000000000..5619a97cdc9b40b8462a3f8ac6c0b1f5516dcc40 --- /dev/null +++ b/disable-debuginfo.patch @@ -0,0 +1,20 @@ +diff --color -Naur origin/ghc-rpm-macros-2.5.2/macros.ghc ghc-rpm-macros-2.5.2/macros.ghc +--- origin/ghc-rpm-macros-2.5.2/macros.ghc 2024-11-25 15:20:50.898572173 +0800 ++++ ghc-rpm-macros-2.5.2/macros.ghc 2024-11-25 15:21:37.198575587 +0800 +@@ -12,14 +12,14 @@ + # ghc_bin_build: -W: use default ghc (ie ignore ghc_name) + %ghc_bin_build(W)\ + %ghc_fix_doc_perms\ +-%{?!ghc_debuginfo:%undefine _enable_debug_packages}\ ++%{?!ghc_debuginfo:%global debug_package %{nil}}\ + %cabal_configure\ + %cabal build %{?ghc_smp_mflags} %{?cabal_build_options} + + # ghc_lib_build_without_haddock [name] [version] + %ghc_lib_build_without_haddock()\ + %ghc_fix_doc_perms\ +-%{?!ghc_debuginfo:%undefine _enable_debug_packages}\ ++%{?!ghc_debuginfo:%global debug_package %{nil}}\ + %if 0%{?rhel} && 0%{?rhel} < 8\ + licensedirversion=%{?2:-%2}\ + %endif\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f1b22572a3ef82801efa5b38af62d3c09b11465c..ad52e8e2034c41f408ee022bafea91315c064e24 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,12 +1,14 @@ Name: ghc-rpm-macros Version: 2.5.2 -Release: 2 +Release: 3 Summary: RPM Macros for building packages for GHC License: GPL-3.0-or-later URL: https://src.fedoraproject.org/rpms/ghc-rpm-macros Source0: %{name}-%{version}.tar.xz # In openEuler, we use help as documents package's suffix instead of doc. Patch1: using-help-as-doc-packages-suffix.patch +# Use debug_package instead of _enable_debug_packages to disable debuginfo. +Patch2: disable-debuginfo.patch BuildRequires: xz Requires: rpm Requires: chrpath @@ -61,6 +63,9 @@ install -p -D -m 0644 Setup.hs %{buildroot}/%{_datadir}/%{name}/Setup.hs %{_rpmmacrodir}/macros.ghc-extra %changelog +* Mon Nov 25 2024 Lin Runze 2.5.2-3 +- Use debug_package instead of _enable_debug_packages to disable debuginfo + * Fri Aug 16 2024 Lin Runze 2.5.2-2 - Revert to 2.5.2 due to 2.6.4 is incompatible with ghc 9.6.3