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