[ghc-rpm-macros] only add %pkgdir/ to filelist if it exists

Jens Petersen petersen at fedoraproject.org
Tue Feb 26 17:32:19 UTC 2013


commit f37546310e31597cfb6af8610e1d900ddf521335
Author: Jens Petersen <petersen at redhat.com>
Date:   Tue Feb 26 18:32:00 2013 +0100

    only add %pkgdir/ to filelist if it exists
    
    fixes haskell-platform build on secondary

 ghc-rpm-macros.ghc |    4 ++--
 1 files 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\


More information about the scm-commits mailing list