%define tzcode_version %{version} %define with_openjdk 0 %if %with_openjdk %define javahome %{_jvmdir}/jdk %define buildopts -source 1.5 -target 1.5 %else %define javahome %{java_home} %define buildopts %{nil} %endif Name: tzdata Version: 2018g Release: 1mamba Summary: timezone data Group: System/Internationalization Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: ftp://elsie.nci.nih.gov/pub/ # wget ftp://distfiles.pld-linux.org/distfiles/by-md5/9/0/906a4c98cc5240f416524a256b039c42/tzdata-base-0.tar.bz2 Source0: http://www.iana.org/time-zones/repository/releases/tzdata%{version}.tar.gz #Source1: http://www.iana.org/time-zones/repository/releases/tzcode%{tzcode_version}.tar.gz # the sources are inside the package OpenJDK Source3: javazic.tar.gz Patch0: javazic-fixup.patch Patch1: tzdata-2011b-c.patch Patch2: tzdata-2011d-kemerovo.patch License: Public Domain ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END BuildRequires: gawk BuildRequires: glibc BuildRequires: perl BuildRequires: timezone %if "%{stage1}" != "1" %if %with_openjdk BuildRequires: java-openjdk %else BuildRequires: java-gcj-compat %endif %endif BuildRoot: %{_tmppath}/%{name}-%{version}-root %description This package contains data files with rules for various timezones around the world. %package java Summary: Timezone data for Java Group: System/Internationalization %description java This package contains timezone information for use by Java runtimes. %prep %setup -q -c %if "%{stage1}" != "1" mkdir javazic tar zxf %{S:3} -C javazic cd javazic %patch0 # 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' %endif %build %if "%{stage1}" != "1" cd javazic %ifarch arm export LD_PRELOAD=%{_libdir}/libatomic.so.1 %endif %{javahome}/bin/javac %{buildopts} -classpath . `find . -name \*.java` cd .. %{javahome}/bin/java -classpath javazic/ rht.tools.javazic.Main -V %{version} \ -d zoneinfo/java \ africa antarctica asia australasia backward etcetera europe \ northamerica pacificnew southamerica systemv \ javazic/tzdata_jdk/gmt javazic/tzdata_jdk/jdk11_backward %endif %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" timezones=('africa' 'antarctica' 'asia' 'australasia' 'europe' 'northamerica' 'southamerica' 'pacificnew' 'etcetera' 'backward' 'systemv' 'factory') %{_sbindir}/zic -y ./yearistype -d %{buildroot}%{_datadir}/zoneinfo ${timezones[@]} %{_sbindir}/zic -y ./yearistype -d %{buildroot}%{_datadir}/zoneinfo/posix ${timezones[@]} %{_sbindir}/zic -y ./yearistype -d %{buildroot}%{_datadir}/zoneinfo/right -L leapseconds ${timezones[@]} %{_sbindir}/zic -y ./yearistype -d %{buildroot}%{_datadir}/zoneinfo -p America/New_York install -m444 -t %{buildroot}%{_datadir}/zoneinfo iso3166.tab zone.tab %if "%{stage1}" != "1" cp -pr zoneinfo/java %{buildroot}%{_datadir}/javazi %endif # FIXME # *** Timezone: Asia/Tokyo, daylight is: 0 but should be: 1 # *** Timezone: Asia/Tokyo, tzname[1] is: JST but should be: JDT %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_datadir}/zoneinfo %if "%{stage1}" != "1" %files java %defattr(-,root,root) %{_datadir}/javazi %endif %changelog * Tue Oct 30 2018 Automatic Build System 2018g-1mamba - automatic version update by autodist * Sun Oct 21 2018 Automatic Build System 2018f-1mamba - automatic version update by autodist * Wed May 09 2018 Automatic Build System 2018e-1mamba - automatic version update by autodist * Fri Mar 30 2018 Automatic Build System 2018d-1mamba - automatic version update by autodist * Thu Jan 25 2018 Automatic Build System 2018c-1mamba - automatic version update by autodist * Wed Nov 01 2017 Automatic Build System 2017c-1mamba - automatic version update by autodist * Fri Mar 31 2017 Automatic Build System 2017b-1mamba - automatic version update by autodist * Wed Mar 08 2017 Automatic Build System 2017a-1mamba - automatic version update by autodist * Mon Dec 05 2016 Automatic Build System 2016j-1mamba - automatic version update by autodist * Sat Nov 05 2016 Automatic Build System 2016i-1mamba - automatic version update by autodist * Sat Oct 22 2016 Automatic Build System 2016h-1mamba - automatic version update by autodist * Wed Oct 05 2016 Automatic Build System 2016g-1mamba - automatic version update by autodist * Tue Jul 12 2016 Automatic Build System 2016f-1mamba - automatic version update by autodist * Sat Jun 18 2016 Automatic Build System 2016e-1mamba - automatic version update by autodist * Fri Apr 22 2016 Automatic Build System 2016d-1mamba - automatic version update by autodist * Sat Mar 26 2016 Automatic Build System 2016c-1mamba - automatic version update by autodist * Fri Mar 18 2016 Automatic Build System 2016b-1mamba - automatic version update by autodist * Mon Feb 01 2016 Automatic Build System 2016a-1mamba - automatic version update by autodist * Thu Oct 08 2015 Automatic Build System 2015g-1mamba - automatic version update by autodist * Sat Aug 15 2015 Automatic Build System 2015f-1mamba - automatic version update by autodist * Mon Jun 22 2015 Automatic Build System 2015e-1mamba - automatic version update by autodist * Sat May 02 2015 Automatic Build System 2015d-1mamba - automatic version update by autodist * Sun Apr 19 2015 Automatic Build System 2015c-1mamba - automatic version update by autodist * Fri Mar 27 2015 Automatic Build System 2015b-1mamba - automatic version update by autodist * Thu Feb 05 2015 Automatic Build System 2015a-1mamba - automatic version update by autodist * Wed Nov 19 2014 Automatic Build System 2014j-1mamba - automatic version update by autodist * Sun Oct 26 2014 Automatic Build System 2014i-1mamba - automatic version update by autodist * Sun Sep 28 2014 Automatic Build System 2014h-1mamba - automatic version update by autodist * Tue Sep 09 2014 Automatic Build System 2014g-1mamba - automatic version update by autodist * Sun Aug 24 2014 Automatic Build System 2014f-1mamba - automatic version update by autodist * Tue Jun 17 2014 Automatic Build System 2014e-1mamba - automatic version update by autodist * Thu Jun 05 2014 Automatic Build System 2014d-1mamba - automatic version update by autodist * Mon May 19 2014 Automatic Build System 2014c-1mamba - automatic version update by autodist * Fri Mar 28 2014 Automatic Build System 2014b-1mamba - automatic version update by autodist * Mon Mar 10 2014 Automatic Build System 2014a-1mamba - automatic version update by autodist * Sat Feb 08 2014 Automatic Build System 2013i-1mamba - automatic version update by autodist * Sun Oct 27 2013 Automatic Build System 2013h-1mamba - automatic version update by autodist * Tue Oct 15 2013 Automatic Build System 2013g-1mamba - automatic version update by autodist * Sun Sep 01 2013 Automatic Build System 2013d-1mamba - automatic version update by autodist * Sun Apr 28 2013 Automatic Build System 2013c-1mamba - update to 2013c * Fri Apr 01 2011 Silvan Calarco 2011d-2mamba - build using %{_java_home} - remove conflict with timezone (will be fixed after glibc update) - add stage1 for non-java build * Sat Mar 26 2011 gil 2011d-1mamba - update to 2011d * Fri Mar 11 2011 gil 2011b-2mamba - add fix for kemerovo area should use OMST/OMSST abbreviation - add fix for delay end of DST in chile in 2011 until first sunday in april * Wed Feb 16 2011 gil 2011b-1mamba - update to 2011b * Thu Dec 30 2010 gil 2010o-2mamba - rebuilt with java-openjdk * Mon Dec 27 2010 gil 2010o-1mamba - update to 2010o * Tue Feb 24 2009 gil 2009b-1mamba - package created by autospec