]>
Commit | Line | Data |
---|---|---|
6b9abb55 JB |
1 | # |
2 | # Conditional build | |
3 | %bcond_without tests # make check | |
4 | # | |
e8606b5e | 5 | %define tzdata_ver 2007j |
6 | %define tzcode_ver 2007j | |
f21a80a6 | 7 | Summary: Timezone data |
e5477455 | 8 | Summary(pl.UTF-8): Dane o strefach czasowych |
f21a80a6 | 9 | Name: tzdata |
6b9abb55 | 10 | Version: %{tzdata_ver} |
67cb7a3e | 11 | Release: 2 |
6b9abb55 | 12 | License: Public Domain (database), BSD/LGPL v2.1+ (code/test suite) |
3458d90a | 13 | Group: Base |
0b5f1229 ER |
14 | Source0: %{name}-base-0.tar.bz2 |
15 | # Source0-md5: 906a4c98cc5240f416524a256b039c42 | |
6b9abb55 | 16 | Source1: ftp://elsie.nci.nih.gov/pub/%{name}%{tzdata_ver}.tar.gz |
e8606b5e | 17 | # Source1-md5: cca2880ec98ad43a0a6ba0bc9beb81c1 |
6b9abb55 | 18 | Source2: ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz |
e8606b5e | 19 | # Source2-md5: 02f71a69ea46f5217dc54b987720b820 |
48f17b2c ER |
20 | Source3: timezone.init |
21 | Source4: timezone.sysconfig | |
25404fb0 | 22 | Patch0: %{name}-test-update.patch |
6b9abb55 | 23 | URL: http://www.twinsun.com/tz/tz-link.htm |
f21a80a6 | 24 | BuildRequires: gawk |
3458d90a | 25 | BuildRequires: perl-base |
48f17b2c ER |
26 | BuildRequires: rpmbuild(macros) >= 1.228 |
27 | Requires(post,preun): /sbin/chkconfig | |
28 | Requires: rc-scripts >= 0.4.1.4 | |
f21a80a6 | 29 | BuildArch: noarch |
95a1ed16 | 30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
f21a80a6 PZ |
31 | |
32 | %description | |
3458d90a JB |
33 | This package contains data files with rules for various timezones |
34 | around the world. | |
35 | ||
151d1751 JR |
36 | %description -l pl.UTF-8 |
37 | Ten pakiet zawiera pliki z danymi na temat reguł stref czasowych na | |
38 | całym świecie. | |
f21a80a6 | 39 | |
33e5a5b5 ER |
40 | %package zoneinfo_right |
41 | Summary: Non-POSIX (real) time zones | |
e5477455 ER |
42 | Summary(es.UTF-8): Zonas de tiempo reales (no de POSIX) |
43 | Summary(pl.UTF-8): Nie-POSIX-owe (prawdziwe) strefy czasowe | |
33e5a5b5 | 44 | Group: Libraries |
37e6efaa | 45 | Obsoletes: glibc-zoneinfo_right |
33e5a5b5 ER |
46 | |
47 | %description zoneinfo_right | |
48 | You 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 |
52 | No 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 |
56 | Nie 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 | 61 | mkdir %{name}%{version} |
a360159e | 62 | %{__tar} xzf %{SOURCE1} -C %{name}%{version} |
f21a80a6 | 63 | mkdir tzcode%{version} |
a360159e | 64 | %{__tar} xzf %{SOURCE2} -C tzcode%{version} |
25404fb0 | 65 | %patch0 -p1 |
f21a80a6 | 66 | |
0b5f1229 ER |
67 | sed -e " |
68 | s|@objpfx@|`pwd`/obj/| | |
69 | s|@datadir@|%{_datadir}| | |
70 | s|@install_root@|$RPM_BUILD_ROOT| | |
71 | " Makeconfig.in > Makeconfig | |
72 | ||
73 | grep -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 | 79 | rm -rf $RPM_BUILD_ROOT |
48f17b2c | 80 | install -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. |
94 | rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posix | |
95 | # behave more like glibc.spec | |
96 | ln -sf %{_sysconfdir}/localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/localtime | |
97 | ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixtime | |
98 | ln -sf localtime $RPM_BUILD_ROOT%{_datadir}/zoneinfo/posixrules | |
99 | ||
4747911d AM |
100 | > $RPM_BUILD_ROOT/etc/localtime |
101 | ||
48f17b2c ER |
102 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone |
103 | cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone | |
104 | ||
f21a80a6 | 105 | %clean |
95a1ed16 | 106 | rm -rf $RPM_BUILD_ROOT |
f21a80a6 | 107 | |
48f17b2c ER |
108 | %post |
109 | /sbin/chkconfig --add timezone | |
110 | %service timezone restart | |
111 | ||
112 | %preun | |
113 | if [ "$1" = "0" ]; then | |
114 | /sbin/chkconfig --del timezone | |
115 | fi | |
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 |