%define buildsubdir %{name}-%{version} %define upstream_src http://unicode.org/cldr/data/common/supplemental/supplementalData.xml Name: tzdata-windows2tzid Version: 1.7 Release: 1%{?dist} Summary: Maps Windows timezone IDs to the standard TZIDs Group: System Environment/Base License: Redistributable, no modification permitted URL: http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/windows_tzid.html Source0: windows2tzid Source1: %{upstream_src} Source2: http://www.unicode.org/copyright.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl, perl-XML-SAX Requires: tzdata %description This package maps Windows timezone names into standard TZID timezone names. The mapping is extracted from the UNICODE data in: %{upstream_src} Installing the package will create the needed symbolic links in %{_datadir}/zoneinfo. %prep mkdir -p %{buildsubdir} && cd %{buildsubdir} cp %{SOURCE0} . chmod 755 windows2tzid cp %{SOURCE2} . %build set -e cd %{buildsubdir} # We don't package the script used to build the links # Why would we want its manpage? #perldoc ./windows2tzid > windows2tzid.1 rm -rf zoneinfo mkdir zoneinfo && cd zoneinfo ../windows2tzid %{SOURCE1} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/share cd %{buildsubdir} cp -a zoneinfo $RPM_BUILD_ROOT/usr/share/ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 #install -m644 windows2tzid.1 $RPM_BUILD_ROOT%{_mandir}/man1 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_datadir}/zoneinfo/* %doc %{buildsubdir}/copyright.html #%doc %{_mandir}/man1/windows2tzid.1* %changelog * Sat Oct 31 2009 Oron Peled - 1.7-1 - Initial packaging