From fc717ea969d5afc0f212698c41be0ae3afd697d59d83ec9e3431a10481ede58b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 6 Oct 2017 08:54:45 +0000 Subject: [PATCH] Accepting request 530676 from Java:packages Allow building with java > 1.7 OBS-URL: https://build.opensuse.org/request/show/530676 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/javazic?expand=0&rev=13 --- javazic.changes | 7 +++++++ javazic.spec | 44 +++++++++++++++++--------------------------- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/javazic.changes b/javazic.changes index db624ef..8a730a4 100644 --- a/javazic.changes +++ b/javazic.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 2 14:02:52 UTC 2017 - fstrba@suse.com + +- Move the sun.util.calendar to sun.whatever.calendar in order to + avoid clash with internal java classes that have different + interface in jdk8+ + ------------------------------------------------------------------- Tue May 8 07:31:14 UTC 2012 - cfarrell@suse.com diff --git a/javazic.spec b/javazic.spec index 4930ec4..7a18c4f 100644 --- a/javazic.spec +++ b/javazic.spec @@ -1,7 +1,7 @@ # -# spec file for package javazic (Version 1.6.0) +# spec file for package javazic # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,56 +15,46 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: javazic -BuildRequires: gcc-java -BuildRequires: fastjar -License: GPL-2.0-with-classpath-exception -Summary: A time zone compiler for Java -Group: Development/Libraries/Java # javazic source codes comes from openjdk6-b09 source archive # see package java-1_6_0-java for details and source code Version: 1.6.0 -Release: 2 +Release: 0 +Summary: A time zone compiler for Java +License: GPL-2.0-with-classpath-exception +Group: Development/Libraries/Java Url: http://icedtea.classpath.org -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch Source0: javazic.tar.gz Patch0: javazic-fixup.patch +BuildRequires: java-devel +BuildArch: noarch %description This is a time zone compiler for opensource Java Virtual Machine derived from openjdk6 source code. - - %prep %setup -q -c %{name}-%{version} %patch0 -b .javazic-fixup %build -gcj -C $(find sun/ -iname '*.java') +mv sun/util sun/whatever +perl -pi -e 's#sun\.util\.calendar#sun\.whatever\.calendar#g' $(find sun/ -iname '*.java') +javac -source 6 -target 6 $(find sun/ -iname '*.java') echo "Main-Class: sun.tools.javazic.Main" > manifest.txt -fastjar -cfm %{name}-%{version}.jar manifest.txt $(find . -iname '*.class') +jar -cfm %{name}-%{version}.jar manifest.txt $(find . -iname '*.class') %install -install -d -m 0755 $RPM_BUILD_ROOT/%{_javadir} -install -m 0644 %{name}-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/ +install -d -m 0755 %{buildroot}/%{_javadir} +install -m 0644 %{name}-%{version}.jar %{buildroot}/%{_javadir}/ # jars -(cd $RPM_BUILD_ROOT%{_javadir}/ && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done) -install -d -m 0755 $RPM_BUILD_ROOT/%{_datadir}/%{name} -cp -rp tzdata_jdk $RPM_BUILD_ROOT/%{_datadir}/%{name}/ - -%clean -rm -rf $RPM_BUILD_ROOT +(cd %{buildroot}%{_javadir}/ && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done) +install -d -m 0755 %{buildroot}/%{_datadir}/%{name} +cp -rp tzdata_jdk %{buildroot}/%{_datadir}/%{name}/ %files -%defattr(-,root,root,0755) %{_javadir}/%{name}*.jar %{_datadir}/%{name} %changelog -* Wed Sep 10 2008 mvyskocil@suse.cz -- Initial packaging of javazic (used for timezone-java package)