packages: pearize.sh - use new lua macros

glen glen at pld-linux.org
Fri Aug 20 14:43:42 CEST 2010


Author: glen                         Date: Fri Aug 20 12:43:42 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use new lua macros

---- Files affected:
packages:
   pearize.sh (1.46 -> 1.47) 

---- Diffs:

================================================================
Index: packages/pearize.sh
diff -u packages/pearize.sh:1.46 packages/pearize.sh:1.47
--- packages/pearize.sh:1.46	Thu Aug 19 20:04:46 2010
+++ packages/pearize.sh	Fri Aug 20 14:43:36 2010
@@ -150,14 +150,22 @@
 fi
 has_opt=$(grep -Ec '^Optional-(pkg|ext):' $template || :)
 if [ "$has_opt" -gt 0 ]; then
-	if ! grep -q '%{_docdir}/.*/optional-packages.txt' $spec; then
+	if ! grep -q 'rpmbuild(macros)' $spec; then
+		sed -i -e '
+		/rpm-php-pearprov/{
+			aBuildRequires:	rpmbuild(macros) >= 1.300
+		}
+		' $spec
+	fi
+	if ! grep -Eq '%{_docdir}/.*/optional-packages.txt|%pear_package_print_optionalpackages' $spec; then
 		sed -i -e '
 		/^%files$/{
-			i%post
-			iif [ -f %{_docdir}/%{name}-%{version}/optional-packages.txt ]; then
-			i\	cat %{_docdir}/%{name}-%{version}/optional-packages.txt
-			ifi
+			i%post -p <lua>
+			i%pear_package_print_optionalpackages
 			i
+		}
+		/rpmbuild(macros)/{
+			s/>=.*/>= 1.571/
 		}
 		' $spec
 	fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/pearize.sh?r1=1.46&r2=1.47&f=u



More information about the pld-cvs-commit mailing list