[packages/php-manual] cleanup; no need for comples install as files are prepared in %prep

glen glen at pld-linux.org
Tue Jul 31 22:59:51 CEST 2012


commit 36c9d0a15f423ab21c6fcfe84dc5fc0d85c57ca8
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Jul 31 23:59:46 2012 +0300

    cleanup; no need for comples install as files are prepared in %prep

 php-manual.spec | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)
---
diff --git a/php-manual.spec b/php-manual.spec
index 8519edd..53a8434 100644
--- a/php-manual.spec
+++ b/php-manual.spec
@@ -353,8 +353,6 @@ for src in $sources; do
 	unpack $src
 done
 
-find -name CVS | xargs rm -vr
-
 %build
 for l in %{name}-*/; do
 	date=$(%{__perl} -ne '/pubdate/ && />(.+)</ and print $1' $l/index.html)
@@ -362,22 +360,18 @@ for l in %{name}-*/; do
 done | tee versions.txt
 
 %install
-if [ ! -f install.stamp -o ! -d $RPM_BUILD_ROOT ]; then
-	rm -rf installed.stamp $RPM_BUILD_ROOT
-	install -d $RPM_BUILD_ROOT%{_docdir}
-
-	# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
-	touch COPYING
-	if cp -al COPYING $RPM_BUILD_ROOT%{_docdir}/COPYING 2>/dev/null; then
-		l=l
-		rm -f $RPM_BUILD_ROOT%{_docdir}/COPYING
-	fi
-	rm -f COPYING
-
-	cp -a$l %{name}-* $RPM_BUILD_ROOT%{_docdir}
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_docdir}
 
-	touch install.stamp
+# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
+touch COPYING
+if cp -al COPYING $RPM_BUILD_ROOT%{_docdir}/COPYING 2>/dev/null; then
+	l=l
+	rm -f $RPM_BUILD_ROOT%{_docdir}/COPYING
 fi
+rm -f COPYING
+
+cp -a$l %{name}-* $RPM_BUILD_ROOT%{_docdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT


More information about the pld-cvs-commit mailing list