make the recent dynlib changes conditional on _ghcdynlibdir and disable
(without_shared remains gone)
This commit is contained in:
parent
b058836dae
commit
2e2b672417
@ -10,7 +10,7 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 1.8.3
|
Version: 1.8.4
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: RPM macros for building Haskell packages for GHC
|
Summary: RPM macros for building Haskell packages for GHC
|
||||||
|
|
||||||
@ -162,6 +162,10 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jan 28 2018 Jens Petersen <petersen@redhat.com> - 1.8.4-1
|
||||||
|
- make the recent dynlib packaging changes conditional on _ghcdynlibdir
|
||||||
|
- temporarily disable _ghcdynlibdir for Rawhide
|
||||||
|
|
||||||
* Thu Jan 25 2018 Jens Petersen <petersen@redhat.com> - 1.8.3-1
|
* Thu Jan 25 2018 Jens Petersen <petersen@redhat.com> - 1.8.3-1
|
||||||
- remove "-z defs" from LDFLAGS since it breaks linking with ghc (see #1535422)
|
- remove "-z defs" from LDFLAGS since it breaks linking with ghc (see #1535422)
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ export CFLAGS\
|
|||||||
%global _hardened_ldflags %{nil}\
|
%global _hardened_ldflags %{nil}\
|
||||||
LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs//')}"; export LDFLAGS\
|
LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs//')}"; export LDFLAGS\
|
||||||
%cabal --version\
|
%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
|
# install
|
||||||
%cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options}
|
%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\
|
touch %{basepkg}.files %{basepkg}-devel.files\
|
||||||
echo ${pkgconf} >> %{basepkg}-devel.files\
|
echo ${pkgconf} >> %{basepkg}-devel.files\
|
||||||
if [ -d "%{buildroot}${pkgdir}" ]; then\
|
if [ -d "%{buildroot}${pkgdir}" ]; then\
|
||||||
|
%if %{defined _ghcdynlibdir}\
|
||||||
echo "%%attr(755,root,root) %{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\
|
echo "%%attr(755,root,root) %{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||||
echo "${pkgdir}" >> %{basepkg}-devel.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\
|
fi\
|
||||||
if [ -d "%{buildroot}%{docdir}" ]; then\
|
if [ -d "%{buildroot}%{docdir}" ]; then\
|
||||||
echo "%{docdir}" >> %{basepkg}-devel.files\
|
echo "%{docdir}" >> %{basepkg}-devel.files\
|
||||||
|
@ -45,10 +45,12 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\
|
|||||||
%description -n %{basepkg}-devel\
|
%description -n %{basepkg}-devel\
|
||||||
This package provides the Haskell %{pkgname} library development files.\
|
This package provides the Haskell %{pkgname} library development files.\
|
||||||
\
|
\
|
||||||
|
%if %{defined _ghcdynlibdir}\
|
||||||
%post -n %{basepkg} -p /sbin/ldconfig\
|
%post -n %{basepkg} -p /sbin/ldconfig\
|
||||||
\
|
\
|
||||||
%postun -n %{basepkg} -p /sbin/ldconfig\
|
%postun -n %{basepkg} -p /sbin/ldconfig\
|
||||||
\
|
\
|
||||||
|
%endif\
|
||||||
%post -n %{basepkg}-devel\
|
%post -n %{basepkg}-devel\
|
||||||
%ghc_pkg_recache\
|
%ghc_pkg_recache\
|
||||||
\
|
\
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
%_ghcdocdir %{_ghclicensedir}/%{name}
|
%_ghcdocdir %{_ghclicensedir}/%{name}
|
||||||
|
|
||||||
%_ghcdynlibdir %{_libdir}
|
# disable for ghc-8.0 for now
|
||||||
|
#%%_ghcdynlibdir %{_libdir}
|
||||||
|
|
||||||
%cabal_install_options -v
|
%cabal_install_options -v
|
||||||
|
Loading…
Reference in New Issue
Block a user