- Adds tzdata-java support for new tzdata file format used by OpenJDK8.
This commit is contained in:
Patsy Franklin 2014-05-28 11:25:03 -04:00
parent 8e01d8936f
commit 5abe2e3365
3 changed files with 24 additions and 1 deletions

1
.gitignore vendored
View File

@ -105,3 +105,4 @@ noarch/
/tzdata2014b.tar.gz
/tzcode2014c.tar.gz
/tzdata2014c.tar.gz
/javazic-1.8-37392f2f5d59.tar.xz

View File

@ -1,3 +1,4 @@
6a3392cd5f1594d13c12c1a836ac8d91 javazic.tar.gz
657636f201ae8b561225afde49d274af tzcode2014c.tar.gz
fa7f3dc1c6f6238253a6f2b850467e2e tzdata2014c.tar.gz
cfc79fbbb17f21052d3dd7634ec70bea javazic-1.8-37392f2f5d59.tar.xz

View File

@ -3,7 +3,7 @@ Name: tzdata
Version: 2014c
%define tzdata_version 2014c
%define tzcode_version 2014c
Release: 1%{?dist}
Release: 2%{?dist}
License: Public Domain
Group: System Environment/Base
URL: https://www.iana.org/time-zones
@ -27,6 +27,7 @@ the world.
Summary: Timezone data for Java
Group: System Environment/Base
Source3: javazic.tar.gz
Source4: javazic-1.8-37392f2f5d59.tar.xz
Patch100: javazic-fixup.patch
Patch101: javazic-exclusion-fix.patch
@ -57,6 +58,10 @@ find . -type f -name '*.java' -print0 \
-e 's:sun\.util\.:rht.util.:g'
popd
tar xf %{SOURCE4}
echo "%{name}%{tzdata_version}" >> VERSION
%build
FILES="africa antarctica asia australasia europe northamerica southamerica
pacificnew etcetera backward"
@ -68,6 +73,7 @@ zic -y ./yearistype -d zoneinfo/right -L leapseconds $FILES
grep -v tz-art.htm tz-link.htm > tz-link.html
# Java 6/7 tzdata
pushd javazic
javac -source 1.5 -target 1.5 -classpath . `find . -name \*.java`
popd
@ -76,12 +82,23 @@ java -classpath javazic/ rht.tools.javazic.Main -V %{version} \
-d javazi \
$FILES javazic/tzdata_jdk/gmt javazic/tzdata_jdk/jdk11_backward
# Java 8 tzdata
pushd javazic-1.8
javac -source 1.7 -target 1.7 -classpath . `find . -name \*.java`
popd
java -classpath javazic-1.8 build.tools.tzdb.TzdbZoneRulesCompiler \
-srcdir . -dstfile tzdb.dat \
$FILES `find -type f javazic-1.8/tzdata_jdk/`
%install
rm -fr $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_datadir}
cp -prd zoneinfo $RPM_BUILD_ROOT%{_datadir}
install -p -m 644 zone.tab iso3166.tab $RPM_BUILD_ROOT%{_datadir}/zoneinfo
cp -prd javazi $RPM_BUILD_ROOT%{_datadir}/javazi
mkdir -p $RPM_BUILD_ROOT%{_datadir}/javazi-1.8
install -p -m 644 tzdb.dat $RPM_BUILD_ROOT%{_datadir}/javazi-1.8/
%clean
rm -rf $RPM_BUILD_ROOT
@ -96,8 +113,12 @@ rm -rf $RPM_BUILD_ROOT
%files java
%defattr(-,root,root)
%{_datadir}/javazi
%{_datadir}/javazi-1.8
%changelog
* Wed May 28 2014 Patsy Franklin <pfrankli@redhat.com> 2014c-2
- Add support for new tzdata file format used by OpenJDK8.
* Wed May 14 2014 Patsy Franklin <pfrankli@redhat.com> 2014c-1
- Rebase to 2014c
-Egypt will re-apply DST on May 15 at 24:00, except that DST