From f37546310e31597cfb6af8610e1d900ddf521335 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 26 Feb 2013 18:32:00 +0100 Subject: [PATCH] only add %pkgdir/ to filelist if it exists fixes haskell-platform build on secondary --- ghc-rpm-macros.ghc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 911fd11..ea3aa91 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -42,12 +42,12 @@ fi %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ +if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%dir %{pkgdir}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ %if %{undefined ghc_without_shared}\ -if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ -fi\ %endif\ +fi\ %if %{defined ghc_without_shared}\ if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\ if [ -d "%{buildroot}%{_docdir}/%{basepkg}-%{pkgver}" ]; then\