]> git.pld-linux.org Git - packages/ntp.git/blob - ntp.spec
- reenabled security blocker
[packages/ntp.git] / ntp.spec
1 # TODO
2 # - update manual pages (from debian?)
3 %include        /usr/lib/rpm/macros.perl
4 Summary:        Network Time Protocol utilities
5 Summary(pl.UTF-8):      Narzędzia do synchronizacji czasu (Network Time Protocol)
6 Summary(pt_BR.UTF-8):   Network Time Protocol versão 4
7 Name:           ntp
8 Version:        4.2.4p6
9 Release:        2
10 License:        distributable
11 Group:          Daemons
12 Source0:        http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
13 # Source0-md5:  1961c2c12b66b9046d5df37d0a41b181
14 Source1:        %{name}.conf
15 Source2:        %{name}.keys
16 Source3:        %{name}.init
17 Source4:        %{name}.sysconfig
18 Source5:        %{name}-client.init
19 Source6:        %{name}-client.sysconfig
20 Source7:        %{name}-manpages.tar.gz
21 # Source7-md5:  208fcc9019e19ab26d28e4597290bffb
22 Patch0:         %{name}-time.patch
23 Patch1:         %{name}-no_libelf.patch
24 Patch2:         %{name}-ipv6.patch
25 Patch3:         %{name}-openssl_check.patch
26 Patch4:         %{name}-clock_settime.patch
27 Patch5:         %{name}-md5.patch
28 URL:            http://www.ntp.org/
29 # https://support.ntp.org/bugs/show_bug.cgi?id=1144
30 # Patch or >=4.2.6p7RC2
31 BuildRequires:  security(CVE-2009-0159)
32 BuildRequires:  autoconf
33 BuildRequires:  automake
34 BuildRequires:  libtool
35 BuildRequires:  openssl-devel >= 0.9.7d
36 BuildRequires:  readline-devel >= 4.2
37 BuildRequires:  rpm-perlprov >= 4.1-13
38 BuildRequires:  rpmbuild(macros) >= 1.268
39 Requires(post,preun):   /sbin/chkconfig
40 Requires:       rc-scripts >= 0.4.0.10
41 Obsoletes:      xntp3
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         _sysconfdir     /etc/ntp
45 %define         _bindir         %{_sbindir}
46
47 %description
48 The Network Time Protocol (NTP) is used to synchronize a computer's
49 time with another reference time source. The ntp package contains
50 utilities and daemons which will synchronize your computer's time to
51 Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
52 ntp package includes ntpd (a daemon which continuously adjusts system
53 time), while ntp-client package contains ntpdate (a program for
54 retrieving the date and time from remote machines via a network).
55
56 %description -l pl.UTF-8
57 Network Time Protocol (NTP) służy do synchronizacji czasu komputera z
58 innym, wzorcowym źródłem czasu. Pakiet ntp zawiera narzędzia i demony
59 służące do dokładnego synchronizowania czasu komputera według czasu
60 uniwersalnego (UTC) poprzez protokół NTP z serwerami NTP. Pakiet ntp
61 zawiera ntpd (demona, który w sposób ciągły aktualizuje czas
62 systemowy), natomiast pakiet ntp-client zawiera program ntpdate
63 (program do odczytywania daty i czasu z innych maszyn po sieci).
64
65 %description -l pt_BR.UTF-8
66 Esta é a versão 4 do Network Time Protocol (NTP). Este protocolo é
67 utilizado para sincronizar o relógio do computador com uma outra
68 referência de horário. Este pacote contém utilitários e servidores que
69 sincronizarão o relógio do seu computador com o horário universal
70 (UTC) através do protocolo NTP e utilizando servidores NTP públicos.
71
72 Instale o pacote ntp se você necessitar de ferramentas para manter o
73 relógio do seu computador constantemente atualizado.
74
75 Este pacote obsoleta o antigo xntp3.
76
77 %package doc-html
78 Summary:        HTML documentation for ntp
79 Summary(pl.UTF-8):      Dokumentacja HTML dla ntp
80 Summary(pt_BR.UTF-8):   Documentação adicional para o pacote ntp
81 Group:          Documentation
82
83 %description doc-html
84 HTML documentation for ntp.
85
86 %description doc-html -l pl.UTF-8
87 Dokumentacja do ntp w HTML.
88
89 %description doc-html -l pt_BR.UTF-8
90 Este pacote contém documentação adicional sobre o NTP versão 4.
91
92 %package client
93 Summary:        Network Time Protocol client
94 Summary(pl.UTF-8):      Klient do synchronizacji czasu po NTP (Network Time Protocol)
95 Group:          Applications/Networking
96 Requires(post,preun):   /sbin/chkconfig
97 Conflicts:      ntp < 4.2.0-3
98
99 %description client
100 Network Time Protocol client.
101
102 %description client -l pl.UTF-8
103 Klient do synchronizacji czasu po NTP (Network Time Protocol).
104
105 %package tools
106 Summary:        NTP tools
107 Group:          Applications/Networking
108 Obsoletes:      ntp-ntptrace
109
110 %description tools
111 This package contains ntp tools:
112 - ntptrace: Trace a chain of NTP servers back to the primary source
113 - ntp-wait: Wait for NTP server to synchronize
114
115 %prep
116 %setup -q -a7
117 %patch0 -p1
118 %patch1 -p1
119 %patch2 -p1
120 %patch3 -p1
121 %patch4 -p0
122 %patch5 -p1
123
124 echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> configure.ac
125
126 %build
127 %{__libtoolize}
128 %{__aclocal} -I m4 -I libopts/m4
129 %{__autoconf}
130 %{__automake}
131 %configure \
132         --with-binsubdir=sbin \
133         --enable-linuxcaps \
134         --enable-getifaddrs \
135         --enable-ipv6 \
136         --with-crypto=openssl
137
138 %{__make}
139
140 %install
141 rm -rf $RPM_BUILD_ROOT
142 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,cron.hourly},%{_mandir}/man1}
143
144 %{__make} install \
145         DESTDIR=$RPM_BUILD_ROOT
146
147 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ntp.conf
148 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/keys
149 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpd
150 install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntp
151 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/ntpd
152 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ntp
153 install man/*.1  $RPM_BUILD_ROOT%{_mandir}/man1
154
155 cat > $RPM_BUILD_ROOT/etc/cron.hourly/ntp <<'EOF'
156 #!/bin/sh
157 /sbin/service ntp cronsettime
158 EOF
159
160 %clean
161 rm -rf $RPM_BUILD_ROOT
162
163 %post
164 /sbin/chkconfig --add ntpd
165 %service ntpd restart "ntpd daemon"
166
167 %preun
168 if [ "$1" = "0" ]; then
169         %service ntpd stop
170         /sbin/chkconfig --del ntpd
171         rm -f /etc/ntp/drift
172 fi
173
174 %post client
175 /sbin/chkconfig --add ntp
176 %service ntp restart
177
178 %preun client
179 if [ "$1" = "0" ]; then
180         %service ntp stop
181         /sbin/chkconfig --del ntp
182 fi
183
184 %files
185 %defattr(644,root,root,755)
186 %doc NEWS TODO WHERE-TO-START conf/*.conf COPYRIGHT
187 %attr(750,root,root) %dir %{_sysconfdir}
188 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
189 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpd
190 %attr(754,root,root) /etc/rc.d/init.d/ntpd
191 %attr(755,root,root) %{_sbindir}/ntpd
192 %attr(755,root,root) %{_sbindir}/ntpdc
193 %attr(755,root,root) %{_sbindir}/ntp-keygen
194 %attr(755,root,root) %{_sbindir}/ntpq
195 %attr(755,root,root) %{_sbindir}/ntptime
196 %attr(755,root,root) %{_sbindir}/sntp
197 %attr(755,root,root) %{_sbindir}/tickadj
198 %{_mandir}/man1/ntpd.1*
199 %{_mandir}/man1/ntpdc.1*
200 %{_mandir}/man1/ntpdsim.1*
201 %{_mandir}/man1/ntp-keygen.1*
202 %{_mandir}/man1/ntpq.1*
203 %{_mandir}/man1/ntptime.1*
204 %{_mandir}/man1/sntp.1*
205
206 %files tools
207 %defattr(644,root,root,755)
208 %attr(755,root,root) %{_sbindir}/ntptrace
209 %attr(755,root,root) %{_sbindir}/ntp-wait
210 %{_mandir}/man1/ntptrace*
211
212 %files doc-html
213 %defattr(644,root,root,755)
214 %doc html/*
215
216 %files client
217 %defattr(644,root,root,755)
218 %doc COPYRIGHT
219 %attr(755,root,root) %{_sbindir}/ntpdate
220 %attr(754,root,root) /etc/rc.d/init.d/ntp
221 %attr(754,root,root) /etc/cron.hourly/ntp
222 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntp
223 %{_mandir}/man1/ntpdate*
This page took 0.072875 seconds and 4 git commands to generate.