ghc_gen_filelists: support ghc Hadrian install

epel9
Jens Petersen 3 years ago
parent b3062773f5
commit 3f7e41039a

@ -7,7 +7,7 @@
%endif
Name: ghc-rpm-macros
Version: 2.3.0
Version: 2.3.1
Release: 1%{?dist}
Summary: RPM macros for building Haskell packages for GHC
@ -184,6 +184,9 @@ EOF
%changelog
* Fri Dec 17 2021 Jens Petersen <petersen@redhat.com> - 2.3.1-1
- ghc_gen_filelists: support ghc Hadrian install
* Wed Dec 8 2021 Jens Petersen <petersen@redhat.com> - 2.3.0-1
- support fileattrs dependency generation for ghc9.2
- drop dependency generation for rhel6

@ -70,8 +70,10 @@ fi\
%define pkgver %{?2}%{!?2:%{version}}\
%define pkgnamever %{pkgname}-%{pkgver}\
%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\
if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf)" ]; then\
echo '%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found'\
%define ghcliblib %{ghclibdir}%{?with_hadrian:/lib}\
%define ghclibplatform %{ghcliblib}%{?with_hadrian:/%{_arch}-linux-ghc-%{ghc_version}}\
if [ -z "$(ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf)" ]; then\
echo '%{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf not found'\
exit 1\
fi\
rm -f %{basepkg}.files %{basepkg}-doc.files\
@ -81,21 +83,21 @@ for i in $(ls %{buildroot}%{_ghclicensedir}/%{basepkg}); do\
echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\
done\
%endif\
for i in %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\
for i in %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\
if [ -x "$i" ]; then\
echo $i >> %{basepkg}.files\
else\
echo 'Warning: %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so not found'\
echo 'Warning: %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so not found'\
fi\
done\
pkgdir="%{ghclibdir}/%{pkgnamever}"\
pkgdir="%{ghclibplatform}/%{pkgnamever}"\
if [ -d "%{buildroot}${pkgdir}" ]; then\
find %{buildroot}${pkgdir} -type d -fprintf %{basepkg}-devel.files '%%%%dir %p\\n' -o \\( -name '*.p_hi' -o -name 'libHS*_p.a' \\) -fprint %{basepkg}-prof.files -o -fprint %{basepkg}-devel.files\
else\
rm -f %{basepkg}-devel.files %{basepkg}-prof.files\
touch %{basepkg}-devel.files %{basepkg}-prof.files\
fi\
ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\
ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\
%if %{with haddock}\
if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\
echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\

Loading…
Cancel
Save