SPECS: pearize.sh - handle rc,pre,beta states in tarball filenames
glen
glen at pld-linux.org
Tue Oct 4 00:32:56 CEST 2005
Author: glen Date: Mon Oct 3 22:32:56 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- handle rc,pre,beta states in tarball filenames
---- Files affected:
SPECS:
pearize.sh (1.15 -> 1.16)
---- Diffs:
================================================================
Index: SPECS/pearize.sh
diff -u SPECS/pearize.sh:1.15 SPECS/pearize.sh:1.16
--- SPECS/pearize.sh:1.15 Mon Oct 3 21:53:38 2005
+++ SPECS/pearize.sh Tue Oct 4 00:32:51 2005
@@ -6,10 +6,12 @@
#
# needs pear makerpm command.
# requires tarball to exist in ../SOURCES.
-#
-# bugs: will not find tarball for packages with 'beta' and 'alpha' in version.
+# you should have all pear packages installed to get best results
#
# todo: adjust similiarily noautoreqdeps
+# bugs: the beta portions in version deps could be wrong (php-4.3.0b1 and alike)
+# see php-pear-DBA_Relational.spec
+# SOmething strange: Requires: php-common < 4:3:5.1
#
# note: old version pf this script which was used to convert to new package format is in CVS branch MIGRATE
# send blames and beerideas to glen at pld-linux.org
@@ -25,11 +27,14 @@
exit 1
fi
echo "Processing $spec"
-tarball=$(rpm -q --qf '../SOURCES/%{name}-%{version}.tgz\n' --specfile "$spec" | head -n 1 | sed -e 's,php-pear-,,')
-template=$(rpm -q --qf '%{name}-%{version}.spec\n' --specfile "$spec" | head -n 1)
+
+rc=$(awk '/^%define.*_rc/{print $NF}' $spec)
+pre=$(awk '/^%define.*_pre/{print $NF}' $spec)
+beta=$(awk '/^%define.*_beta/{print $NF}' $spec)
+tarball=$(rpm -q --qf "../SOURCES/%{name}-%{version}$rc$pre$beta.tgz\n" --specfile "$spec" | head -n 1 | sed -e 's,php-pear-,,')
+template=$(rpm -q --qf "%{name}-%{version}$rc$pre$beta.spec\n" --specfile "$spec" | head -n 1)
pear makerpm --spec-template=template.spec $tarball
-ls -l $spec $template
requires=$(grep '^Requires:' $template || :)
conflicts=$(grep '^Conflicts:' $template || :)
@@ -74,7 +79,6 @@
rm -f $preamble
-set -e
diff=$(mktemp "${TMPDIR:-/tmp}/fragXXXXXX")
if ! diff -u $bak $spec > $diff; then
vim -o $spec $diff
@@ -82,3 +86,4 @@
else
echo "$spec: No diffs"
fi
+#exit 1
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/pearize.sh?r1=1.15&r2=1.16&f=u
More information about the pld-cvs-commit
mailing list