3 %bcond_without tests # make check
5 %define tzcode_ver 2010j
6 %define tzdata_ver 2010j
8 Summary(pl.UTF-8): Dane o strefach czasowych
10 Version: %{tzdata_ver}
12 License: Public Domain (database), BSD/LGPL v2.1+ (code/test suite)
14 Source0: %{name}-base-0.tar.bz2
15 # Source0-md5: 906a4c98cc5240f416524a256b039c42
16 Source1: ftp://elsie.nci.nih.gov/pub/%{name}%{tzdata_ver}.tar.gz
17 # Source1-md5: f668f66b260e14b477eac3f48bcfb5f4
18 Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz
19 # Source2-md5: 5ba8345720296d3a659b349b2052d139
20 Source3: timezone.init
21 Source4: timezone.sysconfig
22 Patch0: %{name}-test-update.patch
23 URL: http://www.twinsun.com/tz/tz-link.htm
24 BuildRequires: rpmbuild(macros) >= 1.228
25 Requires(post,preun): /sbin/chkconfig
26 Requires: /sbin/chkconfig
27 Requires: rc-scripts >= 0.4.1.4
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 This package contains data files with rules for various timezones
35 %description -l pl.UTF-8
36 Ten pakiet zawiera pliki z danymi na temat reguł stref czasowych na
39 %package zoneinfo_right
40 Summary: Non-POSIX (real) time zones
41 Summary(es.UTF-8): Zonas de tiempo reales (no de POSIX)
42 Summary(pl.UTF-8): Nie-POSIX-owe (prawdziwe) strefy czasowe
44 Obsoletes: glibc-zoneinfo_right
46 %description zoneinfo_right
47 You don't want this. Details at:
48 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
50 %description zoneinfo_right -l es.UTF-8
51 No lo necesita. Encontrará los detalles en:
52 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
54 %description zoneinfo_right -l pl.UTF-8
55 Nie potrzebujesz tego. Szczegóły pod:
56 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
59 Summary: tzfile header file
60 Summary(pl.UTF-8): Plik nagłówkowy tzfile
61 Group: Development/Libraries
64 Header file for timezone database.
66 %description devel -l pl.UTF-8
67 Plik nagłówkowy bazy danych stref czasowych.
72 %{__tar} xzf %{SOURCE1} -C tzdata
74 %{__tar} xzf %{SOURCE2} -C tzcode
78 s|@objpfx@|`pwd`/obj/|
79 s|@datadir@|%{_datadir}|
80 s|@install_root@|$RPM_BUILD_ROOT|
81 " 'Makeconfig.in' > Makeconfig
83 grep -v tz-art.htm tzcode/tz-link.htm > tzcode/tz-link.html
89 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
91 install -d $RPM_BUILD_ROOT%{_includedir}
92 install -d $RPM_BUILD_ROOT%{_mandir}/man5
97 : ====================TESTING=========================
100 CFLAGS="%{rpmcflags} %{rpmldflags}"
101 : ====================TESTING END=====================
105 # glibc.spec didn't keep it. so won't here either.
106 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix
107 # behave more like glibc.spec
108 ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
109 ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
110 ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
112 > $RPM_BUILD_ROOT/etc/localtime
115 cp -a tzcode/tzfile.h $RPM_BUILD_ROOT%{_includedir}/tzfile.h
116 cp -a tzcode/tzfile.5 $RPM_BUILD_ROOT%{_mandir}/man5
118 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone
119 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone
122 rm -rf $RPM_BUILD_ROOT
125 /sbin/chkconfig --add timezone
126 %service timezone restart
129 if [ "$1" = "0" ]; then
130 /sbin/chkconfig --del timezone
133 cp -f /etc/localtime /etc/localtime.rpmsave
137 if [ "$1" = "0" ]; then
138 if [ ! -f /etc/localtime -a -f /etc/localtime.rpmsave ]; then
139 mv -f /etc/localtime{.rpmsave,}
143 %triggerpostun -- rc-scripts < 0.4.1.4
144 /sbin/chkconfig --add timezone
146 %triggerpostun -- tzdata < 2008b-4
147 if ! grep -q '^TIMEZONE=' /etc/sysconfig/timezone; then
148 . /etc/sysconfig/timezone
150 if [ -z $ZONE_INFO_AREA ]; then
153 TIMEZONE=$ZONE_INFO_AREA/$TIME_ZONE
156 echo "TIMEZONE=\"$TIMEZONE\"" >> /etc/sysconfig/timezone
158 %service timezone restart
162 %defattr(644,root,root,755)
163 %doc tzcode/README tzcode/Theory tzcode/tz-link.html
164 %ghost /etc/localtime
165 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/timezone
166 %attr(754,root,root) /etc/rc.d/init.d/timezone
169 %exclude %{_datadir}/zoneinfo/right
171 %files zoneinfo_right
172 %defattr(644,root,root,755)
173 %{_datadir}/zoneinfo/right
176 %defattr(644,root,root,755)
177 %doc tzcode/tzfile.5.txt
178 %{_includedir}/tzfile.h
179 %{_mandir}/man5/tzfile.5*