]> git.pld-linux.org Git - packages/ntp.git/blob - ntp.spec
- adapterized
[packages/ntp.git] / ntp.spec
1 Summary:        Network Time Protocol utilities
2 Summary(pl):    Narzêdzia do synchronizacji czasu (Network Time Protocol)
3 Name:           ntp
4 Version:        4.1.1a
5 Release:        2
6 License:        distributable
7 Group:          Daemons
8 Obsoletes:      xntp3
9 Source0:        ftp://ftp.udel.edu/pub/ntp/ntp4/%{name}-%{version}.tar.gz
10 Source1:        %{name}.conf
11 Source2:        %{name}.keys
12 Source3:        %{name}.init
13 Source4:        %{name}.sysconfig
14 Source5:        %{name}d.8
15 Source6:        %{name}date.8
16 Patch0:         %{name}-time.patch
17 Patch1:         %{name}-vsnprintf.patch
18 Patch2:         %{name}-no_libelf.patch
19 URL:            http://www.ntp.org/
20 BuildRequires:  readline-devel >= 4.2
21 PreReq:         rc-scripts
22 Requires(post,preun):   /sbin/chkconfig
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _sysconfdir     /etc/ntp
26 %define         _bindir         %{_sbindir}
27
28 %description
29 The Network Time Protocol (NTP) is used to synchronize a computer's
30 time with another reference time source. The ntp package contains
31 utilities and daemons which will synchronize your computer's time to
32 Coordinated Universal Time (UTC) via the NTP protocol and NTP servers.
33 The ntp package includes ntpdate (a program for retrieving the date
34 and time from remote machines via a network) and ntpd (a daemon which
35 continuously adjusts system time).
36
37 %description -l pl
38 Pakiet zawiera narzêdzia i demony s³u¿±ce do dok³adnego
39 synchronizowania czasu Twojego komputera: ntpdate, program podobny do
40 rdate oraz ntpd, demon aktualizuj±cy czas w sposób ci±g³y.
41
42 %package doc-html
43 Summary:        HTML documentation for ntp
44 Summary(pl):    Dokumentacja HTML dla ntp
45 Group:          Daemons
46
47 %description doc-html
48 HTML documentation for ntp.
49
50 %description doc-html -l pl
51 Dokumentacja do ntp w HTML.
52
53 %prep
54 %setup -q
55 %patch0 -p1
56 %patch1 -p1
57 %patch2 -p1
58
59 %build
60 %configure
61
62 %{__make}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig},%{_mandir}/man8}
67
68 %{__make} install DESTDIR=$RPM_BUILD_ROOT
69
70 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ntp.conf
71 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/keys
72 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntp
73 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/ntp
74 install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man8
75 install %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/man8
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 /sbin/chkconfig --add ntp
82 if [ -f /var/lock/subsys/ntp ]; then
83         /etc/rc.d/init.d/ntp restart >&2
84 else
85         echo "Run \"/etc/rc.d/init.d/ntp start\" to start ntp daemon."
86 fi
87
88 %preun
89 if [ "$1" = "0" ]; then
90         if [ -f /var/lock/subsys/ntp ]; then
91                 /etc/rc.d/init.d/ntp stop >&2
92         fi
93         /sbin/chkconfig --del ntp
94 fi
95
96 %files
97 %defattr(644,root,root,755)
98 %doc NEWS TODO conf/*.conf
99 %attr(750,root,root) %dir %{_sysconfdir}
100 %attr(640,root,root) %config(noreplace) %verify(not size md5 mtime) %{_sysconfdir}/*
101 %attr(755,root,root) %{_sbindir}/*
102 %attr(754,root,root) /etc/rc.d/init.d/ntp
103 %attr(640,root,root) %config %verify(not size md5 mtime) /etc/sysconfig/*
104 %{_mandir}/man8/*
105
106 %files doc-html
107 %defattr(644,root,root,755)
108 %doc html/*
This page took 0.036542 seconds and 4 git commands to generate.