%ghc_gen_filelists: tweak pkgdir for ghc-9.8 library short hashes

epel9
Jens Petersen 1 year ago
parent 774ae4cf8f
commit 6715b2ec7b

@ -7,7 +7,7 @@
%endif
Name: ghc-rpm-macros
Version: 2.6.0
Version: 2.6.1
Release: 1%{?dist}
Summary: RPM macros for building Haskell packages for GHC
@ -185,6 +185,9 @@ mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries
%changelog
* Tue Oct 24 2023 Jens Petersen <petersen@redhat.com> - 2.6.1-1
- ghc_gen_filelists: tweak pkgdir for ghc-9.8 short hash suffices
* Mon Sep 18 2023 Jens Petersen <petersen@redhat.com> - 2.6.0-1
- add ghc-info.sh to read fields from ghc --info

@ -158,7 +158,7 @@ if [ -d "%{ghclibdir}/lib" ]; then\
subsubdir=/lib\
fi\
%endif\
if [ -z "$(ls %{buildroot}%{ghcliblib}${subsubdir}/package.conf.d/%{pkgnamever}*.conf)" ]; then\
if [ ! -f %{buildroot}%{ghcliblib}${subsubdir}/package.conf.d/%{pkgnamever}*.conf ]; then\
echo "%{buildroot}%{ghcliblib}${subsubdir}/package.conf.d/%{pkgnamever}*.conf not found"\
exit 1\
fi\
@ -182,9 +182,14 @@ exit 1\
%endif\
fi\
done\
pkgdir="%{ghcliblib}${subsubdir}%{?with_hadrian:/%{ghcplatform}}/%{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\
pkgdir="%{buildroot}%{ghcliblib}${subsubdir}%{?with_hadrian:/%{ghcplatform}}/%{pkgnamever}"\
%if %[v"%{ghc_version}" > v"9.8"]\
if [ ! -d ${pkgdir} ]; then\
pkgdir="${pkgdir}-*"\
fi\
%endif\
if [ -d ${pkgdir} ]; then\
find ${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\

@ -64,7 +64,7 @@ TMP=test-tmp
mkdir -p $TMP/
PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm))
PKGS=$(cd $ARCH; rpm -qp *-$VERREL.*.rpm)
for i in $PKGS; do
# FIXME: should check NVR is same before building

Loading…
Cancel
Save