2 # This script reads filenames from STDIN and outputs any relevant provides
3 # information that needs to be included in the package.
5 export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
6 PATH=${PATH}:$(dirname $0)
8 javadeps_args='--requires --rpmformat --keywords'
15 # Break out if there are no more args
22 # Get the first arg, and shuffle
26 # Make all options have two hyphens
27 orig_option=$option # Save original for error messages
30 -*) option=-$option ;;
47 echo "$0: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
56 # check only files, symlinks could point outside buildroot
57 [ ! -f "$file" -o -L "$file" ] || return
60 unzip -q -d $tmp $file >&2
61 classver=$(find $tmp -type f -name '*.class' | xargs -r -d'\n' file | grep -o 'compiled Java class data, version [0-9.]*' | awk '{print $NF}' | sort -u)
63 [ "$classver" ] || return
64 for v in $classver; do
65 echo "java(ClassDataVersion) >= $v"
69 for file in $(cat -); do
72 javaclassversion "$file"
75 done | sort -u | egrep -v \'$IGNORE_DEPS\'