# norootforbuild Name: chrony Version: 1.24 Release: 0 Summary: System Clock Synchronization Client and Server # http://download.tuxfamily.org/chrony/chrony-%{version}.tar.gz Source: chrony-%{version}.tar.bz2 Source1: chrony.init Source2: chrony.sysconfig Patch1: chrony-config.patch URL: http://chrony.tuxfamily.org/ Group: Productivity/Networking/Other License: GNU General Public License version 2 or later (GPL v2 or later) BuildRoot: %{_tmppath}/build-%{name}-%{version} BuildRequires: texinfo BuildRequires: readline-devel BuildRequires: libcap-devel BuildRequires: ncurses-devel BuildRequires: gcc make glibc-devel %if 0%{?suse_version} >= 1030 BuildRequires: licenses Requires: licenses %endif PreReq: %install_info_prereq PreReq: %fillup_prereq PreReq: %insserv_prereq PreReq: /usr/sbin/groupadd PreReq: /usr/sbin/useradd %description Chrony is a pair of programs which are used to maintain the accuracy of the system clock on a computer. The two programs are called chronyd and chronyc. Chronyd is a daemon which runs in background on the system. It obtains measurements via the network of the system clock’s offset relative to time servers on other systems and adjusts the system time accordingly. For isolated systems, the user can periodically enter the correct time by hand (using Chronyc). In either case, Chronyd determines the rate at which the computer gains or loses time, and compensates for this. Chronyd implements the NTP protocol and can act as either a client or a server. Chronyc provides a user interface to Chronyd for monitoring its performance and configuring various settings. It can do so while running on the same computer as the Chronyd instance it is controlling or a different computer. %prep %setup -q %patch1 %build # not autoconf: ./configure \ --prefix="%{_prefix}" \ --exec-prefix="%{_exec_prefix}" \ --sysconfdir="%{_sysconfdir}" \ --bindir="%{_bindir}" \ --sbindir="%{_sbindir}" \ --datarootdir="%{_datadir}" \ --infodir="%{_infodir}" \ --mandir="%{_mandir}" \ --docdir="%{_docdir}/%{name}" %__make %{?jobs:-j%{jobs}} \ CC="%__cc" \ CFLAGS="%{optflags} -Wall" \ prefix="%{_prefix}" %__make chrony.txt prefix="%{_prefix}" %__make chrony.info prefix="%{_prefix}" %install %makeinstall %__rm -rf "%{buildroot}%{_docdir}/%{name}" %__install -d "%{buildroot}%{_infodir}" %__install -m0644 chrony.info "%{buildroot}%{_infodir}"/ %__install -D -m0755 "%{SOURCE1}" "%{buildroot}/etc/init.d/chronyd" %__install -d "%{buildroot}/usr/sbin" %__ln_s ../../etc/init.d/chronyd "%{buildroot}/usr/sbin/rcchronyd" %__install -D -m0644 "%{SOURCE2}" "%{buildroot}%{_var}/adm/fillup-templates/sysconfig.chronyd" %__install -d "%{buildroot}%{_var}/lib/chrony" %__install -d "%{buildroot}%{_var}/log/chrony" h=/usr/share/doc/licenses/md5/$(md5sum COPYING|cut -f1 -d" ") test -e "$h" && %__ln_s -f "$h" . %__install -d "%{buildroot}%{_sysconfdir}" %__install -m0644 examples/chrony.conf.example "%{buildroot}%{_sysconfdir}/chrony.conf" %__install -m0600 examples/chrony.keys.example "%{buildroot}%{_sysconfdir}/chrony.keys" %pre /usr/sbin/groupadd -r chrony || : /usr/sbin/useradd -r -g chrony -c "Chrony Daemon" -d "%{_var}/lib/chrony" chrony || : %post %{fillup_only -an chronyd} %install_info --info-dir="%{_infodir}" "%{_infodir}/chrony.info%{ext_info}" %preun %stop_on_removal chronyd %postun %restart_on_update chronyd %insserv_cleanup %install_info_delete --info-dir="%{_infodir}" "%{_infodir}/chrony.info%{ext_info}" %clean %__rm -rf "%{buildroot}" %files %defattr(-,root,root) %doc README chrony.txt COPYING %doc examples %config(noreplace) %{_sysconfdir}/chrony.conf %config(noreplace) %{_sysconfdir}/chrony.keys %{_bindir}/chronyc %{_sbindir}/chronyd %doc %{_mandir}/man1/chrony.1%{ext_man} %doc %{_mandir}/man1/chronyc.1%{ext_man} %doc %{_mandir}/man5/chrony.conf.5%{ext_man} %doc %{_mandir}/man8/chronyd.8%{ext_man} %doc %{_infodir}/chrony.info%{ext_info} %config /etc/init.d/chronyd /usr/sbin/rcchronyd %{_var}/adm/fillup-templates/sysconfig.chronyd %attr(0750,chrony,chrony) %{_var}/lib/chrony %attr(0750,chrony,chrony) %{_var}/log/chrony %changelog # vim: set sw=3 ts=3 noet: # Local Variables: # mode: rpm-spec # tab-width: 3 # End: