]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- find requires for php pear
authorPaweł Gołaszewski <blues@pld-linux.org>
Sun, 23 Jun 2002 23:07:10 +0000 (23:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-find-php-requires -> 1.1
    rpm-php-requires -> 1.1

rpm-find-php-requires [new file with mode: 0644]
rpm-php-requires [new file with mode: 0644]

diff --git a/rpm-find-php-requires b/rpm-find-php-requires
new file mode 100644 (file)
index 0000000..20c7502
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+ulimit -c 0
+cd `rpm --eval %{_builddir}`
+
+filelist=`sed "s/['\"]/\\\&/g"`
+if [ -f __rpm_noautoreqfiles ] ; then
+       for i in `cat __rpm_noautoreqfiles`; do
+               filelist=`echo $filelist | sed "s![[:space:]]*$i[[:space:]]*!!g"`
+       done
+fi
+
+requires="`echo $filelist | /usr/lib/rpm/find-requires`"
+requires_php="`echo $filelist | xargs /usr/lib/rpm/php.req`"
+
+if [ -f __rpm_noautoreq ] ; then
+       for i in `cat __rpm_noautoreq`; do
+               requires_php=`echo $requires_php | sed "s!\<$i[[:space:]]*!!g"`
+       done
+fi
+
+requires_php_t="$requires_php"
+if [ -f __rpm_noautoreqdep ] ; then
+       for i in `cat __rpm_noautoreqdep`; do
+               requires_php_t=`echo $requires_php_t | sed "s!\<$i[[:space:]]*!!g"`
+       done
+fi
+
+requires_mod="`LC_ALL=C rpm -q --whatprovides --qf "%{NAME}\n"  $requires_php_t 2>/dev/null`"
+echo "$requires
+$requires_php
+$requires_mod"| grep -v "no package provides" | sort -u
diff --git a/rpm-php-requires b/rpm-php-requires
new file mode 100644 (file)
index 0000000..3b1123c
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+if [ $# -lt 1 ]; then
+       echo "You have to specify input file"
+       exit 1
+fi
+
+filelist=`echo $@`
+for i in $filelist; do
+       j=`cat $i |grep -i ^require_once|egrep -v "^ \*"|cut -f 2 -d "\""|sed -e "s/\//_/"|cut -f 1 -d "."`
+       if [ -n "$j" ]; then
+               echo "Requires: pear($j)"
+       fi
+       j=""
+done
+
This page took 0.056816 seconds and 4 git commands to generate.