3 %bcond_without tests # make check
5 %define tzcode_ver 2008e
6 %define tzdata_ver 2008e
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: 3b4578110a3d193ed9a00d61f27aba28
18 Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz
19 # Source2-md5: 12ec2d85324ddcba39db1471a03f486b
20 Source3: timezone.init
21 Source4: timezone.sysconfig
22 Patch0: %{name}-test-update.patch
23 URL: http://www.twinsun.com/tz/tz-link.htm
25 BuildRequires: perl-base
26 BuildRequires: rpmbuild(macros) >= 1.228
27 Requires(post,preun): /sbin/chkconfig
28 Requires: /sbin/chkconfig
29 Requires(post,preun): rc-scripts
30 Requires: rc-scripts >= 0.4.1.4
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 This package contains data files with rules for various timezones
38 %description -l pl.UTF-8
39 Ten pakiet zawiera pliki z danymi na temat reguł stref czasowych na
42 %package zoneinfo_right
43 Summary: Non-POSIX (real) time zones
44 Summary(es.UTF-8): Zonas de tiempo reales (no de POSIX)
45 Summary(pl.UTF-8): Nie-POSIX-owe (prawdziwe) strefy czasowe
47 Obsoletes: glibc-zoneinfo_right
49 %description zoneinfo_right
50 You don't want this. Details at:
51 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
53 %description zoneinfo_right -l es.UTF-8
54 No lo necesita. Encontrará los detalles en:
55 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
57 %description zoneinfo_right -l pl.UTF-8
58 Nie potrzebujesz tego. Szczegóły pod:
59 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
64 %{__tar} xzf %{SOURCE1} -C tzdata
66 %{__tar} xzf %{SOURCE2} -C tzcode
70 s|@objpfx@|`pwd`/obj/|
71 s|@datadir@|%{_datadir}|
72 s|@install_root@|$RPM_BUILD_ROOT|
73 " Makeconfig.in > Makeconfig
75 grep -v tz-art.htm tzcode/tz-link.htm > tzcode/tz-link.html
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
87 : ====================TESTING=========================
90 CFLAGS="%{rpmcflags} %{rpmldflags}"
91 : ====================TESTING END=====================
95 # glibc.spec didn't keep it. so won't here either.
96 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix
97 # behave more like glibc.spec
98 ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
99 ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
100 ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
102 > $RPM_BUILD_ROOT/etc/localtime
104 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone
105 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone
108 rm -rf $RPM_BUILD_ROOT
111 /sbin/chkconfig --add timezone
112 %service timezone restart
115 if [ "$1" = "0" ]; then
116 /sbin/chkconfig --del timezone
119 cp -f /etc/localtime /etc/localtime.rpmsave
123 if [ "$1" = "0" ]; then
124 if [ ! -f /etc/localtime -a -f /etc/localtime.rpmsave ]; then
125 mv -f /etc/localtime{.rpmsave,}
129 %triggerpostun -- rc-scripts < 0.4.1.4
130 /sbin/chkconfig --add timezone
132 %triggerpostun -- tzdata < 2008b-4
133 if ! grep -q '^TIMEZONE=' /etc/sysconfig/timezone; then
134 . /etc/sysconfig/timezone
136 if [ -z $ZONE_INFO_AREA ]; then
139 TIMEZONE=$ZONE_INFO_AREA/$TIME_ZONE
142 echo "TIMEZONE=\"$TIMEZONE\"" >> /etc/sysconfig/timezone
144 %service timezone restart
148 %defattr(644,root,root,755)
149 %doc tzcode/README tzcode/Theory tzcode/tz-link.html
150 %ghost /etc/localtime
151 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/timezone
152 %attr(754,root,root) /etc/rc.d/init.d/timezone
155 %exclude %{_datadir}/zoneinfo/right
157 %files zoneinfo_right
158 %defattr(644,root,root,755)
159 %{_datadir}/zoneinfo/right