3 %bcond_without tests # make check
5 %define tzcode_ver 2009a
6 %define tzdata_ver 2009a
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: 979cb227a83d7fbb954611a4fb5b1949
18 Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz
19 # Source2-md5: 6a20a58704c779e3006394cf38a1dc0a
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: rc-scripts >= 0.4.1.4
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 This package contains data files with rules for various timezones
37 %description -l pl.UTF-8
38 Ten pakiet zawiera pliki z danymi na temat reguł stref czasowych na
41 %package zoneinfo_right
42 Summary: Non-POSIX (real) time zones
43 Summary(es.UTF-8): Zonas de tiempo reales (no de POSIX)
44 Summary(pl.UTF-8): Nie-POSIX-owe (prawdziwe) strefy czasowe
46 Obsoletes: glibc-zoneinfo_right
48 %description zoneinfo_right
49 You don't want this. Details at:
50 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
52 %description zoneinfo_right -l es.UTF-8
53 No lo necesita. Encontrará los detalles en:
54 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
56 %description zoneinfo_right -l pl.UTF-8
57 Nie potrzebujesz tego. Szczegóły pod:
58 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
61 Summary: tzfile header
62 Summary(pl.UTF-8): nagłówek tzfile
63 Group: Development/Libraries
66 Header file for timezone database.
68 %description devel -l pl.UTF-8
69 Plik nagłówkowy bazy danych stref czasowych.
74 %{__tar} xzf %{SOURCE1} -C tzdata
76 %{__tar} xzf %{SOURCE2} -C tzcode
80 s|@objpfx@|`pwd`/obj/|
81 s|@datadir@|%{_datadir}|
82 s|@install_root@|$RPM_BUILD_ROOT|
83 " Makeconfig.in > Makeconfig
85 grep -v tz-art.htm tzcode/tz-link.htm > tzcode/tz-link.html
91 rm -rf $RPM_BUILD_ROOT
92 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
93 install -d $RPM_BUILD_ROOT%{_includedir}
94 install -d $RPM_BUILD_ROOT%{_mandir}/man5
99 : ====================TESTING=========================
102 CFLAGS="%{rpmcflags} %{rpmldflags}"
103 : ====================TESTING END=====================
107 # glibc.spec didn't keep it. so won't here either.
108 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix
109 # behave more like glibc.spec
110 ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
111 ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
112 ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
114 > $RPM_BUILD_ROOT/etc/localtime
117 install tzcode/tzfile.h $RPM_BUILD_ROOT%{_includedir}/tzfile.h
118 install tzcode/tzfile.5 $RPM_BUILD_ROOT%{_mandir}/man5
120 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone
121 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone
124 rm -rf $RPM_BUILD_ROOT
127 /sbin/chkconfig --add timezone
128 %service timezone restart
131 if [ "$1" = "0" ]; then
132 /sbin/chkconfig --del timezone
135 cp -f /etc/localtime /etc/localtime.rpmsave
139 if [ "$1" = "0" ]; then
140 if [ ! -f /etc/localtime -a -f /etc/localtime.rpmsave ]; then
141 mv -f /etc/localtime{.rpmsave,}
145 %triggerpostun -- rc-scripts < 0.4.1.4
146 /sbin/chkconfig --add timezone
148 %triggerpostun -- tzdata < 2008b-4
149 if ! grep -q '^TIMEZONE=' /etc/sysconfig/timezone; then
150 . /etc/sysconfig/timezone
152 if [ -z $ZONE_INFO_AREA ]; then
155 TIMEZONE=$ZONE_INFO_AREA/$TIME_ZONE
158 echo "TIMEZONE=\"$TIMEZONE\"" >> /etc/sysconfig/timezone
160 %service timezone restart
164 %defattr(644,root,root,755)
165 %doc tzcode/README tzcode/Theory tzcode/tz-link.html
166 %ghost /etc/localtime
167 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/timezone
168 %attr(754,root,root) /etc/rc.d/init.d/timezone
171 %exclude %{_datadir}/zoneinfo/right
173 %files zoneinfo_right
174 %defattr(644,root,root,755)
175 %{_datadir}/zoneinfo/right
178 %defattr(644,root,root,755)
179 %doc tzcode/tzfile.5.txt
180 %{_includedir}/tzfile.h
181 %{_mandir}/man5/tzfile.5*