only add dynlib to filelist if found to allow for metapkg subpackage

eg base-noprelude subpackage of pandoc
This commit is contained in:
Jens Petersen 2020-06-24 18:42:00 +08:00
parent 31a55c3bc9
commit bc06ab77b4
2 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 2.0.10
Version: 2.0.11
Release: 1%{?dist}
Summary: RPM macros for building Haskell packages for GHC
@ -212,6 +212,10 @@ EOF
%changelog
* Wed Jun 24 2020 Jens Petersen <petersen@redhat.com> - 2.0.11-1
- only add dynlib to file list if it exists
(this allows for metapkg subpackages)
* Thu Jun 18 2020 Jens Petersen <petersen@redhat.com> - 2.0.10-1
- cabal-tweak script now output errors to stderr

View File

@ -81,7 +81,11 @@ echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\
done\
%endif\
for i in %{buildroot}%{_ghcdynlibdir}/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'\
fi\
done\
pkgdir="%{ghclibdir}/%{pkgnamever}"\
if [ -d "%{buildroot}${pkgdir}" ]; then\