[ghc-rpm-macros] when building for non-shared archs move installed docfiles to devel docdir

Jens Petersen petersen at fedoraproject.org
Tue Dec 27 06:07:08 UTC 2011


commit e8e6da4176c2460071f0fad656c13f8a55066249
Author: Jens Petersen <petersen at redhat.com>
Date:   Tue Dec 27 15:06:50 2011 +0900

    when building for non-shared archs move installed docfiles to devel docdir

 ghc-rpm-macros.ghc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index f780674..80def68 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -55,6 +55,13 @@ elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\
   echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
 fi\
 %endif\
+%if 0%{!?1:1} && %{defined ghc_without_shared}\
+if [ "%{name}" = "ghc-%{pkg_name}" ]; then\
+  if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
+    mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\
+  fi\
+fi\
+%endif\
 echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
 if [ -d "%{buildroot}%{pkgdir}" ]; then\
 find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\


More information about the scm-commits mailing list