diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2170c0e..f098e1c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.19 -Release: 3%{?dist} +Version: 1.6.20 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -161,6 +161,11 @@ EOF %changelog +* Sun Jul 30 2017 Jens Petersen - 1.6.20-1 +- add _ghclicensedir macro +- add ghc_smp_mflags macro, since -j4 breaks reproducible-builds.org completely + (report by Bernhard Wiedemann) + * Wed Jul 26 2017 Fedora Release Engineering - 1.6.19-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index 5076832..257bcad 100644 --- a/macros.ghc +++ b/macros.ghc @@ -64,6 +64,8 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} +%_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir} + # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ @@ -89,7 +91,7 @@ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ %if 0%{?1:1}\ -for i in $(ls %{buildroot}%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ +for i in $(ls %{buildroot}%{_ghclicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ done\ %endif\ @@ -114,13 +116,13 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %ghc_bin_build\ %global debug_package %{nil}\ %cabal_configure\ -%cabal build %{?cabal_build_options} +%cabal build %{?ghc_smp_mflags} %{?cabal_build_options} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ -%cabal build %{?cabal_build_options}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil} # ghc_lib_build [name] [version] diff --git a/macros.ghc-fedora b/macros.ghc-fedora index 1bfd7b8..fbb087b 100644 --- a/macros.ghc-fedora +++ b/macros.ghc-fedora @@ -1,5 +1,5 @@ # Fedora specific settings -%_ghcdocdir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{name} +%_ghcdocdir %{_ghclicensedir}/%{name} %cabal_install_options -v