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