ghc-rpm-macros/suse-disable-debug-packages.patch

33 lines
1.4 KiB
Diff

Index: ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/ghc-rpm-macros.ghc
===================================================================
--- ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52.orig/ghc-rpm-macros.ghc
+++ ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/ghc-rpm-macros.ghc
@@ -78,15 +78,25 @@ done\
install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\
%{nil}
+# ghc_suse_disable_debug_packages
+%ghc_suse_disable_debug_packages\
+%global debug_package %{nil}\
+%global __debug_install_post %{nil}\
+%global suse_insert_debug_package %{nil}\
+echo "/usr/lib/debug" > debugfiles.list\
+mkdir -p %{buildroot}/usr/lib/debug\
+echo "/usr/src/debug" > debugsources.list\
+mkdir -p %{buildroot}/usr/src/debug
+
# ghc_bin_build
%ghc_bin_build\
-%global debug_package %{nil}\
+%ghc_suse_disable_debug_packages\
%cabal_configure\
%cabal build
# ghc_lib_build_without_haddock [name] [version]
%ghc_lib_build_without_haddock()\
-%global debug_package %{nil}\
+%ghc_suse_disable_debug_packages\
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\
%cabal build\
%{nil}