Projects
home:pandora:RobinOS23
tzdata
_service:download_src_package:tzdata.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:tzdata.spec of Package tzdata
%define anolis_release 2 %define tzdata_version 2022a %define tzcode_version 2022a Name: tzdata Version: 2022a Release: %{anolis_release}%{?dist} License: Public Domain Summary: Timezone data URL: https://www.iana.org/time-zones Source0: ftp://ftp.iana.org/tz/releases/tzdata%{tzdata_version}.tar.gz Source1: ftp://ftp.iana.org/tz/releases/tzcode%{tzcode_version}.tar.gz Patch002: 0002-Fix-have-snprintf-error.patch BuildRequires: make BuildRequires: gawk, glibc, perl-interpreter BuildRequires: java-devel BuildRequires: java-1.8.0-devel BuildRequires: glibc-common >= 2.5.90-7 Conflicts: glibc-common <= 2.3.2-63 BuildArchitectures: noarch %description This package contains data files with rules for various timezones around the world. %package doc Summary: Documentation files for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc The %{name}-doc package contains documentation files for %{name}. %package java Summary: Timezone data for Java Source3: javazic.tar.gz Source4: javazic-1.8-37392f2f5d59.tar.xz Patch100: javazic-fixup.patch Patch101: rebase-01.patch Patch102: rebase-02.patch Patch103: 7090844.patch Patch104: 7133138.patch %description java This package contains timezone information for use by Java runtimes. %prep %setup -q -c -a 1 %patch002 -p1 # tzdata-2018g introduced 25:00 transition times. This breaks OpenJDK. # Use rearguard for java mkdir rearguard make VERSION=%{version} tzdata%{version}-rearguard.tar.gz mv tzdata%{version}-rearguard.tar.gz rearguard pushd rearguard tar zxf tzdata%{version}-rearguard.tar.gz popd # Use rearguard (overwrite default vangaurd data) tar zxf rearguard/tzdata%{version}-rearguard.tar.gz mkdir javazic tar zxf %{SOURCE3} -C javazic pushd javazic %patch100 %patch101 %patch102 %patch103 %patch104 # Hack alert! sun.tools may be defined and installed in the # VM. In order to guarantee that we are using IcedTea/OpenJDK # for creating the zoneinfo files, rebase all the packages # from "sun." to "rht.". Unfortunately, gcj does not support # any of the -Xclasspath options, so we must go this route # to ensure the greatest compatibility. mv sun rht find . -type f -name '*.java' -print0 \ | xargs -0 -- sed -i -e 's:sun\.tools\.:rht.tools.:g' \ -e 's:sun\.util\.:rht.util.:g' popd tar xf %{SOURCE4} echo "%{name}%{tzdata_version}" >> VERSION %build # Run make to create the tzdata.zi file rm tzdata.zi make VERSION=%{version} DATAFORM=rearguard tzdata.zi FILES="africa antarctica asia australasia europe northamerica southamerica etcetera backward factory" mkdir zoneinfo/{,posix,right} zic -y ./yearistype -d zoneinfo -L /dev/null -p America/New_York $FILES zic -y ./yearistype -d zoneinfo/posix -L /dev/null $FILES zic -y ./yearistype -d zoneinfo/right -L leapseconds $FILES # grep -v tz-art.htm tz-link.htm > tz-link.html # tzdata-2018g introduced 25:00 which breaks java - use the rearguard files for java JAVA_FILES="rearguard/africa rearguard/antarctica rearguard/asia \ rearguard/australasia rearguard/europe rearguard/northamerica \ rearguard/southamerica rearguard/etcetera \ rearguard/backward" # Java 6/7 tzdata pushd javazic /usr/lib/jvm/java-1.8.0-openjdk/bin/javac -source 1.6 -target 1.6 -classpath . `find . -name \*.java` popd java -classpath javazic/ rht.tools.javazic.Main -V %{version} \ -d javazi \ $JAVA_FILES javazic/tzdata_jdk/gmt javazic/tzdata_jdk/jdk11_backward # Java 8 tzdata pushd javazic-1.8 /usr/lib/jvm/java-17-openjdk/bin/javac -source 1.8 -target 1.8 -classpath . `find . -name \*.java` popd java -classpath javazic-1.8 build.tools.tzdb.TzdbZoneRulesCompiler \ -srcdir . -dstfile tzdb.dat \ -verbose \ $JAVA_FILES javazic-1.8/tzdata_jdk/gmt javazic-1.8/tzdata_jdk/jdk11_backward %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 zone1970.tab iso3166.tab leapseconds tzdata.zi $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/ %files %{_datadir}/zoneinfo %license LICENSE %doc theory.html %doc tz-link.html %doc tz-art.html %files doc %doc README %files java %{_datadir}/javazi %{_datadir}/javazi-1.8 %changelog * Wed Oct 12 2022 mgb01105731 <mgb01105731@alibaba-inc.com> - 2022a-2 - add doc package * Thu Jun 09 2022 happy_orange <songnannan@linux.alibaba.com> = 2022a-1 - update to 2022a * Wed Mar 9 2022 Liwei Ge <liwei.glw@linux.alibaba.com> - 2021e-1 - Init version from upstream v2021e
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2