From a49c6915fc7b5758d63873ea98cea6bfe2f6eb81 Mon Sep 17 00:00:00 2001 From: Vitaly Lipatov <lav@etersoft.ru> Date: Fri, 26 Aug 2016 00:56:03 +0300 Subject: [PATCH] rpmurl: try to implement Source-* support --- bin/rpmurl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/rpmurl b/bin/rpmurl index 5406266..e573288 100755 --- a/bin/rpmurl +++ b/bin/rpmurl @@ -78,7 +78,20 @@ check_spec() else RPM_URL=$(eval_spec $SPEC | get_var "Url") if [ -n "$ABOUTDIR" ] ; then - SOURCE=$(eval_spec $SPEC | get_var "Source") + # hack: FIXME + #cat $SPEC | sed -e "s|^# Source-\(.*\):\([ \t]\)|%define rpmurl_source_\1\2|g" > $SPEC.rpmurl + #local NEWSOURCE= + #eval_spec $SPEC.rpmurl >$SPEC.rpmuuu + #if eval_spec $SPEC.rpmurl | egrep -q "%define rpmurl_source_(git|url)" ; then + # NEWSOURCE=$(eval_spec $SPEC.rpmurl | egrep "%define rpmurl_source_(git|url)" | sed -e "s/.*[ \t]\(.*\)/\1/g") + # echo $NEWSOURCE + #fi + #rm -f $SPEC.rpmurl + if [ -n "$NEWSOURCE" ] ; then + SOURCE="$NEWSOURCE" + else + SOURCE=$(eval_spec $SPEC | get_var "Source") + fi RPM_URL=$(dirname $SOURCE) fi -- 2.24.1