View | Details | Raw Unified | Return to bug 16266
Collapse All | Expand All

(-)/usr/bin/arepo (-1 / +20 lines)
Lines 462-475 Link Here
462
%build
462
%build
463
cat >install.sh <<'EOF'
463
cat >install.sh <<'EOF'
464
#!/bin/sh -e
464
#!/bin/sh -e
465
pkg=~(pkgname)s
466
>/tmp/${pkg}-requires
467
list=
465
for file in "$@"; do
468
for file in "$@"; do
466
        if [ -d "$file" ]; then
469
        if [ -d "$file" ]; then
467
            install -d -- "%buildroot$file"
470
            install -d -- "%buildroot$file"
468
        else
471
        else
472
	    echo === $file
473
            list="${list} `ldd "$file"|cut -d '>' -f 2|grep \.so|cut -f 1 -d '('`"
469
            mkdir -p -- "`dirname %buildroot$file`"
474
            mkdir -p -- "`dirname %buildroot$file`"
470
            cp -a -- "$file" "%buildroot$file"
475
            cp -a -- "$file" "%buildroot$file"
471
        fi
476
        fi
472
done
477
done
478
list=`for l in $list; do echo $l; done|sort|uniq`
479
list=`for l in $list; do rpm -qf --queryformat '%{NAME}\n' $l; done|sort|uniq`
480
echo search for $pkg in $list
481
for l in $list; do [ $l = $pkg ] && echo skip $l || echo i586-$l >> /tmp/${pkg}-requires; done
473
EOF
482
EOF
474
chmod +x install.sh
483
chmod +x install.sh
475
484
Lines 493-499 Link Here
493
EOF
502
EOF
494
chmod +x find-deps.sh
503
chmod +x find-deps.sh
495
504
496
ln -s find-deps.sh find-requires
505
cat >find-requires <<'EOF'
506
#!/bin/sh -e
507
pkg=~(pkgname)s
508
file=/tmp/${pkg}-requires
509
cat $file
510
exit 0
511
512
EOF
513
chmod +x find-requires
514
497
%define __find_requires %_builddir/find-requires
515
%define __find_requires %_builddir/find-requires
498
ln -s find-deps.sh find-provides
516
ln -s find-deps.sh find-provides
499
%define __find_provides %_builddir/find-provides
517
%define __find_provides %_builddir/find-provides
Lines 512-517 Link Here
512
* ~(date)s Sator Arepo <nobody@altlinux.ru> %chg_epoch%version-%release
530
* ~(date)s Sator Arepo <nobody@altlinux.ru> %chg_epoch%version-%release
513
- Autorepackaged the version from Sisyphus.
531
- Autorepackaged the version from Sisyphus.
514
    """.replace('%', '%%').replace('~', '%') % DictSearch({
532
    """.replace('%', '%%').replace('~', '%') % DictSearch({
533
        'pkgname': pkg,
515
        'mangled-name': source.mangle(pkg),
534
        'mangled-name': source.mangle(pkg),
516
        'filelist': '\n'.join(fl),
535
        'filelist': '\n'.join(fl),
517
        'instlist': '\n'.join(x.startswith('%dir ') and x[5:] or x for x in fl),
536
        'instlist': '\n'.join(x.startswith('%dir ') and x[5:] or x for x in fl),

Return to bug 16266