--- /usr/bin/arepo 2008-02-11 17:30:59 +0200 +++ ./arepo 2009-11-11 19:49:02 +0200 @@ -462,14 +462,23 @@ %build cat >install.sh <<'EOF' #!/bin/sh -e +pkg=~(pkgname)s +>/tmp/${pkg}-requires +list= for file in "$@"; do if [ -d "$file" ]; then install -d -- "%buildroot$file" else + echo === $file + list="${list} `ldd "$file"|cut -d '>' -f 2|grep \.so|cut -f 1 -d '('`" mkdir -p -- "`dirname %buildroot$file`" cp -a -- "$file" "%buildroot$file" fi done +list=`for l in $list; do echo $l; done|sort|uniq` +list=`for l in $list; do rpm -qf --queryformat '%{NAME}\n' $l; done|sort|uniq` +echo search for $pkg in $list +for l in $list; do [ $l = $pkg ] && echo skip $l || echo i586-$l >> /tmp/${pkg}-requires; done EOF chmod +x install.sh @@ -493,7 +502,16 @@ EOF chmod +x find-deps.sh -ln -s find-deps.sh find-requires +cat >find-requires <<'EOF' +#!/bin/sh -e +pkg=~(pkgname)s +file=/tmp/${pkg}-requires +cat $file +exit 0 + +EOF +chmod +x find-requires + %define __find_requires %_builddir/find-requires ln -s find-deps.sh find-provides %define __find_provides %_builddir/find-provides @@ -512,6 +530,7 @@ * ~(date)s Sator Arepo %chg_epoch%version-%release - Autorepackaged the version from Sisyphus. """.replace('%', '%%').replace('~', '%') % DictSearch({ + 'pkgname': pkg, 'mangled-name': source.mangle(pkg), 'filelist': '\n'.join(fl), 'instlist': '\n'.join(x.startswith('%dir ') and x[5:] or x for x in fl),