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
This commit is contained in:
Dominique Leuenberger 2017-10-06 08:54:45 +00:00 committed by Git OBS Bridge
parent a4ac0303ad
commit fc717ea969
2 changed files with 24 additions and 27 deletions

View File

@ -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

View File

@ -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)