From 280e69d9a539cf066a3a072e9c8fda6e97a420f1 Mon Sep 17 00:00:00 2001 From: Damir Shayhutdinov Date: Sat, 10 Feb 2007 19:16:04 +0300 Subject: [PATCH] Added hooks for Java autoreq facility. Signed-off-by: Damir Shayhutdinov --- autodeps/linux.prov.in | 2 ++ autodeps/linux.req.in | 31 +++++++++++++++++++++++++++++++ platform.in | 4 ++-- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/autodeps/linux.prov.in b/autodeps/linux.prov.in index cd59580..c13d977 100755 --- a/autodeps/linux.prov.in +++ b/autodeps/linux.prov.in @@ -64,6 +64,8 @@ ParseMethod() nomono) FIND_MONO= ;; + java|nojava) + ;; pam) FIND_PAM=1 ;; diff --git a/autodeps/linux.req.in b/autodeps/linux.req.in index f1980e2..965b1d4 100755 --- a/autodeps/linux.req.in +++ b/autodeps/linux.req.in @@ -39,6 +39,7 @@ FIND_FILES= FIND_LIBPERL= FIND_LIBS= FIND_MONO= +FIND_JAVA= FIND_PAM= FIND_PERL= FIND_PKGCONFIG= @@ -57,6 +58,7 @@ ParseMethod() FIND_LIBPERL= FIND_LIBS= FIND_MONO= + FIND_JAVA= FIND_PAM= FIND_PERL= FIND_PKGCONFIG= @@ -88,6 +90,12 @@ ParseMethod() nomono) FIND_MONO= ;; + java) + FIND_JAVA=1 + ;; + nojava) + FIND_JAVA= + ;; pam) FIND_PAM=1 ;; @@ -131,6 +139,7 @@ ParseMethod() FIND_LIBPERL=1 FIND_LIBS=1 FIND_MONO=1 + FIND_JAVA=1 FIND_PAM=1 FIND_PERL=1 FIND_PKGCONFIG=1 @@ -162,6 +171,7 @@ if [ -z "$FIND_FILES" -a \ -z "$FIND_LIBPERL" -a \ -z "$FIND_LIBS" -a \ -z "$FIND_MONO" -a \ + -z "$FIND_JAVA" -a \ -z "$FIND_PKGCONFIG" -a \ -z "$FIND_SCRIPT" ]; then # Nothing to do @@ -188,6 +198,7 @@ esac FOUND_REQS= LIST_MONO= +LIST_JAVA= LIST_PERL= LIST_PYTHON= LIST_TCL= @@ -203,6 +214,17 @@ FindMonoReqs() $r" } +FindJavaReqs() +{ + [ -n "$FIND_JAVA" -a -n "$LIST_JAVA" -a -x "@RPMCONFIGDIR@/java.req" ] || return 0 + + local r + r="$(printf %s\\n "$LIST_JAVA" | + @RPMCONFIGDIR@/java.req "$RPM_BUILD_DIR" "$RPM_BUILD_ROOT" "$RPM_LIBDIR")" || return 1 + [ -z "$FOUND_REQS" ] && FOUND_REQS="$r" || FOUND_REQS="$FOUND_REQS +$r" +} + ListScriptReqs() { [ -n "$FIND_SCRIPT" ] || return 0 @@ -424,6 +446,12 @@ $r" $f" elif [ -z "${t##*MS Windows PE*}" ]; then [ -z "$LIST_MONO" ] && LIST_MONO="$f" || LIST_MONO="$LIST_MONO +$f" + elif [ -z "${t##*Zip archive data*}" -a -z "${f##*.jar}" ]; then + [ -z "$LIST_JAVA" ] && LIST_JAVA="$f" || LIST_JAVA="$LIST_JAVA +$f" + elif [ -z "${t##*compiled Java class data*}" ]; then + [ -z "$LIST_JAVA" ] && LIST_JAVA="$f" || LIST_JAVA="$LIST_JAVA $f" fi done @@ -431,6 +459,9 @@ done # Find requires in listed .Net files, if any FindMonoReqs +# Find requires in listed Java files, if any +FindJavaReqs + # Find requires in listed perl scripts, if any FindPerlReqs diff --git a/platform.in b/platform.in index 19c778e..92cea1f 100644 --- a/platform.in +++ b/platform.in @@ -454,8 +454,8 @@ @alt@%_tcl_req_skip "" @alt@%_fixup_method binconfig pkgconfig libtool @alt@%_strip_method %{?_enable_debug:none}%{!?_enable_debug:executable shared} -@alt@%_findreq_default_method files lib mono pam perl pkgconfig python shell tcl -@alt@%_findprov_default_method lib mono pam perl pkgconfig python shell tcl +@alt@%_findreq_default_method files lib mono java pam perl pkgconfig python shell tcl +@alt@%_findprov_default_method lib mono java pam perl pkgconfig python shell tcl @alt@ @alt@%_cleanup_topdir %nil @alt@%_compress_topdir %_usr