ghc_gen_filelists: support ghc Hadrian install

epel9
Jens Petersen 3 years ago
parent b3062773f5
commit 3f7e41039a

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

@ -70,8 +70,10 @@ fi\
%define pkgver %{?2}%{!?2:%{version}}\ %define pkgver %{?2}%{!?2:%{version}}\
%define pkgnamever %{pkgname}-%{pkgver}\ %define pkgnamever %{pkgname}-%{pkgver}\
%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\
if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf)" ]; then\ %define ghcliblib %{ghclibdir}%{?with_hadrian:/lib}\
echo '%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found'\ %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\ exit 1\
fi\ fi\
rm -f %{basepkg}.files %{basepkg}-doc.files\ 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\ echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\
done\ done\
%endif\ %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\ if [ -x "$i" ]; then\
echo $i >> %{basepkg}.files\ echo $i >> %{basepkg}.files\
else\ 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\ fi\
done\ done\
pkgdir="%{ghclibdir}/%{pkgnamever}"\ pkgdir="%{ghclibplatform}/%{pkgnamever}"\
if [ -d "%{buildroot}${pkgdir}" ]; then\ 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\ 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\ else\
rm -f %{basepkg}-devel.files %{basepkg}-prof.files\ rm -f %{basepkg}-devel.files %{basepkg}-prof.files\
touch %{basepkg}-devel.files %{basepkg}-prof.files\ touch %{basepkg}-devel.files %{basepkg}-prof.files\
fi\ 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 %{with haddock}\
if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\ if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\
echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\

Loading…
Cancel
Save