From bb2f1ebea3f0670ae8fdf41a22488e3bca82be7b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 19 Feb 2024 18:23:24 +0800 Subject: [PATCH] add no-prof subpackage: disables building prof subpackages overriding ghc-srpm-macros --- ghc-rpm-macros.spec | 17 +++++++++++++++++ macros.ghc-srpm-no-prof | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 macros.ghc-srpm-no-prof diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 18db9e4..5035263 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -28,6 +28,7 @@ Source10: Setup.hs Source11: cabal-tweak-drop-dep Source12: cabal-tweak-remove-upperbound Source13: ghc-info.sh +Source14: macros.ghc-srpm-no-prof Requires: redhat-rpm-config # ghc_version needs ghc-compiler or ghcX.Y-compiler-default Requires: chrpath @@ -47,6 +48,16 @@ Extra macros used for subpackaging of Haskell libraries, for example in ghc and haskell-platform. +%package no-prof +Summary: Disables building of ghc prof subpackages +Requires: %{name} = %{version}-%{release} + +%description no-prof +Overrides ghc-srpm-macros to disable building ghc prof subpackages locally. + +This should not be used in official Fedora builds. + + %if 0%{?fedora} < 37 %package -n ghc-filesystem Summary: Shared directories for Haskell documentation @@ -122,6 +133,7 @@ echo no build stage install -p -D -m 0644 %{SOURCE0} %{buildroot}%{macros_dir}/macros.ghc install -p -D -m 0644 %{SOURCE6} %{buildroot}%{macros_dir}/macros.ghc-extra install -p -D -m 0644 %{SOURCE9} %{buildroot}%{macros_dir}/macros.ghc-os +install -p -D -m 0644 %{SOURCE14} %{buildroot}%{macros_dir}/macros.ghc-srpm-no-prof %if 0%{?fedora} < 38 echo -e "\n%%_ghcdynlibdir %%{_libdir}" >> %{buildroot}%{macros_dir}/macros.ghc-os @@ -169,6 +181,10 @@ mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries %{macros_dir}/macros.ghc-extra +%files no-prof +%{macros_dir}/macros.ghc-srpm-no-prof + + %if 0%{?fedora} < 37 %files -n ghc-filesystem %dir %{_docdir}/ghc @@ -186,6 +202,7 @@ mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries %changelog * Mon Feb 19 2024 Jens Petersen - 2.6.6-1 +- new no-prof subpackage to disable building prof subpackages locally - cabal_test: drop conditional since it is in cabal-rpm * Wed Jan 24 2024 Fedora Release Engineering - 2.6.5-3 diff --git a/macros.ghc-srpm-no-prof b/macros.ghc-srpm-no-prof new file mode 100644 index 0000000..ffb27e3 --- /dev/null +++ b/macros.ghc-srpm-no-prof @@ -0,0 +1,2 @@ +# enable profiling libraries in prof subpkgs +with_ghc_prof 0