Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 6ab88fc6cadde5dd9bed50bab586be4c > files > 3

timezone-2008f-1mdv2009.0.src.rpm

%define name	timezone
%define epoch	6
%define version	2008f
%define release	%mkrel 1

%define tzdata_version %{version}
%define tzcode_version 2008e

# 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
Patch3:		tzdata-brazil-decree-6558.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:	java-rpmbuild

%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
%patch3 -p1 -b .brazil-decree-6558

ln -s Makeconfig.in Makeconfig
cat > config.mk << EOF
objpfx = `pwd`/obj/
sbindir = %{_sbindir}
datadir = %{_datadir}
install_root = %{buildroot}
# Workaround gcc 4.3 bug, don't use -O2 optimization flag (#41246)
sysdep-CFLAGS = %(echo %{optflags} | sed 's/-O2/-O1/')
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.new
	while read link cur old x; do
		case $link-${cur+cur}-${old+old}${x:+X} in
		Link-cur-old)
			awk -v cur="$cur" -v old="$old" \
				'!/^#/ && $3 == cur { sub(cur,old); print }' \
				zone.tab || echo ERROR ;;
		Link-*)
			echo 'Error processing backward entry for zone.tab'
			exit 1 ;;
		esac
	done < backward >> zone.tab.new
	if grep -q '^ERROR' zone.tab.new || ! cat zone.tab.new >> zone.tab; then
		echo "Error adding backward entries to zone.tab"
		exit 1
	fi
	rm -f zone.tab.new
popd

%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
* Thu Sep 18 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2008f-1mdv2009.0
+ Revision: 285579
- 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

* Mon Jul 28 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2008e-1mdv2009.0
+ Revision: 251783
- Updated tzcode/tzdata to 2008e release.

* Mon Jul 07 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2008d-1mdv2009.0
+ Revision: 232519
- tzdata update (2008d)
- Workaround gcc 4.3 bug, don't use -O2 optimization flag (#41246).
- 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.

* Wed May 28 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2008c-1mdv2009.0
+ Revision: 212165
- Rediffed tzdata-extra-tz-links patch.
- Added enhanced script to create zone.info entries for deprecated zone
  names (mdv bug #40184), contributed by Ken Pizzini.
- Updated to 2008c.

* Tue Apr 29 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2008b-2mdv2009.0
+ Revision: 199328
- Create zone.info entries for deprecated zone names (#40184).

* Wed Mar 26 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2008b-1mdv2008.1
+ Revision: 190201
- Updated to 2008b.

* Mon Mar 10 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2008a-1mdv2008.1
+ Revision: 183773
- Updated to 2008a.

* Thu Jan 10 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2007k-3mdv2008.1
+ Revision: 147456
- tzdata-base-0.tar.bz2: update tst-timezone.c with the one from
  glibc 2.7
- update-localtime.sh: make sure /etc/localtime has the right
  permissions after copy using install -m (#30045).

* Wed Jan 02 2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2007k-2mdv2008.1
+ Revision: 140418
- Updated to 2007k.
- Removed BuildRequires for java-devel-gcj, doesn't seems to be required
  when using java-rpmbuild.

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Sun Dec 16 2007 Anssi Hannula <anssi@mandriva.org> 6:2007j-2mdv2008.1
+ Revision: 121034
- buildrequire java-rpmbuild, i.e. build with icedtea on x86(_64)

* Thu Dec 06 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2007j-1mdv2008.1
+ Revision: 115994
- Updated to 2007j.

* Mon Nov 05 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 6:2007i-1mdv2008.1
+ Revision: 106148
- Updated to 2007i.
- More cleanups of uneeded spec code and minor define fix.
- Don't place comment inside post -p.

* Fri Oct 12 2007 David Walluck <walluck@mandriva.org> 6:2007h-2mdv2008.1
+ Revision: 97801
- add java sources
- readd java support (this does not force java on the main package)
- Provides: tzdata = %%{version}-%%{release} for Fedora compat
- add Java support (from Fedora) and Provides: tzdata-java = %%{version}-%%{release}

  + Herton Ronaldo Krzesinski <herton@mandriva.com.br>
    - Revert previous change, timezone java stuff now has a new entry on
      svn, named timezone-java.

* 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