1 %include /usr/lib/rpm/macros.perl
2 Summary: Network Time Protocol utilities
3 Summary(pl.UTF-8): Narzędzia do synchronizacji czasu (Network Time Protocol)
4 Summary(pt_BR.UTF-8): Network Time Protocol versão 4
10 Source0: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/%{name}-%{version}.tar.gz
11 # Source0-md5: fe137056e7e611798a46971a783567ce
15 Source4: %{name}.sysconfig
16 Source5: %{name}-client.init
17 Source6: %{name}-client.sysconfig
18 Source7: %{name}-manpages.tar.gz
19 # Source7-md5: 208fcc9019e19ab26d28e4597290bffb
20 Patch0: %{name}-time.patch
21 Patch1: %{name}-no_libelf.patch
22 Patch2: %{name}-ipv6.patch
23 Patch3: %{name}-openssl_check.patch
24 Patch4: %{name}-clock_settime.patch
25 Patch5: %{name}-md5.patch
26 Patch6: %{name}-nano.patch
27 Patch7: %{name}-manpage.patch
29 Patch101: %{name}-4.2.4p4-kernel.patch
30 Patch102: %{name}-4.2.4p0-droproot.patch
31 Patch103: %{name}-4.2.4-groups.patch
32 Patch104: %{name}-4.2.4p7-daemonpll.patch
33 Patch106: %{name}-4.2.4p2-tentative.patch
34 Patch107: %{name}-4.2.4p2-noseed.patch
35 Patch108: %{name}-4.2.4p4-multilisten.patch
36 Patch109: %{name}-4.2.4-html2man.patch
37 Patch110: %{name}-4.2.4p5-htmldoc.patch
38 Patch111: %{name}-4.2.4p2-filegen.patch
39 Patch112: %{name}-4.2.4-sprintf.patch
40 Patch114: %{name}-4.2.4p8-mlock.patch
41 Patch115: %{name}-4.2.4p2-clockselect.patch
42 Patch117: %{name}-4.2.4p7-sleep.patch
43 Patch118: %{name}-4.2.4p7-bcast.patch
44 Patch119: %{name}-4.2.4p0-retcode.patch
45 Patch120: %{name}-4.2.4p2-noif.patch
46 Patch122: %{name}-4.2.4p4-cmsgalign.patch
47 Patch124: %{name}-4.2.4p4-resinit.patch
48 Patch125: %{name}-4.2.4p5-rtnetlink.patch
49 Patch126: %{name}-4.2.4p7-stamode.patch
50 Patch127: %{name}-4.2.4p5-driftonexit.patch
51 Patch129: %{name}-4.2.4p7-minpoll.patch
52 Patch130: %{name}-4.2.4p7-freqmode.patch
53 Patch133: %{name}-4.2.4p7-getprecision.patch
54 URL: http://www.ntp.org/
55 BuildRequires: autoconf
56 BuildRequires: automake
57 BuildRequires: libcap-devel
58 BuildRequires: libtool
59 BuildRequires: openssl-devel >= 0.9.7d
60 BuildRequires: readline-devel >= 4.2
61 BuildRequires: rpm-perlprov >= 4.1-13
62 BuildRequires: rpmbuild(macros) >= 1.268
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 %define _sysconfdir /etc/ntp
66 %define _bindir %{_sbindir}
69 The Network Time Protocol (NTP) is used to synchronize a computer's
70 time with another reference time source. The ntp package contains
71 utilities and daemons which will synchronize your computer's time to
72 Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
74 %description -l pl.UTF-8
75 Network Time Protocol (NTP) służy do synchronizacji czasu komputera z
76 innym, wzorcowym źródłem czasu. Pakiet ntp zawiera narzędzia i demony
77 służące do dokładnego synchronizowania czasu komputera według czasu
78 uniwersalnego (UTC) poprzez protokół NTP z serwerami NTP.
80 %description -l pt_BR.UTF-8
81 Esta é a versão 4 do Network Time Protocol (NTP). Este protocolo é
82 utilizado para sincronizar o relógio do computador com uma outra
83 referência de horário. Este pacote contém utilitários e servidores que
84 sincronizarão o relógio do seu computador com o horário universal
85 (UTC) através do protocolo NTP e utilizando servidores NTP públicos.
87 Instale o pacote ntp se você necessitar de ferramentas para manter o
88 relógio do seu computador constantemente atualizado.
91 Summary: The NTP daemon
92 Summary(pl.UTF-8): Narzędzia do synchronizacji czasu (Network Time Protocol)
93 Summary(pt_BR.UTF-8): Network Time Protocol versão 4
95 Requires(post,preun): /sbin/chkconfig
96 Requires(postun): /usr/sbin/groupdel
97 Requires(postun): /usr/sbin/userdel
98 Requires(pre): /bin/id
99 Requires(pre): /usr/bin/getgid
100 Requires(pre): /usr/sbin/groupadd
101 Requires(pre): /usr/sbin/useradd
102 Requires: rc-scripts >= 0.4.0.10
104 Provides: ntp = %{version}-%{release}
107 Obsoletes: ntp < 4.2.4p8-4
113 The Network Time Protocol (NTP) is used to synchronize a computer's
114 time with another reference time source. The ntp package contains
115 utilities and daemons which will synchronize your computer's time to
116 Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
118 This package includes ntpd (a daemon which continuously adjusts system
121 %description -n ntpd -l pl.UTF-8
122 Network Time Protocol (NTP) służy do synchronizacji czasu komputera z
123 innym, wzorcowym źródłem czasu. Pakiet ntp zawiera narzędzia i demony
124 służące do dokładnego synchronizowania czasu komputera według czasu
125 uniwersalnego (UTC) poprzez protokół NTP z serwerami NTP.
127 Pakiet ntp zawiera ntpd (demona, który w sposób ciągły aktualizuje
130 %description -n ntpd -l pt_BR.UTF-8
131 Esta é a versão 4 do Network Time Protocol (NTP). Este protocolo é
132 utilizado para sincronizar o relógio do computador com uma outra
133 referência de horário. Este pacote contém utilitários e servidores que
134 sincronizarão o relógio do seu computador com o horário universal
135 (UTC) através do protocolo NTP e utilizando servidores NTP públicos.
138 Summary: Utility to set the date and time via NTP
139 Summary(pl.UTF-8): Klient do synchronizacji czasu po NTP (Network Time Protocol)
140 Group: Applications/Networking
141 Requires(post,preun): /sbin/chkconfig
142 Requires(postun): /usr/sbin/groupdel
143 Requires(postun): /usr/sbin/userdel
144 Requires(pre): /bin/id
145 Requires(pre): /usr/bin/getgid
146 Requires(pre): /usr/sbin/groupadd
147 Requires(pre): /usr/sbin/useradd
150 Conflicts: ntp < 4.2.0-3
152 Provides: ntp-client = %{version}-%{release}
153 Obsoletes: ntp-client < 4.2.4p8-4
158 %description -n ntpdate
159 ntpdate is a program for retrieving the date and time from NTP
162 %description -n ntpdate -l pl.UTF-8
163 Klient do synchronizacji czasu po NTP (Network Time Protocol).
167 Group: Applications/Networking
168 Obsoletes: ntp-ntptrace
171 This package contains ntp tools:
172 - ntptrace: Trace a chain of NTP servers back to the primary source
173 - ntp-wait: Wait for NTP server to synchronize
176 Summary: HTML documentation for ntp
177 Summary(pl.UTF-8): Dokumentacja HTML dla ntp
178 Summary(pt_BR.UTF-8): Documentação adicional para o pacote ntp
181 %description doc-html
182 HTML documentation for ntp.
184 %description doc-html -l pl.UTF-8
185 Dokumentacja do ntp w HTML.
187 %description doc-html -l pt_BR.UTF-8
188 Este pacote contém documentação adicional sobre o NTP versão 4.
228 echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> configure.ac
229 echo 'AM_CONDITIONAL([NEED_LIBOPTS], false)' >> sntp/configure.ac
233 %{__aclocal} -I m4 -I libopts/m4
238 %{__aclocal} -I libopts/m4
244 --with-binsubdir=sbin \
246 --enable-getifaddrs \
248 --with-crypto=openssl
253 rm -rf $RPM_BUILD_ROOT
254 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,cron.hourly},%{_mandir}/man1}
257 DESTDIR=$RPM_BUILD_ROOT
259 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ntp.conf
260 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/keys
261 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpd
262 install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpdate
263 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/ntpd
264 cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ntpdate
265 cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
267 install -d $RPM_BUILD_ROOT/var/lib/ntp
268 touch $RPM_BUILD_ROOT/var/lib/ntp/drift
270 cat > $RPM_BUILD_ROOT/etc/cron.hourly/ntpdate <<'EOF'
272 exec /sbin/service ntpdate cronsettime
276 rm -rf $RPM_BUILD_ROOT
280 %useradd -u 246 -d %{_sysconfdir} -g ntp -c "NTP Daemon" ntp
283 /sbin/chkconfig --add ntpd
284 %service ntpd restart "NTP Daemon"
287 if [ "$1" = "0" ]; then
289 /sbin/chkconfig --del ntpd
290 rm -f /var/lib/ntp/drift
294 if [ "$1" = "0" ]; then
301 %useradd -u 246 -d %{_sysconfdir} -g ntp -c "NTP Daemon" ntp
304 /sbin/chkconfig --add ntpdate
305 %service ntpdate restart "NTP Date"
308 if [ "$1" = "0" ]; then
309 %service ntpdate stop
310 /sbin/chkconfig --del ntpdate
314 if [ "$1" = "0" ]; then
319 %triggerpostun -n ntpd -- ntpd < 4.2.4p8-3.14
320 sed -i -e 's,/etc/ntp/drift,/var/lib/ntp/drift,' %{_sysconfdir}/ntp.conf
321 mv -f /etc/ntp/ntp.drift /var/lib/ntp/drift
322 mv -f /etc/ntp/drift /var/lib/ntp/drift
323 %service -q ntpd restart
325 %triggerpostun -n ntpd -- ntp < 4.2.4p8-3.1
326 sed -i -e 's,/etc/ntp/drift,/var/lib/ntp/drift,' %{_sysconfdir}/ntp.conf
327 mv -f /etc/ntp/ntp.drift /var/lib/ntp/drift
328 mv -f /etc/ntp/drift /var/lib/ntp/drift
329 %service -q ntpd restart
331 %triggerpostun -n ntpdate -- ntp-client < 4.2.4p8-3.2
332 if [ -f /etc/sysconfig/ntp.rpmsave ]; then
333 cp -f /etc/sysconfig/ntpdate{,.rpmnew}
334 mv -f /etc/sysconfig/ntp.rpmsave /etc/sysconfig/ntpdate
338 %defattr(644,root,root,755)
339 %doc NEWS TODO WHERE-TO-START conf/*.conf COPYRIGHT
340 %attr(750,root,root) %dir %{_sysconfdir}
341 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
342 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpd
343 %attr(754,root,root) /etc/rc.d/init.d/ntpd
344 %attr(755,root,root) %{_sbindir}/ntpd
345 %attr(755,root,root) %{_sbindir}/ntpdc
346 %attr(755,root,root) %{_sbindir}/ntp-keygen
347 %attr(755,root,root) %{_sbindir}/ntpq
348 %attr(755,root,root) %{_sbindir}/ntptime
349 %attr(755,root,root) %{_sbindir}/sntp
350 %attr(755,root,root) %{_sbindir}/tickadj
351 %{_mandir}/man1/ntpd.1*
352 %{_mandir}/man1/ntpdc.1*
353 %{_mandir}/man1/ntpdsim.1*
354 %{_mandir}/man1/ntp-keygen.1*
355 %{_mandir}/man1/ntpq.1*
356 %{_mandir}/man1/ntptime.1*
357 %{_mandir}/man1/sntp.1*
359 %dir %attr(770,root,ntp) /var/lib/ntp
360 %attr(640,ntp,ntp) %ghost /var/lib/ntp/drift
363 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_sbindir}/ntpdate
366 %attr(754,root,root) /etc/rc.d/init.d/ntpdate
367 %attr(754,root,root) /etc/cron.hourly/ntpdate
368 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpdate
369 %{_mandir}/man1/ntpdate*
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_sbindir}/ntptrace
374 %attr(755,root,root) %{_sbindir}/ntp-wait
375 %{_mandir}/man1/ntptrace*
378 %defattr(644,root,root,755)