ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Anton Farygin <rider@altlinux.com>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] gear - с чего начинать
Date: Sat, 06 May 2006 17:31:41 +0400
Message-ID: <445CA53D.1010804@altlinux.com> (raw)
In-Reply-To: <20060506131223.GC12421@immo.ru>

Alexey I. Froloff wrote:
> * Anton Farygin <rider@> [060506 16:23]:
>> тут raorn бросал враппер на rpm, я его логику несколько модифицировал, 
>> сейчас обкатаю на нескольких пакетах.. и Дима добавит генерялку 
>> тарболлов из каталогов в gear.. вот тогда запоём ;)
> Ты патчи мне бросай ;-)  Кстати, есть смысл проверять наличие
> .rpmwrapmacros сначала в текущем каталоге, а потом уже в
> $allow_prefix...
> 
> rsync://rsync.altlinux.ru/people/raorn/git/rpmwrapper.git/

Основной патч: искать .rpmwrapmacros начиная с текущего каталога и выше.

И добавлять define для _macropath, который потом использовать как:
$ cat alterator-packages.git/.rpmwrapmacros
%_topdir        %_macropath
%_sourcedir     %{_topsrcdir}/SOURCES
%_specdir       %{_topsrcdir}/alterator-packages
%_tmppath       %{_topsrcdir}/tmp


diff --git a/rpmwrapper b/rpmwrapper
index f123ec4..362fa28 100755
--- a/rpmwrapper
+++ b/rpmwrapper
@@ -18,16 +18,10 @@ args=

  sIFS="$IFS"
  IFS=":"
-for i in $allow_prefix; do
-    case "$cwd" in
-       $i/*|$i)
-           [ -f "$cwd/$macrofile" ] && rpmmacros="$cwd/$macrofile" ||:
-           [ -z "$rpmmacros" -a -f "$i/$macrofile" ] && 
rpmmacros="$i/$macrofile" ||:
-           ;;
-       *)
-           continue
-           ;;
-    esac
+startdir=$PWD
+while [ "$startdir" != "/" ];do
+    [ -f "$startdir/$macrofile" ] && prefix="$startdir" && break
+    startdir=`dirname $startdir`
  done
  IFS="$sIFS"

@@ -52,4 +46,4 @@ include:      /usr/lib/rpm/rpmrc
  macrofiles:    ${macrofiles+$macrofiles:}$rpmmacros
  EOF
  fi
-[ -x "$RPM_PREFIX/$PROG" ]  && "$RPM_PREFIX/$PROG" $args "$@"
+[ -x "$RPM_PREFIX/$PROG" ]  && "$RPM_PREFIX/$PROG" --define "_macropath 
$prefix" $args "$@"


  reply	other threads:[~2006-05-06 13:31 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05 15:49 [devel] gear - проблема с парсингом SPEC-файла Anton Farygin
2006-05-05 16:05 ` Anton Farygin
2006-05-05 16:13 ` Dmitry V. Levin
2006-05-05 16:28   ` Anton Farygin
2006-05-05 16:36     ` Dmitry V. Levin
2006-05-05 21:25       ` Dmitry V. Levin
2006-05-05 22:42         ` Dmitry V. Levin
2006-05-06  9:16           ` Anton Farygin
2006-05-06  8:45         ` Anton Farygin
2006-05-06 11:00           ` Dmitry V. Levin
2006-05-06 11:17             ` Anton Farygin
2006-05-06 11:17               ` Dmitry V. Levin
2006-05-06 11:29                 ` Stanislav Ievlev
2006-05-06 11:38                   ` Stanislav Ievlev
2006-05-06 11:48                     ` Anton Farygin
2006-05-06 11:47                       ` Stanislav Ievlev
2006-05-06 11:51                     ` [devel] gear - с чего начинать Dmitry V. Levin
2006-05-06 11:55                       ` Stanislav Ievlev
2006-05-06 12:09                       ` Anton Farygin
2006-05-06 12:18                         ` Stanislav Ievlev
2006-05-06 12:24                           ` Anton Farygin
2006-05-06 12:26                           ` Aleksey Avdeev
2006-05-06 13:36                             ` Dmitry V. Levin
2006-05-06 13:54                               ` Stanislav Ievlev
2006-05-06 14:42                                 ` Dmitry V. Levin
2006-05-10  7:49                                   ` Stanislav Ievlev
2006-05-06 11:39                   ` Dmitry V. Levin
2006-05-06 11:44                     ` Stanislav Ievlev
2006-05-06  6:10                       ` Kirill Maslinsky
2006-05-06 16:57                         ` Dmitry V. Levin
2006-05-06 12:06                       ` Anton Farygin
2006-05-06 12:30                         ` Dmitry V. Levin
2006-05-06 12:08                     ` Epiphanov Sergei
2006-05-06 12:19                       ` Stanislav Ievlev
2006-05-06 12:26                         ` Anton Farygin
2006-05-06 13:12                           ` Alexey I. Froloff
2006-05-06 13:31                             ` Anton Farygin [this message]
2006-05-06 14:51                               ` Alexey I. Froloff
2006-05-06 15:29                                 ` Anton Farygin
2006-05-06 12:21                       ` Anton Farygin
2006-05-06 12:56                       ` Alexey I. Froloff
2006-05-06 13:00                       ` Dmitry V. Levin
2006-05-07  6:47                         ` Alexey I. Froloff
2006-05-07 14:39                           ` Dmitry V. Levin
2006-05-07 14:43                             ` Damir Shayhutdinov
2006-05-07 14:45                               ` Dmitry V. Levin
2006-05-07 14:51                                 ` Damir Shayhutdinov
2006-05-07 14:53                                   ` Dmitry V. Levin
2006-05-07 15:00                             ` Alexey I. Froloff
2006-05-07 19:48                               ` Anton Farygin
2006-05-08 12:36                                 ` Dmitry V. Levin
2006-05-08 15:36                                   ` Anton Farygin
2006-05-06 11:44                   ` [devel] gear - проблема с парсингом SPEC-файла Anton Farygin
2006-05-09 15:16         ` Alexey I. Froloff
2006-05-09 15:38           ` Dmitry V. Levin
2006-05-09 16:09             ` Alexey I. Froloff
2006-05-10  9:54               ` Dmitry V. Levin
2006-05-10 10:00                 ` Alexey I. Froloff
2006-05-11  1:03                   ` Dmitry V. Levin
2006-05-05  0:37                     ` [devel] I: gear --hasher Dmitry V. Levin
2006-05-10 19:54                       ` Alexey I. Froloff
2006-05-10 21:16                         ` Dmitry V. Levin
2006-05-10 21:28                           ` Alexey I. Froloff
2006-05-10 21:31                             ` Dmitry V. Levin
2006-05-10 21:28                           ` Alexey I. Froloff
2006-05-11  1:02                             ` Dmitry V. Levin
2006-05-11  6:22                               ` Alexey I. Froloff
2006-05-11  7:30                       ` Alexey I. Froloff
2006-05-14 23:19                         ` Dmitry V. Levin
2006-05-24 22:57                           ` Dmitry V. Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=445CA53D.1010804@altlinux.com \
    --to=rider@altlinux.com \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git