]> git.pld-linux.org Git - packages/ntp.git/blob - ntp.spec
- add perl autodeps, ntptrace subpackaged
[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:        16
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}d.8
17 Source6:        %{name}date.8
18 Source7:        %{name}-client.init
19 Source8:        %{name}-client.sysconfig
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 Group:          Applications/Networking
74 Conflicts:      ntp < 4.2.0-15.1
75
76 %description ntptrace
77 ntptrace determines where a given Network Time Protocol (NTP) server
78 gets its time from, and follows the chain of NTP servers back to their
79 master time source.
80
81 %package doc-html
82 Summary:        HTML documentation for ntp
83 Summary(pl):    Dokumentacja HTML dla ntp
84 Summary(pt_BR): Documentação adicional para o pacote ntp
85 Group:          Documentation
86
87 %description doc-html
88 HTML documentation for ntp.
89
90 %description doc-html -l pl
91 Dokumentacja do ntp w HTML.
92
93 %description doc-html -l pt_BR
94 Este pacote contém documentação adicional sobre o NTP versão 4.
95
96 %package client
97 Summary:        Network Time Protocol client
98 Summary(pl):    Klient do synchronizacji czasu po NTP (Network Time Protocol)
99 Group:          Applications/Networking
100 Conflicts:      ntp < 4.2.0-3
101
102 %description client
103 Network Time Protocol client.
104
105 %description doc-html -l pl
106 Klient do synchronizacji czasu po NTP (Network Time Protocol).
107
108 %prep
109 %setup -q
110 %patch0 -p1
111 %patch1 -p1
112 %patch2 -p1
113 %patch3 -p1
114 %patch4 -p1
115
116 %build
117 %{__libtoolize}
118 %{__aclocal}
119 %{__autoconf}
120 %{__automake}
121 %configure
122
123 %{__make}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,cron.hourly},%{_mandir}/man8}
128
129 %{__make} install \
130         DESTDIR=$RPM_BUILD_ROOT
131
132 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ntp.conf
133 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/keys
134 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntpd
135 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntp
136 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/ntpd
137 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/ntp
138 install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man8
139 install %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/man8
140
141 cat > $RPM_BUILD_ROOT/etc/cron.hourly/ntp <<'EOF'
142 #!/bin/sh
143 /sbin/service ntp cronsettime
144 EOF
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %post
150 /sbin/chkconfig --add ntpd
151 %service ntpd restart "ntpd daemon"
152
153 %preun
154 if [ "$1" = "0" ]; then
155         %service ntpd stop
156         /sbin/chkconfig --del ntpd
157         rm -f /etc/ntp/drift
158 fi
159
160 %post client
161 /sbin/chkconfig --add ntp
162 %service ntp restart
163
164 %preun client
165 if [ "$1" = "0" ]; then
166         %service ntp stop
167         /sbin/chkconfig --del ntp
168 fi
169
170 %files
171 %defattr(644,root,root,755)
172 %doc NEWS TODO WHERE-TO-START conf/*.conf COPYRIGHT
173 %attr(750,root,root) %dir %{_sysconfdir}
174 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
175 %attr(755,root,root) %{_sbindir}/*
176 %attr(754,root,root) /etc/rc.d/init.d/ntpd
177 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntpd
178 %{_mandir}/man8/*
179 %exclude %{_mandir}/man8/ntpdate*
180 %exclude %{_sbindir}/ntpdate
181 %exclude %{_sbindir}/ntptrace
182
183 %files ntptrace
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_sbindir}/ntptrace
186
187 %files doc-html
188 %defattr(644,root,root,755)
189 %doc html/*
190
191 %files client
192 %defattr(644,root,root,755)
193 %doc COPYRIGHT
194 %attr(755,root,root) %{_sbindir}/ntpdate
195 %attr(754,root,root) /etc/rc.d/init.d/ntp
196 %attr(754,root,root) /etc/cron.hourly/ntp
197 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ntp
198 %{_mandir}/man8/ntpdate*
This page took 0.049227 seconds and 4 git commands to generate.