]> git.pld-linux.org Git - packages/rpm.git/commitdiff
add java_min_classdataversion support auto/th/rpm-5.4.15-39
authorElan Ruusamäe <glen@delfi.ee>
Tue, 10 Jan 2017 16:05:17 +0000 (18:05 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 10 Jan 2017 16:05:29 +0000 (18:05 +0200)
http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2017-January/025273.html

rpm-java-requires [changed mode: 0644->0755]
rpm-javadeps.patch
rpm.spec

old mode 100644 (file)
new mode 100755 (executable)
index dc069c8..8bbac6f
@@ -16,9 +16,23 @@ export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
 # xsltproc for eclipse feature.xml
 : ${xsltproc=/usr/bin/xsltproc}
 
+# "%define java_min_classdataversion 51.0" in spec to minimum version to be 51.0
+: ${MIN_CLASSDATAVERSION=}
+
 # save $- state, to enable in functions
 debug=$-
 
+javaclassversionfilter() {
+       if [ "$MIN_CLASSDATAVERSION" ]; then
+               set -- $* "$MIN_CLASSDATAVERSION"
+       fi
+
+       local v
+       for v in $*; do
+               echo "java(ClassDataVersion) >= $v"
+       done | sort -V | tail -n 1
+}
+
 javaclassversion() {
        set -$debug
        local mode=$1; shift
@@ -33,10 +47,7 @@ javaclassversion() {
                return 1
        fi
 
-       local v
-       for v in $classver; do
-               echo "java(ClassDataVersion) >= $v"
-       done
+       javaclassversionfilter $classver
        return 0
 }
 
index 9a88b4939713d791e969a87a5d464c58b17426ed..3e8303c7efd2ee70fda057cc0780f80a35444ef7 100644 (file)
@@ -20,7 +20,7 @@
 -%__java_provides      %{_rpmhome}/javadeps.sh --provides
 -%__java_requires      %{_rpmhome}/javadeps.sh --requires
 +%__java_provides      %{nil}
-+%__java_requires      env RPM_BUILD_ROOT=%{buildroot} %{_rpmhome}/java-find-requires
++%__java_requires      env RPM_BUILD_ROOT=%{buildroot} MIN_CLASSDATAVERSION=%{?java_min_classdataversion} %{_rpmhome}/java-find-requires
  
  #     The value of CLASSPATH in build scriptlets (iff configured).
  #     
index 8901531eef2e093400b286ce36eaa59c370f0769..2e537c1e93c8dc3457ac668060cd9abbf3b21f59 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -51,7 +51,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       5.4.15
-Release:       38
+Release:       39
 License:       LGPL v2.1
 Group:         Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
This page took 0.1093 seconds and 4 git commands to generate.