From 4fcec30d02669d7853cebc9f423b8a0f2cfb4172 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Wed, 31 Jul 2013 09:36:50 +0000
Subject: [PATCH] Fix relative to OPENDJ-1063 and OPENDJ-1032 - Fixed the doc's section (doc files are no longer duplicate)(OPENDJ-1032) - Target no longer fails when build path contains spaces (OPENDJ-1063) - Out of concern for clarity, added docFiles to resource/rpm.

---
 opends/resource/rpm/specFile |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/opends/resource/rpm/specFile b/opends/resource/rpm/specFile
index bcd6666..f5465ec 100644
--- a/opends/resource/rpm/specFile
+++ b/opends/resource/rpm/specFile
@@ -71,13 +71,20 @@
 # %build
 
 %install
-mkdir -p "$RPM_BUILD_ROOT%{_prefix}"
-cd "$RPM_BUILD_ROOT%{_prefix}"
+mkdir -p "${RPM_BUILD_ROOT}%{_prefix}"
+cd "${RPM_BUILD_ROOT}%{_prefix}"
 # [[ installRpmFiles ]]
-# Remove the excluded files. They shouldn't be a part of this package. 
-/bin/grep -v '^#' "$RPM_SOURCE_DIR/excludedFiles" | while read excludedFiles 
+#Moves the doc files to doc folder
+mkdir -p "%{buildroot}%{_defaultdocdir}/%{name}-%{version}"
+/bin/grep -v '^#' "${RPM_SOURCE_DIR}/docFiles" | while read docFiles 
 do
-    rm -r "$RPM_BUILD_ROOT%{_prefix}$excludedFiles"
+    mv "$RPM_BUILD_ROOT"%{_prefix}$docFiles "$RPM_BUILD_ROOT"%{_defaultdocdir}/%{name}-%{version}/
+done
+
+# Removes the excluded files. They shouldn't be a part of this package. 
+/bin/grep -v '^#' "${RPM_SOURCE_DIR}/excludedFiles" | while read excludedFiles 
+do
+    rm -r "${RPM_BUILD_ROOT}"%{_prefix}$excludedFiles
 done
 
 %clean
@@ -183,12 +190,16 @@
 # =========================
 %files -f "%{_sourcedir}"/files
 %defattr(-,root,root)
-# [[ docsList ]]
+%{_defaultdocdir}/%{name}-%{version}/
 
 # =========================
 # Changelog
 # =========================
 %changelog
+* Wed Jul 31 2013 ForgeRock
+- Fixed the doc's section.
+- Target no longer fails when build path contains spaces.
+
 * Thu Jul 18 2013 ForgeRock
 - Fixed the sections' order and added a new "clean" section.
 - Added '%doc' section.

--
Gitblit v1.10.0