diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c1f71c2..952ef97 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.3 +Version: 1.8.4 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,10 @@ EOF %changelog +* Sun Jan 28 2018 Jens Petersen - 1.8.4-1 +- make the recent dynlib packaging changes conditional on _ghcdynlibdir +- temporarily disable _ghcdynlibdir for Rawhide + * Thu Jan 25 2018 Jens Petersen - 1.8.3-1 - remove "-z defs" from LDFLAGS since it breaks linking with ghc (see #1535422) diff --git a/macros.ghc b/macros.ghc index 7872201..4cecaf8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -39,7 +39,7 @@ export CFLAGS\ %global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs//')}"; export LDFLAGS\ %cabal --version\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc --dynlibdir=%{_ghcdynlibdir} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --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 --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --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 --destdir=%{buildroot} %{?cabal_install_options} @@ -91,8 +91,15 @@ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ echo ${pkgconf} >> %{basepkg}-devel.files\ if [ -d "%{buildroot}${pkgdir}" ]; then\ +%if %{defined _ghcdynlibdir}\ echo "%%attr(755,root,root) %{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\ echo "${pkgdir}" >> %{basepkg}-devel.files\ +%else\ +echo "%%dir ${pkgdir}" >> %{basepkg}.files\ +echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ +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\ +%endif\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 1ca77e6..64c5c63 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -45,10 +45,12 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ +%if %{defined _ghcdynlibdir}\ %post -n %{basepkg} -p /sbin/ldconfig\ \ %postun -n %{basepkg} -p /sbin/ldconfig\ \ +%endif\ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ \ diff --git a/macros.ghc-os b/macros.ghc-os index e6ac90c..4b77e16 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -2,6 +2,7 @@ %_ghcdocdir %{_ghclicensedir}/%{name} -%_ghcdynlibdir %{_libdir} +# disable for ghc-8.0 for now +#%%_ghcdynlibdir %{_libdir} %cabal_install_options -v