%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 %endif
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 2.6.0 Version: 2.6.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
@ -185,6 +185,9 @@ mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries
%changelog %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 * Mon Sep 18 2023 Jens Petersen <petersen@redhat.com> - 2.6.0-1
- add ghc-info.sh to read fields from ghc --info - add ghc-info.sh to read fields from ghc --info

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

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

Loading…
Cancel
Save