]> git.pld-linux.org Git - packages/tzdata.git/blame_incremental - tzdata.spec
- more complete summary
[packages/tzdata.git] / tzdata.spec
... / ...
CommitLineData
1#
2# Conditional build
3%bcond_without tests # make check
4#
5%define tzcode_ver 2009a
6%define tzdata_ver 2009a
7Summary: Timezone data
8Summary(pl.UTF-8): Dane o strefach czasowych
9Name: tzdata
10Version: %{tzdata_ver}
11Release: 1
12License: Public Domain (database), BSD/LGPL v2.1+ (code/test suite)
13Group: Base
14Source0: %{name}-base-0.tar.bz2
15# Source0-md5: 906a4c98cc5240f416524a256b039c42
16Source1: ftp://elsie.nci.nih.gov/pub/%{name}%{tzdata_ver}.tar.gz
17# Source1-md5: 979cb227a83d7fbb954611a4fb5b1949
18Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz
19# Source2-md5: 6a20a58704c779e3006394cf38a1dc0a
20Source3: timezone.init
21Source4: timezone.sysconfig
22Patch0: %{name}-test-update.patch
23URL: http://www.twinsun.com/tz/tz-link.htm
24BuildRequires: gawk
25BuildRequires: perl-base
26BuildRequires: rpmbuild(macros) >= 1.228
27Requires(post,preun): /sbin/chkconfig
28Requires: /sbin/chkconfig
29Requires: rc-scripts >= 0.4.1.4
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34This package contains data files with rules for various timezones
35around the world.
36
37%description -l pl.UTF-8
38Ten pakiet zawiera pliki z danymi na temat reguł stref czasowych na
39całym świecie.
40
41%package zoneinfo_right
42Summary: Non-POSIX (real) time zones
43Summary(es.UTF-8): Zonas de tiempo reales (no de POSIX)
44Summary(pl.UTF-8): Nie-POSIX-owe (prawdziwe) strefy czasowe
45Group: Libraries
46Obsoletes: glibc-zoneinfo_right
47
48%description zoneinfo_right
49You don't want this. Details at:
50<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
51
52%description zoneinfo_right -l es.UTF-8
53No lo necesita. Encontrará los detalles en:
54<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
55
56%description zoneinfo_right -l pl.UTF-8
57Nie potrzebujesz tego. Szczegóły pod:
58<http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
59
60%package devel
61Summary: tzfile header file
62Summary(pl.UTF-8): Plik nagłówkowy tzfile
63Group: Development/Libraries
64
65%description devel
66Header file for timezone database.
67
68%description devel -l pl.UTF-8
69Plik nagłówkowy bazy danych stref czasowych.
70
71%prep
72%setup -qc
73mv tzdata/* .
74%{__tar} xzf %{SOURCE1} -C tzdata
75mkdir tzcode
76%{__tar} xzf %{SOURCE2} -C tzcode
77%patch0 -p1
78
79sed -e "
80s|@objpfx@|`pwd`/obj/|
81s|@datadir@|%{_datadir}|
82s|@install_root@|$RPM_BUILD_ROOT|
83" Makeconfig.in > Makeconfig
84
85grep -v tz-art.htm tzcode/tz-link.htm > tzcode/tz-link.html
86
87%build
88%{__make}
89
90%install
91rm -rf $RPM_BUILD_ROOT
92install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
93install -d $RPM_BUILD_ROOT%{_includedir}
94install -d $RPM_BUILD_ROOT%{_mandir}/man5
95
96%{__make} install
97
98%if %{with tests}
99: ====================TESTING=========================
100%{__make} check \
101 CC="%{__cc}" \
102 CFLAGS="%{rpmcflags} %{rpmldflags}"
103: ====================TESTING END=====================
104%endif
105
106
107# glibc.spec didn't keep it. so won't here either.
108rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix
109# behave more like glibc.spec
110ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime
111ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime
112ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules
113
114> $RPM_BUILD_ROOT/etc/localtime
115
116# header file
117install tzcode/tzfile.h $RPM_BUILD_ROOT%{_includedir}/tzfile.h
118install tzcode/tzfile.5 $RPM_BUILD_ROOT%{_mandir}/man5
119
120install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone
121cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone
122
123%clean
124rm -rf $RPM_BUILD_ROOT
125
126%post
127/sbin/chkconfig --add timezone
128%service timezone restart
129
130%preun
131if [ "$1" = "0" ]; then
132 /sbin/chkconfig --del timezone
133
134 # save for postun
135 cp -f /etc/localtime /etc/localtime.rpmsave
136fi
137
138%postun
139if [ "$1" = "0" ]; then
140 if [ ! -f /etc/localtime -a -f /etc/localtime.rpmsave ]; then
141 mv -f /etc/localtime{.rpmsave,}
142 fi
143fi
144
145%triggerpostun -- rc-scripts < 0.4.1.4
146/sbin/chkconfig --add timezone
147
148%triggerpostun -- tzdata < 2008b-4
149if ! grep -q '^TIMEZONE=' /etc/sysconfig/timezone; then
150 . /etc/sysconfig/timezone
151
152 if [ -z $ZONE_INFO_AREA ]; then
153 TIMEZONE=$TIME_ZONE
154 else
155 TIMEZONE=$ZONE_INFO_AREA/$TIME_ZONE
156 fi
157
158 echo "TIMEZONE=\"$TIMEZONE\"" >> /etc/sysconfig/timezone
159
160 %service timezone restart
161fi
162
163%files
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
169
170%{_datadir}/zoneinfo
171%exclude %{_datadir}/zoneinfo/right
172
173%files zoneinfo_right
174%defattr(644,root,root,755)
175%{_datadir}/zoneinfo/right
176
177%files devel
178%defattr(644,root,root,755)
179%doc tzcode/tzfile.5.txt
180%{_includedir}/tzfile.h
181%{_mandir}/man5/tzfile.5*
This page took 0.044638 seconds and 4 git commands to generate.