diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cec6d10..d497d1d 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.10 -Release: 2%{?dist} +Version: 1.6.11 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -106,19 +106,6 @@ install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper -# remove for ghc-8.0.1 -# binutils-2.27-7.fc26 and later break Haskell dynamic linking on aarch64 and armv7hl -# https://bugzilla.redhat.com/show_bug.cgi?id=1386126 -%if 0%{?fedora} == 26 -%ifarch aarch64 armv7hl -# dynlinking failing with ghc-7.10.3 -cat >> %{buildroot}/%{macros_dir}/macros.ghc <> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh < - 1.6.11-1 +- re-enable dynlink on armv7hl and aarch64 since binutils was fixed (#1386126) +- condition use of _defaultlicensedir +- quote some echo'd macros + * Mon Oct 31 2016 Jens Petersen - 1.6.10-2 - only disable arm dynlinking for f26 (#1386126) diff --git a/macros.ghc b/macros.ghc index 6ec7dca..7a5347f 100644 --- a/macros.ghc +++ b/macros.ghc @@ -28,7 +28,7 @@ fi CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ %endif\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ -%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} @@ -73,9 +73,9 @@ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}${pkgdir}" ]; then\ -echo "%dir ${pkgdir}" >> %{basepkg}.files\ +echo "%%dir ${pkgdir}" >> %{basepkg}.files\ %if %{undefined ghc_without_shared}\ -echo "%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ +echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ %endif\ find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ @@ -83,7 +83,7 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in $(ls %{buildroot}%{_defaultlicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ +for i in $(ls %{buildroot}%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ @@ -115,7 +115,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # 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}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%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} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?cabal_verbose}\ %{nil}