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