SPECS: openjdk.spec - provide java(ClassDataVersion)
glen
glen at pld-linux.org
Tue Apr 10 00:34:08 CEST 2007
Author: glen Date: Mon Apr 9 22:34:08 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- provide java(ClassDataVersion)
---- Files affected:
SPECS:
openjdk.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SPECS/openjdk.spec
diff -u SPECS/openjdk.spec:1.1 SPECS/openjdk.spec:1.2
--- SPECS/openjdk.spec:1.1 Tue Apr 10 00:31:40 2007
+++ SPECS/openjdk.spec Tue Apr 10 00:34:03 2007
@@ -1,6 +1,9 @@
# $Revision$, $Date$
# TODO
# - all
+
+# class data version seen with file(1) that this jvm is able to load
+%define _classdataversion 50.0
Summary: Open-source JDK, an implementation of the Java Platform
Name: openjdk
Version: 1.7.0
@@ -13,9 +16,11 @@
# Source1-md5: df51d7e061c3e97adf7a61a406c42d74
Source2: http://www.java.net/download/openjdk/jdk7/promoted/b10/jtreg_bin-3_2_2_01-fcs-bin-b03-21_Mar_2007.zip
# Source2-md5: 1b501642684b7cfe8aff3fa60c5a2083
+Source3: Test.java
URL: https://openjdk.dev.java.net/
BuildRequires: jpackage-utils
BuildRequires: rpmbuild(macros) >= 1.357
+Provides: java(ClassDataVersion) = %{_classdataversion}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -31,9 +36,19 @@
exec java -jar %{_javadir}/javac-%{version}.jar ${1:+"$@"}
EOF
+cp %{SOURCE3} Test.java
+
%build
cd compiler
%ant
+cd -
+
+./compiler/dist/bin/javac Test.java
+classver=$(file Test.class | grep -o 'compiled Java class data, version [0-9.]*' | awk '{print $NF}')
+if [ "$classver" != %{_classdataversion} ]; then
+ echo "Set %%define _classdataversion to $classver and rerun."
+ exit 1
+fi
%install
rm -rf $RPM_BUILD_ROOT
@@ -58,6 +73,8 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2007/04/09 22:34:03 glen
+- provide java(ClassDataVersion)
+
Revision 1.1 2007/04/09 22:31:40 glen
- new, sun's GPLv2 licensed jdk/jre
-
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/openjdk.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list