165 lines
5.3 KiB
RPMSpec
165 lines
5.3 KiB
RPMSpec
|
%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: 2014b
|
||
|
Release: 1mamba
|
||
|
Summary: timezone data
|
||
|
Group: System/Internationalization
|
||
|
Vendor: openmamba
|
||
|
Distribution: openmamba
|
||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
|
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
|
||
|
%{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
|
||
|
* Fri Mar 28 2014 Automatic Build System <autodist@mambasoft.it> 2014b-1mamba
|
||
|
- automatic version update by autodist
|
||
|
|
||
|
* Mon Mar 10 2014 Automatic Build System <autodist@mambasoft.it> 2014a-1mamba
|
||
|
- automatic version update by autodist
|
||
|
|
||
|
* Sat Feb 08 2014 Automatic Build System <autodist@mambasoft.it> 2013i-1mamba
|
||
|
- automatic version update by autodist
|
||
|
|
||
|
* Sun Oct 27 2013 Automatic Build System <autodist@mambasoft.it> 2013h-1mamba
|
||
|
- automatic version update by autodist
|
||
|
|
||
|
* Tue Oct 15 2013 Automatic Build System <autodist@mambasoft.it> 2013g-1mamba
|
||
|
- automatic version update by autodist
|
||
|
|
||
|
* Sun Sep 01 2013 Automatic Build System <autodist@mambasoft.it> 2013d-1mamba
|
||
|
- automatic version update by autodist
|
||
|
|
||
|
* Sun Apr 28 2013 Automatic Build System <autodist@mambasoft.it> 2013c-1mamba
|
||
|
- update to 2013c
|
||
|
|
||
|
* Fri Apr 01 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 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 <puntogil@libero.it> 2011d-1mamba
|
||
|
- update to 2011d
|
||
|
|
||
|
* Fri Mar 11 2011 gil <puntogil@libero.it> 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 <puntogil@libero.it> 2011b-1mamba
|
||
|
- update to 2011b
|
||
|
|
||
|
* Thu Dec 30 2010 gil <puntogil@libero.it> 2010o-2mamba
|
||
|
- rebuilt with java-openjdk
|
||
|
|
||
|
* Mon Dec 27 2010 gil <puntogil@libero.it> 2010o-1mamba
|
||
|
- update to 2010o
|
||
|
|
||
|
* Tue Feb 24 2009 gil <puntogil@libero.it> 2009b-1mamba
|
||
|
- package created by autospec
|