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