diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 91a7362..8d7285c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.14 -Release: 2%{?dist} +Version: 2.0.15 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -218,6 +218,10 @@ EOF %changelog +* Sat Jan 30 2021 Jens Petersen - 2.0.15-1 +- add ghc_fix_doc_perms and use it in ghc_bin_build and ghc_lib_build +- ghc_lib_subpackage: define ghc_subpackages_list + * Tue Jan 26 2021 Fedora Release Engineering - 2.0.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index aed8d80..c15d449 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,14 +128,23 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. fi\ %{nil} +# workaround Cabal bug causing executable extra-source-files +%ghc_fix_doc_perms\ +for f in $(ls | grep -i -e "^\(ANNOUNCE\|AUTHORS\|CHANGELOG\|CHANGES\|CONTRIBUTORS\|README\|TODO\)"); do\ +if [ -x $f ]; then chmod a-x $f; fi\ +done\ +%{nil} + # ghc_bin_build %ghc_bin_build\ +%ghc_fix_doc_perms\ %undefine _enable_debug_packages\ %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\ %undefine _enable_debug_packages\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 345f93c..640a641 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -12,6 +12,7 @@ print(name)\ local pv = rpm.expand("%1")\ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ }}\ +%global ghc_subpackages_list %{?ghc_subpackages_list} %{pkgname}-%{pkgver}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\