consolidate ld.so.conf.d and chrpath for _ghcdynlibdir
This commit is contained in:
parent
24f60eba3d
commit
04d947cd74
22
ghc.spec
22
ghc.spec
@ -572,15 +572,10 @@ cd _build/bindist/ghc-%{version}-*
|
|||||||
./configure --prefix=%{buildroot}%{ghclibdir} --bindir=%{buildroot}%{_bindir} --libdir=%{buildroot}%{_libdir} --mandir=%{buildroot}%{_mandir} --docdir=%{buildroot}%{_docdir}/%{name}
|
./configure --prefix=%{buildroot}%{ghclibdir} --bindir=%{buildroot}%{_bindir} --libdir=%{buildroot}%{_libdir} --mandir=%{buildroot}%{_mandir} --docdir=%{buildroot}%{_docdir}/%{name}
|
||||||
make install
|
make install
|
||||||
)
|
)
|
||||||
%dnl mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
|
||||||
%dnl echo "%{ghclibplatform}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
|
|
||||||
%else
|
%else
|
||||||
make DESTDIR=%{buildroot} install
|
make DESTDIR=%{buildroot} install
|
||||||
%if %{defined _ghcdynlibdir}
|
%if %{defined _ghcdynlibdir}
|
||||||
mv %{buildroot}%{ghclibdir}/*/libHS*ghc%{ghc_version}.so %{buildroot}%{_ghcdynlibdir}/
|
mv %{buildroot}%{ghclibdir}/*/libHS*ghc%{ghc_version}.so %{buildroot}%{_ghcdynlibdir}/
|
||||||
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do
|
|
||||||
chrpath -d $i
|
|
||||||
done
|
|
||||||
for i in %{buildroot}%{ghclibdir}/package.conf.d/*.conf; do
|
for i in %{buildroot}%{ghclibdir}/package.conf.d/*.conf; do
|
||||||
sed -i -e 's!^dynamic-library-dirs: .*!dynamic-library-dirs: %{_ghcdynlibdir}!' $i
|
sed -i -e 's!^dynamic-library-dirs: .*!dynamic-library-dirs: %{_ghcdynlibdir}!' $i
|
||||||
done
|
done
|
||||||
@ -588,6 +583,17 @@ sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_ghcdynl
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{defined _ghcdynlibdir}
|
||||||
|
%if "%_ghcdynlibdir" != "%_libdir"
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
||||||
|
echo "%{ghclibplatform}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
|
||||||
|
%endif
|
||||||
|
# avoid 'E: binary-or-shlib-defines-rpath'
|
||||||
|
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do
|
||||||
|
chrpath -d $i
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
# containers src moved to a subdir
|
# containers src moved to a subdir
|
||||||
cp -p libraries/containers/containers/LICENSE libraries/containers/LICENSE
|
cp -p libraries/containers/containers/LICENSE libraries/containers/LICENSE
|
||||||
|
|
||||||
@ -638,8 +644,10 @@ fi\
|
|||||||
%merge_filelist rts base
|
%merge_filelist rts base
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with hadrian}
|
%if %{defined _ghcdynlibdir}
|
||||||
%dnl echo "%{_sysconfdir}/ld.so.conf.d/%{name}.conf" >> %{name}-base.files
|
%if "%_ghcdynlibdir" != "%_libdir"
|
||||||
|
echo "%{_sysconfdir}/ld.so.conf.d/%{name}.conf" >> %{name}-base.files
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# add rts libs
|
# add rts libs
|
||||||
|
Loading…
Reference in New Issue
Block a user