]> git.pld-linux.org Git - packages/tzdata.git/blob - tzdata.spec
- added test-update patch, disables failure on Asia/Tokyo zone
[packages/tzdata.git] / tzdata.spec
1 #
2 # Conditional build
3 %bcond_without  tests                   # make check
4 #
5 %define tzdata_ver      2007i
6 %define tzcode_ver      2007h
7 Summary:        Timezone data
8 Summary(pl.UTF-8):      Dane o strefach czasowych
9 Name:           tzdata
10 Version:        %{tzdata_ver}
11 Release:        1
12 License:        Public Domain (database), BSD/LGPL v2.1+ (code/test suite)
13 Group:          Base
14 Source0:        %{name}-base-0.tar.bz2
15 # Source0-md5:  906a4c98cc5240f416524a256b039c42
16 Source1:        ftp://elsie.nci.nih.gov/pub/%{name}%{tzdata_ver}.tar.gz
17 # Source1-md5:  bfe68c92dbe3726676063bdb14931b8b
18 Source2:        ftp://elsie.nci.nih.gov/pub/tzcode%{tzcode_ver}.tar.gz
19 # Source2-md5:  e3d9b770e2a74bcddb6aac57f699c961
20 Source3:        timezone.init
21 Source4:        timezone.sysconfig
22 Patch0:         %{name}-test-update.patch
23 URL:            http://www.twinsun.com/tz/tz-link.htm
24 BuildRequires:  gawk
25 BuildRequires:  perl-base
26 BuildRequires:  rpmbuild(macros) >= 1.228
27 Requires(post,preun):   /sbin/chkconfig
28 Requires:       rc-scripts >= 0.4.1.4
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 This package contains data files with rules for various timezones
34 around the world.
35
36 %description -l pl.UTF-8
37 Ten pakiet zawiera pliki z danymi na temat reguł stref czasowych na
38 całym świecie.
39
40 %package zoneinfo_right
41 Summary:        Non-POSIX (real) time zones
42 Summary(es.UTF-8):      Zonas de tiempo reales (no de POSIX)
43 Summary(pl.UTF-8):      Nie-POSIX-owe (prawdziwe) strefy czasowe
44 Group:          Libraries
45 Obsoletes:      glibc-zoneinfo_right
46
47 %description zoneinfo_right
48 You don't want this. Details at:
49 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
50
51 %description zoneinfo_right -l es.UTF-8
52 No lo necesita. Encontrará los detalles en:
53 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
54
55 %description zoneinfo_right -l pl.UTF-8
56 Nie potrzebujesz tego. Szczegóły pod:
57 <http://sources.redhat.com/ml/libc-alpha/2000-12/msg00068.html>.
58
59 %prep
60 %setup -q -n %{name}
61 mkdir %{name}%{version}
62 %{__tar} xzf %{SOURCE1} -C %{name}%{version}
63 mkdir tzcode%{version}
64 %{__tar} xzf %{SOURCE2} -C tzcode%{version}
65 %patch0 -p1
66
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
75 %build
76 %{__make}
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
81
82 %{__make} install
83
84 %if %{with tests}
85 : ====================TESTING=========================
86 %{__make} check \
87         CC="%{__cc}" \
88         CFLAGS="%{rpmcflags} %{rpmldflags}"
89 : ====================TESTING END=====================
90 %endif
91
92
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
100 > $RPM_BUILD_ROOT/etc/localtime
101
102 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/timezone
103 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/timezone
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
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
117 %triggerpostun -- rc-scripts < 0.4.1.4
118 /sbin/chkconfig --add timezone
119
120 %files
121 %defattr(644,root,root,755)
122 %doc tzcode%{version}/README tzcode%{version}/Theory tzcode%{version}/tz-link.html
123 %ghost /etc/localtime
124 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/timezone
125 %attr(754,root,root) /etc/rc.d/init.d/timezone
126
127 %{_datadir}/zoneinfo
128 %exclude %{_datadir}/zoneinfo/right
129
130 %files zoneinfo_right
131 %defattr(644,root,root,755)
132 %{_datadir}/zoneinfo/right
This page took 0.035774 seconds and 4 git commands to generate.