add no-prof subpackage: disables building prof subpackages

overriding ghc-srpm-macros
epel9
Jens Petersen 12 months ago
parent 000d471347
commit bb2f1ebea3

@ -28,6 +28,7 @@ Source10: Setup.hs
Source11: cabal-tweak-drop-dep Source11: cabal-tweak-drop-dep
Source12: cabal-tweak-remove-upperbound Source12: cabal-tweak-remove-upperbound
Source13: ghc-info.sh Source13: ghc-info.sh
Source14: macros.ghc-srpm-no-prof
Requires: redhat-rpm-config Requires: redhat-rpm-config
# ghc_version needs ghc-compiler or ghcX.Y-compiler-default # ghc_version needs ghc-compiler or ghcX.Y-compiler-default
Requires: chrpath Requires: chrpath
@ -47,6 +48,16 @@ Extra macros used for subpackaging of Haskell libraries,
for example in ghc and haskell-platform. 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 %if 0%{?fedora} < 37
%package -n ghc-filesystem %package -n ghc-filesystem
Summary: Shared directories for Haskell documentation 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 %{SOURCE0} %{buildroot}%{macros_dir}/macros.ghc
install -p -D -m 0644 %{SOURCE6} %{buildroot}%{macros_dir}/macros.ghc-extra 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 %{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 %if 0%{?fedora} < 38
echo -e "\n%%_ghcdynlibdir %%{_libdir}" >> %{buildroot}%{macros_dir}/macros.ghc-os 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 %{macros_dir}/macros.ghc-extra
%files no-prof
%{macros_dir}/macros.ghc-srpm-no-prof
%if 0%{?fedora} < 37 %if 0%{?fedora} < 37
%files -n ghc-filesystem %files -n ghc-filesystem
%dir %{_docdir}/ghc %dir %{_docdir}/ghc
@ -186,6 +202,7 @@ mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries
%changelog %changelog
* Mon Feb 19 2024 Jens Petersen <petersen@redhat.com> - 2.6.6-1 * Mon Feb 19 2024 Jens Petersen <petersen@redhat.com> - 2.6.6-1
- new no-prof subpackage to disable building prof subpackages locally
- cabal_test: drop conditional since it is in cabal-rpm - cabal_test: drop conditional since it is in cabal-rpm
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.5-3 * Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.5-3

@ -0,0 +1,2 @@
# enable profiling libraries in prof subpkgs
with_ghc_prof 0
Loading…
Cancel
Save