Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 6ee4e9e660766246adf60795c6bd0b52 > files > 1

timezone-2007h-1mdv2008.0.src.rpm

%define name	timezone
%define epoch	6
%define version	2007h
%define release	%mkrel 1

%define tzdata_version %{version}
%define tzcode_version %{version}

# the zic(8) and zdump(8) manpages are already in man-pages
%define build_manpages 0

# define glibc mininmal version which drops /etc/localtime
# XXX update for older distributions here
%if %{mdkversion} >= 200710
%define glibc_min_version 6:2.4-%{mkrel 8}
%endif

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:	update-localtime.sh
Patch0:		tzdata-mdvconfig.patch
Patch1:		tzdata-extra-tz-links.patch
BuildRequires:	gawk, perl
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
This package contains data files with rules for various timezones
around the world.

%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

%build
%make
grep -v tz-art.htm tzcode%{tzcode_version}/tz-link.htm > tzcode%{tzcode_version}/tz-link.html

%install
rm -rf %{buildroot}

make install

# 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 %{SOURCE3} %{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=====================

%post -p %{_sbindir}/update-localtime

# XXX next glibc updates are expected to remove /etc/localtime
%triggerpostun -- glibc %{?glibc_min_version:< %{glibc_min_version}}
if [ ! -f %{_sysconfdir}/localtime ]; then
  %{_sbindir}/update-localtime
fi

%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/*


%changelog
* Mon Oct 01 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 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