Blame SOURCES/libguestfs-find-requires.sh

022f11
#!/bin/bash -
022f11
# Additional custom requires for libguestfs package.
022f11
022f11
original_find_requires="$1"
022f11
shift
022f11
022f11
# Get the list of files.
022f11
files=`sed "s/['\"]/\\\&/g"`
022f11
022f11
# Use ordinary find-requires first.
022f11
echo $files | tr [:blank:] '\n' | $original_find_requires
022f11
0d20ef
# Is supermin.d/packages included in the list of files?
0d20ef
packages=`echo $files | tr [:blank:] '\n' | grep 'supermin\.d/packages$'`
022f11
0d20ef
if [ -z "$packages" ]; then
022f11
    exit 0
022f11
fi
022f11
0d20ef
# Generate one 'Requires:' line for each package listed in packages.
0d20ef
cat $packages
0d20ef
0d20ef
# We need to add library dependencies required by guestfsd (which
0d20ef
# is in the appliance).
0d20ef
guestfsd=$RPM_BUILD_ROOT/usr/sbin/guestfsd
0d20ef
if [ ! -x $guestfsd ]; then
0d20ef
    echo "$0: cannot find guestfsd" >&2
0d20ef
    exit 1
0d20ef
fi
0d20ef
echo $guestfsd | $original_find_requires