]> git.pld-linux.org Git - packages/tzdata.git/blame - tzdata.spec
- rel 3; /etc/rc.d/ dir structure is needed
[packages/tzdata.git] / tzdata.spec
CommitLineData
6b9abb55
JB
1#
2# Conditional build
3%bcond_without tests # make check
4#
1080a83b 5%define tzcode_ver 2008e
d21391dc 6%define tzdata_ver 2008e
f21a80a6 7Summary: Timezone data
e5477455 8Summary(pl.UTF-8): Dane o strefach czasowych
f21a80a6 9Name: tzdata
6b9abb55 10Version: %{tzdata_ver}
0c2e9a42 11Release: 3
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
d21391dc 17# Source1-md5: 3b4578110a3d193ed9a00d61f27aba28
6b9abb55 18Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz
1080a83b 19# Source2-md5: 12ec2d85324ddcba39db1471a03f486b
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
0db057c4 28Requires: /sbin/chkconfig
0c2e9a42 29Requires(post,preun): rc-scripts
48f17b2c 30Requires: rc-scripts >= 0.4.1.4
f21a80a6 31BuildArch: noarch
95a1ed16 32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
f21a80a6
PZ
33
34%description
3458d90a
JB
35This package contains data files with rules for various timezones
36around the world.
37
151d1751
JR
38%description -l pl.UTF-8
39Ten pakiet zawiera pliki z danymi na temat reguł stref czasowych na
40całym świecie.
f21a80a6 41
33e5a5b5
ER
42%package zoneinfo_right
43Summary: Non-POSIX (real) time zones
e5477455
ER
44Summary(es.UTF-8): Zonas de tiempo reales (no de POSIX)
45Summary(pl.UTF-8): Nie-POSIX-owe (prawdziwe) strefy czasowe
33e5a5b5 46Group: Libraries
37e6efaa 47Obsoletes: glibc-zoneinfo_right
33e5a5b5
ER
48
49%description zoneinfo_right
50You don't want this. Details at:
e3ed8f87 51<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
33e5a5b5 52
151d1751
JR
53%description zoneinfo_right -l es.UTF-8
54No lo necesita. Encontrará los detalles en:
e3ed8f87 55<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
33e5a5b5 56
151d1751
JR
57%description zoneinfo_right -l pl.UTF-8
58Nie potrzebujesz tego. Szczegóły pod:
e3ed8f87 59<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
33e5a5b5 60
f21a80a6 61%prep
8d8e88cb
ER
62%setup -qc
63mv tzdata/* .
64%{__tar} xzf %{SOURCE1} -C tzdata
65mkdir tzcode
66%{__tar} xzf %{SOURCE2} -C tzcode
25404fb0 67%patch0 -p1
f21a80a6 68
0b5f1229
ER
69sed -e "
70s|@objpfx@|`pwd`/obj/|
71s|@datadir@|%{_datadir}|
72s|@install_root@|$RPM_BUILD_ROOT|
73" Makeconfig.in > Makeconfig
74
8d8e88cb 75grep -v tz-art.htm tzcode/tz-link.htm > tzcode/tz-link.html
0b5f1229 76
f21a80a6 77%build
3458d90a 78%{__make}
f21a80a6
PZ
79
80%install
95a1ed16 81rm -rf $RPM_BUILD_ROOT
48f17b2c 82install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
4747911d 83
3458d90a 84%{__make} install
a360159e 85
aa82ac7a 86%if %{with tests}
48f17b2c 87: ====================TESTING=========================
5db5c79b 88%{__make} check \
89 CC="%{__cc}" \
90 CFLAGS="%{rpmcflags} %{rpmldflags}"
48f17b2c 91: ====================TESTING END=====================
aa82ac7a 92%endif
48f17b2c 93
f21a80a6 94
0f163d2c
ER
95# glibc.spec didn't keep it. so won't here either.
96rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix
97# behave more like glibc.spec
98ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
99ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
100ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
101
50d7b850
AM
102> $RPM_BUILD_ROOT/etc/localtime
103
48f17b2c
ER
104install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone
105cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone
106
f21a80a6 107%clean
95a1ed16 108rm -rf $RPM_BUILD_ROOT
f21a80a6 109
48f17b2c
ER
110%post
111/sbin/chkconfig --add timezone
112%service timezone restart
113
114%preun
115if [ "$1" = "0" ]; then
116 /sbin/chkconfig --del timezone
e32f56d0
ER
117
118 # save for postun
119 cp -f /etc/localtime /etc/localtime.rpmsave
120fi
121
122%postun
123if [ "$1" = "0" ]; then
124 if [ ! -f /etc/localtime -a -f /etc/localtime.rpmsave ]; then
125 mv -f /etc/localtime{.rpmsave,}
126 fi
48f17b2c
ER
127fi
128
64a9089d
ER
129%triggerpostun -- rc-scripts < 0.4.1.4
130/sbin/chkconfig --add timezone
131
72e063bb
MB
132%triggerpostun -- tzdata < 2008b-4
133if ! grep -q '^TIMEZONE=' /etc/sysconfig/timezone; then
134 . /etc/sysconfig/timezone
135
136 if [ -z $ZONE_INFO_AREA ]; then
137 TIMEZONE=$TIME_ZONE
138 else
139 TIMEZONE=$ZONE_INFO_AREA/$TIME_ZONE
140 fi
141
142 echo "TIMEZONE=\"$TIMEZONE\"" >> /etc/sysconfig/timezone
143
144 %service timezone restart
145fi
146
f21a80a6
PZ
147%files
148%defattr(644,root,root,755)
8d8e88cb 149%doc tzcode/README tzcode/Theory tzcode/tz-link.html
50d7b850 150%ghost /etc/localtime
48f17b2c
ER
151%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/timezone
152%attr(754,root,root) /etc/rc.d/init.d/timezone
4747911d 153
3458d90a 154%{_datadir}/zoneinfo
33e5a5b5
ER
155%exclude %{_datadir}/zoneinfo/right
156
157%files zoneinfo_right
158%defattr(644,root,root,755)
159%{_datadir}/zoneinfo/right
This page took 0.103736 seconds and 4 git commands to generate.