]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- based on find-java-req.sh
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 10 Apr 2007 21:53:20 +0000 (21:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    find-java-prov.sh -> 1.1

find-java-prov.sh [new file with mode: 0755]

diff --git a/find-java-prov.sh b/find-java-prov.sh
new file mode 100755 (executable)
index 0000000..cbaf9cf
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh
+# This script reads filenames from STDIN and outputs any relevant provides
+# information that needs to be included in the package.
+#
+# Based on rpm-4.4.2/scripts/find-req.pl
+# Authors: Elan Ruusamäe <glen@pld-linux.org>
+
+export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
+
+IGNORE_DEPS="@"
+BUILDROOT="/"
+
+# Loop over all args
+while :; do
+# Break out if there are no more args
+       case $# in
+       0)
+               break
+               ;;
+       esac
+
+# Get the first arg, and shuffle
+       option=$1
+       shift
+
+# Make all options have two hyphens
+       orig_option=$option     # Save original for error messages
+       case $option in
+       --*) ;;
+       -*) option=-$option ;;
+       esac
+
+       case $option in
+       --buildroot)
+               BUILDROOT=$1
+               shift
+               ;;
+       --ignore_deps)
+               IGNORE_DEPS=$1
+               shift
+               ;;
+       --help)
+               echo $usage
+               exit 0
+               ;;
+       *)
+               echo "$0: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
+               exit 1
+               ;;
+       esac
+done
+
+for file in $(cat -); do
+       case $file in
+       *.jar)
+               unzip -p $file | javadeps --provides --rpmformat --keywords --starprov -
+       ;;
+       *.class)
+               javadeps --provides --rpmformat --keywords --starprov $file
+       ;;
+       esac
+done | sort -u | egrep -v \'$IGNORE_DEPS\'
This page took 0.048324 seconds and 4 git commands to generate.