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