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