]> git.pld-linux.org Git - packages/tzdata.git/blame - tzdata.spec
- added test-update patch, disables failure on Asia/Tokyo zone
[packages/tzdata.git] / tzdata.spec
CommitLineData
6b9abb55
JB
1#
2# Conditional build
3%bcond_without tests # make check
4#
5%define tzdata_ver 2007i
6%define tzcode_ver 2007h
f21a80a6 7Summary: Timezone data
e5477455 8Summary(pl.UTF-8): Dane o strefach czasowych
f21a80a6 9Name: tzdata
6b9abb55 10Version: %{tzdata_ver}
297a878b 11Release: 1
6b9abb55 12License: Public Domain (database), BSD/LGPL v2.1+ (code/test suite)
3458d90a 13Group: Base
0b5f1229
ER
14Source0: %{name}-base-0.tar.bz2
15# Source0-md5: 906a4c98cc5240f416524a256b039c42
6b9abb55 16Source1: ftp://elsie.nci.nih.gov/pub/%{name}%{tzdata_ver}.tar.gz
4665318f 17# Source1-md5: bfe68c92dbe3726676063bdb14931b8b
6b9abb55 18Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz
297a878b 19# Source2-md5: e3d9b770e2a74bcddb6aac57f699c961
48f17b2c
ER
20Source3: timezone.init
21Source4: timezone.sysconfig
25404fb0 22Patch0: %{name}-test-update.patch
6b9abb55 23URL: http://www.twinsun.com/tz/tz-link.htm
f21a80a6 24BuildRequires: gawk
3458d90a 25BuildRequires: perl-base
48f17b2c
ER
26BuildRequires: rpmbuild(macros) >= 1.228
27Requires(post,preun): /sbin/chkconfig
28Requires: rc-scripts >= 0.4.1.4
f21a80a6 29BuildArch: noarch
95a1ed16 30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
f21a80a6
PZ
31
32%description
3458d90a
JB
33This package contains data files with rules for various timezones
34around the world.
35
151d1751
JR
36%description -l pl.UTF-8
37Ten pakiet zawiera pliki z danymi na temat reguł stref czasowych na
38całym świecie.
f21a80a6 39
33e5a5b5
ER
40%package zoneinfo_right
41Summary: Non-POSIX (real) time zones
e5477455
ER
42Summary(es.UTF-8): Zonas de tiempo reales (no de POSIX)
43Summary(pl.UTF-8): Nie-POSIX-owe (prawdziwe) strefy czasowe
33e5a5b5 44Group: Libraries
37e6efaa 45Obsoletes: glibc-zoneinfo_right
33e5a5b5
ER
46
47%description zoneinfo_right
48You don't want this. Details at:
e3ed8f87 49<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
33e5a5b5 50
151d1751
JR
51%description zoneinfo_right -l es.UTF-8
52No lo necesita. Encontrará los detalles en:
e3ed8f87 53<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
33e5a5b5 54
151d1751
JR
55%description zoneinfo_right -l pl.UTF-8
56Nie potrzebujesz tego. Szczegóły pod:
e3ed8f87 57<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
33e5a5b5 58
f21a80a6 59%prep
95a1ed16 60%setup -q -n %{name}
f21a80a6 61mkdir %{name}%{version}
a360159e 62%{__tar} xzf %{SOURCE1} -C %{name}%{version}
f21a80a6 63mkdir tzcode%{version}
a360159e 64%{__tar} xzf %{SOURCE2} -C tzcode%{version}
25404fb0 65%patch0 -p1
f21a80a6 66
0b5f1229
ER
67sed -e "
68s|@objpfx@|`pwd`/obj/|
69s|@datadir@|%{_datadir}|
70s|@install_root@|$RPM_BUILD_ROOT|
71" Makeconfig.in > Makeconfig
72
73grep -v tz-art.htm tzcode%{version}/tz-link.htm > tzcode%{version}/tz-link.html
74
f21a80a6 75%build
3458d90a 76%{__make}
f21a80a6
PZ
77
78%install
95a1ed16 79rm -rf $RPM_BUILD_ROOT
48f17b2c 80install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
4747911d 81
3458d90a 82%{__make} install
a360159e 83
aa82ac7a 84%if %{with tests}
48f17b2c 85: ====================TESTING=========================
5db5c79b 86%{__make} check \
87 CC="%{__cc}" \
88 CFLAGS="%{rpmcflags} %{rpmldflags}"
48f17b2c 89: ====================TESTING END=====================
aa82ac7a 90%endif
48f17b2c 91
f21a80a6 92
0f163d2c
ER
93# glibc.spec didn't keep it. so won't here either.
94rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix
95# behave more like glibc.spec
96ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
97ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
98ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
99
4747911d
AM
100> $RPM_BUILD_ROOT/etc/localtime
101
48f17b2c
ER
102install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone
103cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone
104
f21a80a6 105%clean
95a1ed16 106rm -rf $RPM_BUILD_ROOT
f21a80a6 107
48f17b2c
ER
108%post
109/sbin/chkconfig --add timezone
110%service timezone restart
111
112%preun
113if [ "$1" = "0" ]; then
114 /sbin/chkconfig --del timezone
115fi
116
64a9089d
ER
117%triggerpostun -- rc-scripts < 0.4.1.4
118/sbin/chkconfig --add timezone
119
f21a80a6
PZ
120%files
121%defattr(644,root,root,755)
f21a80a6 122%doc tzcode%{version}/README tzcode%{version}/Theory tzcode%{version}/tz-link.html
4747911d 123%ghost /etc/localtime
48f17b2c
ER
124%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/timezone
125%attr(754,root,root) /etc/rc.d/init.d/timezone
4747911d 126
3458d90a 127%{_datadir}/zoneinfo
33e5a5b5
ER
128%exclude %{_datadir}/zoneinfo/right
129
130%files zoneinfo_right
131%defattr(644,root,root,755)
132%{_datadir}/zoneinfo/right
This page took 0.083352 seconds and 4 git commands to generate.