packages: pearize.sh - adopt for command packaging 0.2

glen glen at pld-linux.org
Sat Aug 21 11:55:04 CEST 2010


Author: glen                         Date: Sat Aug 21 09:55:04 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- adopt for command packaging 0.2

---- Files affected:
packages:
   pearize.sh (1.49 -> 1.50) 

---- Diffs:

================================================================
Index: packages/pearize.sh
diff -u packages/pearize.sh:1.49 packages/pearize.sh:1.50
--- packages/pearize.sh:1.49	Fri Aug 20 18:39:35 2010
+++ packages/pearize.sh	Sat Aug 21 11:54:59 2010
@@ -60,9 +60,6 @@
 template=pearize.spec
 cat > $stmp <<'EOF'
 @extra_headers@
-Optional: @optional@
- at optional-pkg@
- at optional-ext@
 License: @release_license@
 State: @release_state@
 EOF
@@ -115,6 +112,16 @@
 bak=$(cp -fbv $spec $spec | awk '{print $NF}' | tr -d "['\`]" )
 
 # parse requires
+requires=$(grep '^BuildRequires:' $template || :)
+if [ -n "$requires" ]; then
+	echo "$requires" | while read tag dep; do
+		dep=$(add_epoch $dep)
+		if ! grep -q "^BuildRequires:.*$dep" $preamble; then
+			sed -i -e "/^BuildRoot/iBuildRequires:\t$dep" $spec
+		fi
+	done
+fi
+
 requires=$(grep '^Requires:' $template || :)
 if [ -n "$requires" ]; then
 	echo "$requires" | while read tag dep; do
@@ -137,7 +144,7 @@
 fi
 
 # parse optional deps
-optional=$(grep '^Optional:' $template || :)
+optional=$(grep '^Suggests:' $template || :)
 if [ -n "$optional" ]; then
 	echo "$optional" | while read tag dep; do
 		for req in $dep; do
================================================================

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



More information about the pld-cvs-commit mailing list