@ -7,11 +7,11 @@
%endif
Name: ghc-rpm-macros
Version: 2.4.4
Version: 2.7.2
Release: 1%{?dist}
Summary: RPM macros for building Haskell packages for GHC
License: GPLv3+
License: GPL-3.0-or-later
# Currently source is only in pkg git but tarballs could be made if it helps
URL: https://src.fedoraproject.org/rpms/ghc-rpm-macros/
Source0: macros.ghc
@ -27,6 +27,8 @@ Source9: macros.ghc-os
Source10: Setup.hs
Source11: cabal-tweak-drop-dep
Source12: cabal-tweak-remove-upperbound
Source13: ghc-info.sh
Source14: macros.ghc-srpm-quick
Requires: redhat-rpm-config
# ghc_version needs ghc-compiler or ghcX.Y-compiler-default
Requires: chrpath
@ -46,6 +48,20 @@ Extra macros used for subpackaging of Haskell libraries,
for example in ghc and haskell-platform.
%package quick
Summary: Disables building of ghc prof and doc subpackages
Requires: %{name} = %{version}-%{release}
# added during F40 cycle
Obsoletes: %{name}-no-prof < %{version}-%{release}
Provides: %{name}-no-prof = %{version}-%{release}
%description quick
Overrides ghc-srpm-macros to disable building ghc prof and doc 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
@ -60,34 +76,10 @@ Haskell libraries documentation.
# this is a last resort when there is no such appropriate package
%package -n ghc-obsoletes
Summary: Dummy package to obsolete deprecated Haskell packages
%if 0%{?fedora} >= 29
Obsoletes: ghc-content-store < 0.2.1-3, ghc-content-store-devel < 0.2.1-3
Obsoletes: ghc-bdcs < 0.6.1-3, ghc-bdcs-devel < 0.6.1-3
Obsoletes: ghc-bdcs-api < 0.1.3-3, ghc-bdcs-api-devel < 0.1.3-3
%endif
%if 0%{?fedora} >= 30
# ghc
Obsoletes: ghc-hoopl < 3.10.2.2-74, ghc-hoopl-devel < 3.10.2.2-74
# language-ecmascript
Obsoletes: ghc-tagshare < 0.0-10, ghc-tagshare-devel < 0.0-10
Obsoletes: ghc-testing-feat < 0.4.0.3-10, ghc-testing-feat-devel < 0.4.0.3-10
# enumerator
Obsoletes: ghc-enumerator < 0.4.20-12, ghc-enumerator-devel < 0.4.20-12
Obsoletes: ghc-attoparsec-enumerator < 0.3.4-10, ghc-attoparsec-enumerator-devel < 0.3.4-10
Obsoletes: ghc-blaze-builder-enumerator < 0.2.1.0-8, ghc-blaze-builder-enumerator-devel < 0.2.1.0-8
Obsoletes: ghc-zlib-enum < 0.2.3.1-12, ghc-zlib-enum-devel < 0.2.3.1-12
# Agda
Obsoletes: ghc-monadplus < 1.4.2-17, ghc-monadplus-devel < 1.4.2-17
# conduit-combinators
Obsoletes: ghc-conduit-combinators < 1.3.1
%endif
%if 0%{?fedora} >= 31
# base package obsoleted above in f30
Obsoletes: ghc-conduit-combinators-devel < 1.3.1
%endif
%if 0%{?fedora} >= 32
Obsoletes: ghc-derive < 2.6.5-5, ghc-derive-devel < 2.6.5-5, ghc-derive-prof < 2.6.5-5
Obsoletes: ghc-here < 1.2.13-17, ghc-here-devel < 1.2.13-17, ghc-here-prof < 1.2.13-17
Obsoletes: ghc-iwlib < 0.1.0-16, ghc-iwlib-devel < 0.1.0-16, ghc-iwlib-prof < 0.1.0-16
%endif
%if 0%{?fedora} >= 33
Obsoletes: ghc-easytest < 0.2.1-4, ghc-easytest-devel < 0.2.1-4, ghc-easytest-prof < 0.2.1-4,
@ -95,7 +87,6 @@ Obsoletes: ghc-EdisonAPI < 1.3.1-23, ghc-EdisonAPI-devel < 1.3.1-23, ghc-Ed
Obsoletes: ghc-EdisonCore < 1.3.2.1-23, ghc-EdisonCore-devel < 1.3.2.1-23, ghc-EdisonCore-prof < 1.3.2.1-23
Obsoletes: ghc-gtksourceview2 < 0.13.3.1-14, ghc-gtksourceview2-devel < 0.13.3.1-14, ghc-gtksourceview2-prof < 0.13.3.1-14
%endif
Obsoletes: ghc-iwlib < 0.1.0-16, ghc-iwlib-devel < 0.1.0-16, ghc-iwlib-prof < 0.1.0-16
%if 0%{?fedora} >= 35
Obsoletes: pandoc-citeproc < 0.18, ghc-pandoc-citeproc < 0.18, ghc-pandoc-citeproc-devel < 0.18, ghc-pandoc-citeproc-doc < 0.18, ghc-pandoc-citeproc-prof < 0.18, pandoc-citeproc-common < 0.18
Obsoletes: ghc-base-noprelude < 4.13.0.1, ghc-base-noprelude-devel < 4.13.0.1, ghc-base-noprelude-doc < 4.13.0.1, ghc-base-noprelude-prof < 4.13.0.1
@ -106,6 +97,26 @@ Obsoletes: ghc-cpio-conduit < 0.7.1, ghc-cpio-conduit-devel < 0.7.1, ghc-cp
Obsoletes: ghc-failure < 0.2.0.4, ghc-failure-devel < 0.2.0.4, ghc-failure-doc < 0.2.0.4, ghc-failure-prof < 0.2.0.4
Obsoletes: ghc-attempt < 0.4.0.2, ghc-attempt-devel < 0.4.0.2, ghc-attempt-doc < 0.4.0.2, ghc-attempt-prof < 0.4.0.2
%endif
%if 0%{?fedora} >= 36
Obsoletes: ghc-regex-applicative-text < 0.1.0.1-16, ghc-regex-applicative-text-devel < 0.1.0.1-16, ghc-regex-applicative-text-doc < 0.1.0.1-16, ghc-regex-applicative-text-prof < 0.1.0.1-16
%endif
%if 0%{?fedora} >= 38
Obsoletes: ghc-bytestring-show < 0.3.5.7, ghc-bytestring-show-devel < 0.3.5.7, ghc-bytestring-show-doc < 0.3.5.7, ghc-bytestring-show-prof < 0.3.5.7
Obsoletes: ghc-djinn-ghc < 0.1, ghc-djinn-ghc-devel < 0.1, ghc-djinn-ghc-doc < 0.1, ghc-djinn-ghc-prof < 0.1
Obsoletes: ghc-ghc-mtl < 1.2.2, ghc-ghc-mtl-devel < 1.2.2, ghc-ghc-mtl-doc < 1.2.2, ghc-ghc-mtl-prof < 1.2.2
Obsoletes: ghc-ghc-syb-utils < 0.3.1, ghc-ghc-syb-utils-devel < 0.3.1, ghc-ghc-syb-utils-doc < 0.3.1, ghc-ghc-syb-utils-prof < 0.3.1
Obsoletes: ghc-cabal-helper < 1.2, ghc-cabal-helper-devel < 1.2, ghc-cabal-helper-doc < 1.2, ghc-cabal-helper-prof < 1.2
Obsoletes: ghc-cabal-plan < 0.8, ghc-cabal-plan-devel < 0.8, ghc-cabal-plan-doc < 0.8, ghc-cabal-plan-prof < 0.8
Obsoletes: ghc-optics-core < 0.4, ghc-optics-core-devel < 0.4, ghc-optics-core-doc < 0.4, ghc-optics-core-prof < 0.4
Obsoletes: ghc-semialign < 1.2, ghc-semialign-devel < 1.2, ghc-semialign-doc < 1.2, ghc-semialign-prof < 1.2
Obsoletes: ghc-topograph < 1.0.0.2, ghc-topograph-devel < 1.0.0.2, ghc-topograph-doc < 1.0.0.2, ghc-topograph-prof < 1.0.0.2
Obsoletes: ghc-indexed-profunctors < 0.1.1-18, ghc-indexed-profunctors-devel < 0.1.1-18, ghc-indexed-profunctors-doc < 0.1.1-18, ghc-indexed-profunctors-prof < 0.1.1-18
Obsoletes: ghc-regex-compat-tdfa < 0.95.1.4-38, ghc-regex-compat-tdfa-devel < 0.95.1.4-38, ghc-regex-compat-tdfa-doc < 0.95.1.4-38, ghc-regex-compat-tdfa-prof < 0.95.1.4-38
%endif
%if 0%{?fedora} >= 39
Obsoletes: ghc-geniplate-mirror < 0.7.9-39, ghc-geniplate-mirror-devel < 0.95.1.4-38, ghc-geniplate-mirror-doc < 0.95.1.4-38, ghc-geniplate-mirror-prof < 0.95.1.4-38
Obsoletes: ghc-data-array-byte < 0.1.0.1-3, ghc-data-array-byte-devel < 0.1.0.1-3, ghc-data-array-byte-doc < 0.1.0.1-3, ghc-data-array-byte-prof < 0.1.0.1-3
%endif
%description -n ghc-obsoletes
Meta package for obsoleting deprecated Haskell packages.
@ -126,8 +137,14 @@ 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-quick
%if 0%{?fedora} < 38
echo -e "\n%%_ghcdynlibdir %%{_libdir}" >> %{buildroot}%{macros_dir}/macros.ghc-os
%endif
install -p -D -m 0755 %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/ghc-deps.sh
install -p -D -m 0755 %{SOURCE13} %{buildroot}%{_prefix}/lib/rpm/ghc-info.sh
%if 0%{?fedora} || 0%{?rhel} >= 7
install -p -D -m 0644 %{SOURCE7} %{buildroot}%{_prefix}/lib/rpm/fileattrs/ghc.attr
@ -145,13 +162,6 @@ install -p -D -m 0755 %{SOURCE8} %{buildroot}%{_prefix}/lib/rpm/ghc-pkg-wrapper
mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries
%endif
%if 0%{?rhel} && 0%{?rhel} < 7
cat >> %{buildroot}%{_prefix}/lib/rpm/ghc-deps.sh <<EOF
echo \$files | tr [:blank:] '\n' | %{_rpmconfigdir}/rpmdeps --requires
EOF
%endif
%files
%license COPYING
@ -162,6 +172,7 @@ EOF
%{_prefix}/lib/rpm/fileattrs/ghc.attr
%endif
%{_prefix}/lib/rpm/ghc-deps.sh
%{_prefix}/lib/rpm/ghc-info.sh
%{_prefix}/lib/rpm/ghc-pkg-wrapper
%{_bindir}/cabal-tweak-dep-ver
%{_bindir}/cabal-tweak-drop-dep
@ -174,6 +185,10 @@ EOF
%{macros_dir}/macros.ghc-extra
%files quick
%{macros_dir}/macros.ghc-srpm-quick
%if 0%{?fedora} < 37
%files -n ghc-filesystem
%dir %{_docdir}/ghc
@ -184,12 +199,110 @@ EOF
%endif
%if 0%{?fedora} >= 29
%if 0%{?fedora}
%files -n ghc-obsoletes
%endif
%changelog
* Mon Jul 29 2024 Jens Petersen <petersen@redhat.com> - 2.7.2-1
- improve ghc_delete_rpaths to delete trailing :_libdir
- extra: add ghc_merge_filelist from ghc.spec
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jun 15 2024 Jens Petersen <petersen@redhat.com> - 2.7.1-1
- build macros now undefine debug_package rather than _enable_debug_packages
* Mon Mar 18 2024 Jens Petersen <petersen@redhat.com> - 2.7.0-1
- rename no-prof subpackage to quick
- quick: add ghc_haddocks override
* Thu Feb 29 2024 Jens Petersen <petersen@redhat.com> - 2.6.8-1
- fixup cabal_configure: when subpackaging print subpackage header
- ghc_set_gcc_flags: no need to redefine/re-export CFLAGS and LDFLAGS
- cabal_configure: drop cabal --version
- os: define ghc_haddocks for haskell_setup
- no-prof: add a ghc_profiling override
* Tue Feb 27 2024 Jens Petersen <petersen@redhat.com> - 2.6.7-1
- fix no-prof subpackage to undefine with_ghc_prof properly
- cabal_configure: when subpackaging print subpackage header
- cabal_configure: use --enable-library-profiling instead of -p
* 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
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Nov 12 2023 Jens Petersen <petersen@redhat.com> - 2.6.5-1
- ghc-deps.sh: ghc-9.8 prof fixes adapted from mimi1vx (opensuse)
- improve ghc-info.sh with a show mode
* Thu Nov 9 2023 Jens Petersen <petersen@redhat.com> - 2.6.4-1
- fix my flatpak comments
* Mon Oct 30 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 2.6.3-1
- Fix flatpak builds
* Tue Oct 24 2023 Jens Petersen <petersen@redhat.com> - 2.6.1-1
- ghc_gen_filelists: tweak pkgdir for ghc-9.8 short hash suffices
* Mon Sep 18 2023 Jens Petersen <petersen@redhat.com> - 2.6.0-1
- add ghc-info.sh to read fields from ghc --info
* Mon Sep 18 2023 Jens Petersen <petersen@redhat.com> - 2.5.3-2
- obsolete ghc-data-array-byte
- migrate to SPDX license tag
* Fri Aug 18 2023 Alexey Lyubimov <a.lyubimov@msvsphere.ru> - 2.5.3-1
- Rebuilt for MSVSphere 9.2
* Fri Aug 4 2023 Jens Petersen <petersen@redhat.com> - 2.5.3-1
- ghc-deps.sh: correctly map internal library id to internal package .conf
- tweak cabal_configure to only set --htmldir once for subpackaging
- add ghc_major_version
- F39: obsolete geniplate-mirror
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Mar 27 2023 Jens Petersen <petersen@redhat.com> - 2.5.2-3
- f38: also obsolete regex-compat-tdfa
* Sun Mar 26 2023 Jens Petersen <petersen@redhat.com> - 2.5.2-2
- add obsoletes for F38
* Wed Feb 15 2023 Jens Petersen <petersen@redhat.com> - 2.5.2-1
- ghc-dep.sh: check for *_p.a under Hadrian platform subdir as well
- ghc.attr: include Hadrian lib/ subdir in .conf regex
* Sat Feb 11 2023 Jens Petersen <petersen@redhat.com> - 2.5.1-1
- add ghc_merge_filelist
* Sun Jan 29 2023 Jens Petersen <petersen@redhat.com> - 2.5.0-1
- define ghc_smp_mflags to speed up package builds
- ghc_configure and ghc_version now respect ghc_name for ghcX.Y (via rpmquery)
- base ghc_version on compiler subpackage
- ghc_gen_filelists: error if no .so file and not -m metapkg
- use ghc upstream paths for libHS*.so unless using _ghcdynlibdir
- F38: disable _ghcdynlibdir as default
- ghc_bin_build -W to ignore ghc_name version in cabal_configure
- ghc_lib_subpackage: with ghc_obsoletes_name obsolete ghc{ghc_major}-*
- handle hadrian lib/ subdir consistently for packages
- move with_ghc_prof to ghc-srpm-macros
- cabal_configure: non-core shared libs go to ghcliblib
- ghc_delete_rpaths: need to remove local RPATH for subpackaged libs
* Sat Aug 6 2022 Jens Petersen <petersen@redhat.com> - 2.4.4-2
- F36 obsoletes regex-applicative-text
* Tue Jul 26 2022 Jens Petersen <petersen@redhat.com> - 2.4.4-1
- ghc_gen_filelists: check pkg licensedir exists
- in 9.4.1 Hadrian html docdirs are versioned again (breaks older Hadrian)