%define name timezone %define epoch 6 %define version 2008i %define release %mkrel 1 %define tzdata_version %{version} %define tzcode_version 2008h # the zic(8) and zdump(8) manpages are already in man-pages %define build_manpages 0 Summary: Timezone data Name: %{name} Epoch: %{epoch} Version: %{version} Release: %{release} License: GPL Group: System/Base Conflicts: glibc < 6:2.2.5-6mdk Source0: tzdata-base-0.tar.bz2 Source1: ftp://elsie.nci.nih.gov/pub/tzdata%{tzdata_version}.tar.gz Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_version}.tar.gz Source3: javazic.tar.gz Source4: update-localtime.sh Patch0: tzdata-mdvconfig.patch Patch1: tzdata-extra-tz-links.patch Patch2: javazic-fixup.patch Provides: tzdata = %{version}-%{release} BuildRequires: gawk, perl BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description This package contains data files with rules for various timezones around the world. %package java Summary: Timezone data for Java Group: System/Base Provides: tzdata-java = %{version}-%{release} BuildRequires: jpackage-utils BuildRequires: java-devel-gcj %description java This package contains timezone information for use by Java runtimes. %prep %setup -q -n tzdata mkdir tzdata%{tzdata_version} tar xzf %{SOURCE1} -C tzdata%{tzdata_version} mkdir tzcode%{tzcode_version} tar xzf %{SOURCE2} -C tzcode%{tzcode_version} %patch0 -p1 -b .mdvconfig %patch1 -p1 -b .extra-tz-links ln -s Makeconfig.in Makeconfig cat > config.mk << EOF objpfx = `pwd`/obj/ sbindir = %{_sbindir} datadir = %{_datadir} install_root = %{buildroot} sysdep-CFLAGS = %{optflags} EOF mkdir javazic tar xf %{SOURCE3} -C javazic pushd javazic %patch2 -p0 -b .javazic-fixup # 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 for f in `find . -name '*.java'`; do sed -i -e 's:sun\.tools\.:rht.tools.:g'\ -e 's:sun\.util\.:rht.util.:g' $f done popd # Create zone.info entries for deprecated zone names (#40184) pushd tzdata%{tzdata_version} chmod +w zone.tab echo "# zone info for backward zone names" >> zone.tab cat backward | grep Link | while read link curr old; do if [ -z "$curr" -o -z "$old" ]; then echo "Error processing backward entry for zone.tab" exit 1 fi cat zone.tab | grep -v '^#' | grep "$curr" | \ while read l; do if [ "`echo \"$l\" | awk 'BEGIN { FS = \"[\t]\" } \ { print $3 }'`" = "$curr" ]; then echo "$l" | sed "s|$curr|$old|" >> zone.tab \ || echo ERROR >> zone.tab else echo ERROR >> zone.tab fi done done popd if grep -q "^ERROR" tzdata%{tzdata_version}/zone.tab; then echo "Error adding backward entries to zone.tab" exit 1 fi %build %make grep -v tz-art.htm tzcode%{tzcode_version}/tz-link.htm > tzcode%{tzcode_version}/tz-link.html pushd javazic %{javac} -source 1.5 -target 1.5 -classpath . `find . -name \*.java` popd pushd tzdata%{tzdata_version} %{java} -classpath ../javazic/ rht.tools.javazic.Main -V %{version} \ -d ../zoneinfo/java \ africa antarctica asia australasia europe northamerica pacificnew \ southamerica backward etcetera solar87 solar88 solar89 systemv \ ../javazic/tzdata_jdk/gmt ../javazic/tzdata_jdk/jdk11_backward popd %install rm -rf %{buildroot} make install cp -a zoneinfo/java $RPM_BUILD_ROOT%{_datadir}/javazi # nuke unpackaged files rm -f %{buildroot}%{_sysconfdir}/localtime # install man pages %if %{build_manpages} mkdir -p %{buildroot}%{_mandir}/man8 for f in zic zdump; do install -m 644 tzcode*/$f.8 %{buildroot}%{_mandir}/man8/ done %endif # install update-localtime script mkdir -p %{buildroot}%{_sbindir} install -m 755 %{SOURCE4} %{buildroot}%{_sbindir}/update-localtime perl -pi -e 's|\@datadir\@|%{_datadir}|;' \ -e 's|\@sysconfdir\@|%{_sysconfdir}|' \ %{buildroot}%{_sbindir}/update-localtime %check echo ====================TESTING========================= make check echo ====================TESTING END===================== # XXX next glibc updates are expected to remove /etc/localtime %triggerpostun -- glibc < 6:2.4-8mdv2007.1 if [ ! -f %{_sysconfdir}/localtime ]; then %{_sbindir}/update-localtime fi %post -p %{_sbindir}/update-localtime %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc tzcode%{tzcode_version}/README %doc tzcode%{tzcode_version}/Theory %doc tzcode%{tzcode_version}/tz-link.html %{_sbindir}/zdump %{_sbindir}/zic %{_sbindir}/update-localtime %if %{build_manpages} %{_mandir}/man8/zdump.8* %{_mandir}/man8/zic.8* %endif %dir %{_datadir}/zoneinfo %{_datadir}/zoneinfo/* %files java %defattr(-,root,root) %{_datadir}/javazi %changelog * Tue Oct 28 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2008i-1mdv2008.0 + Revision: 297928 - Updated tzdata to 2008i release. * Mon Oct 20 2008 Security Team <security@mandriva.com> 6:2008h-1mdv2008.0 + Revision: 295775 - + Revision: 293784 Updated tzcode/tzdata to 2008h release. Removed already applied tzdata-brazil-decree-6558.patch + Herton Ronaldo Krzesinski <herton@mandriva.com.br> - Updated tzcode/tzdata to 2008h release. - Removed already applied tzdata-brazil-decree-6558.patch * Tue Oct 07 2008 Security Team <security@mandriva.com> 6:2008f-1mdv2008.0 + Revision: 291183 - + Revision: 285582 Updated tzdata to 2008f Use now fixed Brazil rule for daylight savings time (decree 6558), patch based on a previous one by Frederico A. C. Neves + Herton Ronaldo Krzesinski <herton@mandriva.com.br> - Updated tzdata to 2008f - Use now fixed Brazil rule for daylight savings time (decree 6558), patch based on a previous one by Frederico A. C. Neves * Thu Aug 28 2008 Vincent Danen <vdanen@mandriva.com> 6:2008e-1.1mdv2008.0 + Revision: 276964 - build for updates + Herton Ronaldo Krzesinski <herton@mandriva.com.br> - Updated tzcode/tzdata to 2008e release. * Thu Jul 17 2008 Gustavo De Nardin <gustavodn@mandriva.com> 2008d-1.1mdv2008.0 + Revision: 236661 - build for updates + Herton Ronaldo Krzesinski <herton@mandriva.com.br> - Updated tzdata to 2008d - Make sure we don't add blank lines to zone.tab to prevent bad parsers from crashing (also it isn't clear if blank lines is really allowed), as example see bug #41218. - Updated to 2008c - Rediffed tzdata-extra-tz-links.patch - Create zone.info entries for deprecated zone names (#40184). - Updated to 2008b. - Updated to 2008a. - Rediffed tzdata-extra-tz-links.patch - update-localtime.sh: make sure /etc/localtime has the right permissions after copy using install -m (#30045). - Updated to 2007k. - Rediffed tzdata-extra-tz-links.patch - Updated to 2007j. - Don't place comment inside post -p, minor cleanups of unused code. - Readded timezone support for java from cooker. - Updated tzdata to 2007i. - Rediffed tzdata-extra-tz-links patch. - Revert previous change, timezone java stuff now has a new entry on svn, named timezone-java. + Marcelo Ricardo Leitner <mrl@mandriva.com> - Branching 2008.0 Updates + David Walluck <walluck@mandriva.org> - Provides: tzdata = %%{version}-%%{release} for Fedora compat - add Java support (from Fedora) and Provides: tzdata-java = %%{version}-%%{release} * Mon Oct 01 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2007h-1mdv2008.0 + Revision: 94275 - Updated to 2007h. - Removed already applied 2007-2008 Brazil tzdata update. * Fri Sep 21 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2007g-2mdv2008.0 + Revision: 91947 - Updated daylight savings time definitions for Brazil (2007/2008). As always they keep changing this every year... * Mon Sep 17 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2007g-1mdv2008.0 + Revision: 89289 - Updated to 2007g. - Rediff tzdata-extra-tz-links patch. * Wed Aug 08 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2007f-2mdv2008.0 + Revision: 60013 - Cleanup: remove tzdata-tzcode2006a.patch, not needed anymore. * Wed Jul 18 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 6:2007f-1mdv2008.0 + Revision: 53155 - spec file clean - new version - rediff patch1 * Wed Mar 14 2007 Gwenole Beauchesne <gbeauchesne@mandriva.com> 2007c-2mdv2007.1 + Revision: 143844 - fix triggers * Wed Mar 07 2007 Gwenole Beauchesne <gbeauchesne@mandriva.com> 6:2007c-1mdv2007.1 + Revision: 134361 - use upstream tz{data,code} 2007c * Wed Mar 07 2007 Gwenole Beauchesne <gbeauchesne@mandriva.com> 2007c-1mdv - use upstream tz{data,code} 2007c