commit 42dc97a53ec57368d6380cf2bce37e04eeb147d3
Author: Elan Ruusamäe <g...@delfi.ee>
Date:   Fri Jun 21 10:38:24 2013 +0300

    script to send php 5.2 extensions

 client/php52.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
---
diff --git a/client/php52.sh b/client/php52.sh
new file mode 100755
index 0000000..e275bd9
--- /dev/null
+++ b/client/php52.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+dir=$(dirname "$0")
+rpmdir=$(rpm -E %_topdir)
+dist=th
+
+# get_last_specs and autotag copied from rebuild-th-kernel.sh
+# autotag from rpm-build-macros
+
+# displays latest used tag for a specfile
+autotag() {
+       local out spec pkg ref
+       for spec in "$@"; do
+               # strip branches
+               pkg=${spec%:*}
+               # ensure package ends with .spec
+               spec=${pkg%.spec}.spec
+               # and pkg without subdir
+               pkg=${pkg#*/}
+               # or .ext
+               pkg=${pkg%%.spec}
+               cd $rpmdir/$pkg
+               git fetch --tags
+               if [ -n "$alt_kernel" ]; then
+                       ref="refs/tags/auto/${dist}/${pkg}-${alt_kernel}-[0-9]*"
+               else
+                       ref="refs/tags/auto/${dist}/${pkg}-[0-9]*"
+               fi
+               out=$(git for-each-ref $ref --sort=-authordate 
--format='%(refname:short)' --count=1)
+               echo "$spec:$out"
+               cd - >/dev/null
+       done
+}
+
+get_last_tags() {
+       local pkg spec
+
+       echo >&2 "Fetching package tags..."
+       for pkg in "$@"; do
+               # skip options (proxy them)
+               if [[ $pkg = -* ]]; then
+                       echo "$pkg"
+                       continue
+               fi
+
+               echo >&2 "$pkg... "
+               if [ ! -e $rpmdir/$pkg/$pkg.spec ]; then
+                       $rpmdir/builder -g $pkg -ns -r HEAD 1>&2
+               fi
+               if [ ! -e $rpmdir/$pkg/$pkg.spec ]; then
+                       # just print it out, to fallback to base pkg name
+                       echo >&2 "... $pkg"
+                       echo "$pkg"
+               else
+                       spec=$(autotag $pkg/$pkg.spec)
+                       spec=${spec#*/}
+                       # update progress
+                       echo >&2 "... $spec"
+                       # output
+                       echo $spec
+               fi
+       done
+}
+
+specs=$(get_last_tags "$@")
+
+exec $dir/make-request.sh -D 'php_suffix 52' $specs -C 'poldek -ev --noask 
php52-devel'
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/42dc97a53ec57368d6380cf2bce37e04eeb147d3

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to