]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-find-php-requires
- rebuild with latest rpm.macros
[packages/rpm.git] / rpm-find-php-requires
1 #!/bin/sh
2 ulimit -c 0
3 cd `rpm --eval %{_builddir}`
4
5 filelist=`sed "s/['\"]/\\\&/g"`
6 if [ -f __rpm_noautoreqfiles ] ; then
7         for i in `cat __rpm_noautoreqfiles`; do
8                 filelist=`echo $filelist | sed "s![[:space:]]*$i[[:space:]]*!!g"`
9         done
10 fi
11
12 requires="`echo $filelist | /usr/lib/rpm/find-requires`"
13 requires_php="`echo $filelist | xargs /usr/lib/rpm/php.req`"
14
15 if [ -f __rpm_noautoreq ] ; then
16         for i in `cat __rpm_noautoreq`; do
17                 requires_php=`echo $requires_php | sed "s!\<$i[[:space:]]*!!g"`
18         done
19 fi
20
21 requires_php_t="$requires_php"
22 if [ -f __rpm_noautoreqdep ] ; then
23         for i in `cat __rpm_noautoreqdep`; do
24                 requires_php_t=`echo $requires_php_t | sed "s!\<$i[[:space:]]*!!g"`
25         done
26 fi
27
28 requires_mod="`LC_ALL=C rpm -q --whatprovides --qf "%{NAME}\n"  $requires_php_t 2>/dev/null`"
29 echo "$requires
30 $requires_php
31 $requires_mod"| grep -v "no package provides" | sort -u
This page took 0.081042 seconds and 3 git commands to generate.