]> git.pld-linux.org Git - packages/chrony.git/blame - chrony.spec
- release 3, rebuild against libnettle.so.6 (nettle-3.5)
[packages/chrony.git] / chrony.spec
CommitLineData
917d712f
AM
1%define nettle_ver 3.4
2
8aaf2ebf
ER
3Summary: An NTP client/server
4Name: chrony
e4df7b95 5Version: 3.3
21c6360a 6Release: 3
8aaf2ebf
ER
7License: GPL v2
8Group: Daemons
6e56eb76 9Source0: http://download.tuxfamily.org/chrony/%{name}-%{version}.tar.gz
e4df7b95 10# Source0-md5: 81ab62cf5d60b4b3fa8cd2c1b267ffd9
8aaf2ebf
ER
11Source1: %{name}.conf
12Source2: %{name}.keys
13Source3: %{name}d.sysconfig
14Source4: %{name}d.init
15Source5: %{name}.logrotate
2e022141 16URL: http://chrony.tuxfamily.org/
0cb82a43 17BuildRequires: asciidoc
8aaf2ebf
ER
18BuildRequires: bison
19BuildRequires: libcap-devel
917d712f 20BuildRequires: nettle-devel >= %{nettle_ver}
00e77c31 21BuildRequires: nss-devel
8aaf2ebf 22BuildRequires: readline-devel
57759dcc 23BuildRequires: rpmbuild(macros) >= 1.453
8aaf2ebf
ER
24Requires(postun): /usr/sbin/groupdel
25Requires(postun): /usr/sbin/userdel
26Requires(pre): /bin/id
27Requires(pre): /usr/bin/getgid
28Requires(pre): /usr/sbin/groupadd
29Requires(pre): /usr/sbin/useradd
30Provides: group(ntp)
31Provides: ntpdaemon
32Provides: user(ntp)
917d712f 33Requires: nettle >= %{nettle_ver}
8aaf2ebf 34Obsoletes: ntpdaemon
2e022141 35Conflicts: logrotate < 3.8.0
8aaf2ebf
ER
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%define _sysconfdir /etc/ntp
39
57759dcc
ER
40# assume gcc 3.4 has it
41%if "%{cc_version}" >= "3.4"
42%define specflags -pie -fpie
43%endif
44
8aaf2ebf
ER
45%description
46A client/server for the Network Time Protocol, this program keeps your
47computer's clock accurate. It was specially designed to support
48systems with dial-up Internet connections, and also supports computers
49in permanently connected environments.
50
51%prep
6e56eb76
ER
52%setup -q
53
8aaf2ebf
ER
54%build
55# NOTE: It is not autoconf generated configre
56CC="%{__cc}" \
57759dcc 57CFLAGS="%{rpmcflags} -Wmissing-prototypes -Wall" \
8aaf2ebf
ER
58CPPFLAGS="%{rpmcppflags}" \
59./configure \
60 --prefix=%{_prefix} \
61 --sysconfdir=%{_sysconfdir} \
62 --docdir=%{_docdir} \
8aaf2ebf
ER
63 --without-editline \
64
0cb82a43
AM
65%{__make} getdate all docs \
66 ADOC=asciidoc
8aaf2ebf
ER
67
68%install
69rm -rf $RPM_BUILD_ROOT
72931147 70install -d $RPM_BUILD_ROOT/etc/{sysconfig,logrotate.d,rc.d/init.d} \
8aaf2ebf
ER
71 $RPM_BUILD_ROOT{%{_sysconfdir},/var/{lib/ntp,log/chrony}}
72
73%{__make} install install-docs \
74 DESTDIR=$RPM_BUILD_ROOT
75
76rm -rf $RPM_BUILD_ROOT%{_docdir}
77
78cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/chrony.conf
5e2ed499 79cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/keys
8aaf2ebf
ER
80cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/chronyd
81cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/chrony
82install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/chronyd
83
84touch $RPM_BUILD_ROOT%{_localstatedir}/lib/ntp/{drift,rtc}
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%pre
90%groupadd -g 246 ntp
91%useradd -u 246 -d %{_localstatedir}/lib/ntp -g ntp -c "NTP Daemon" ntp
92
93%post
8aaf2ebf
ER
94/sbin/chkconfig --add chronyd
95%service chronyd restart
96
97%preun
98if [ "$1" = "0" ]; then
99 %service chronyd stop
100 /sbin/chkconfig --del chronyd
8aaf2ebf
ER
101fi
102
103%postun
104if [ "$1" = "0" ]; then
105 %userremove ntp
106 %groupremove ntp
107fi
108
109%files
110%defattr(644,root,root,755)
0cb82a43 111%doc NEWS README FAQ examples/* doc/{faq,installation}.html
8aaf2ebf
ER
112%dir %{_sysconfdir}
113%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/chrony.conf
5e2ed499 114%attr(640,root,ntp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/keys
8aaf2ebf
ER
115%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/chronyd
116%config(noreplace) /etc/logrotate.d/chrony
c59d8b3b 117%attr(754,root,root) /etc/rc.d/init.d/chronyd
8aaf2ebf
ER
118%attr(755,root,root) %{_bindir}/chronyc
119%attr(755,root,root) %{_sbindir}/chronyd
8aaf2ebf
ER
120%{_mandir}/man1/chronyc.1*
121%{_mandir}/man5/chrony.conf.5*
122%{_mandir}/man8/chronyd.8*
8aaf2ebf
ER
123
124%dir %attr(770,root,ntp) /var/lib/ntp
125%attr(640,ntp,ntp) %ghost /var/lib/ntp/drift
126%attr(640,ntp,ntp) %ghost /var/lib/ntp/rtc
127
128%dir %attr(770,ntp,ntp) /var/log/chrony
This page took 0.058842 seconds and 4 git commands to generate.