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