diff --git a/chrony.spec.sample b/chrony.spec.sample index 1ea6969..acd71b5 100644 --- a/chrony.spec.sample +++ b/chrony.spec.sample @@ -1,38 +1,43 @@ +%global chrony_version @@VERSION@@ +%if 0%(echo %{chrony_version} | grep -q pre && echo 1) +%global prerelease %(echo %{chrony_version} | sed 's/.*-//') +%endif Summary: An NTP client/server Name: chrony -Version: @@VERSION@@ -Release: 1 -Source: chrony-%{version}.tar.gz -Copyright: GPL +Version: %(echo %{chrony_version} | sed 's/-.*//') +Release: %{!?prerelease:1}%{?prerelease:0.1.%{prerelease}} +Source: chrony-%{version}%{?prerelease:-%{prerelease}}.tar.gz +License: GPLv2 Group: Applications/Utilities -Packager: Richard P. Curnow BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n) Requires: info %description -A pair of programs for keeping computer clocks accurate. chronyd is a -background (daemon) program and chronyc is a command-line interface to it. -Time reference sources for chronyd can be RFC1305 NTP servers, human (via -keyboard and chronyc), and the computer's real-time clock at boot time (Linux -only). chronyd can determine the rate at which the computer gains or loses -time and compensate for it whilst no external reference is present. chronyd's -use of NTP servers can be switched on and off (through chronyc) to support -computers with dial-up/intermittent access to the Internet. chronyd can also -act as an RFC1305-compatible NTP server. +chrony is a client and server for the Network Time Protocol (NTP). +This program keeps your computer's clock accurate. It was specially +designed to support systems with intermittent Internet connections, +but it also works well in permanently connected environments. It can +also use hardware reference clocks, the system real-time clock, or +manual input as time references. %prep -%setup +%setup -q -n %{name}-%{version}%{?prerelease:-%{prerelease}} %build -./configure --prefix=%{_prefix} --mandir=%{_mandir} -make CC=gcc CFLAGS=-O2 prefix=%{_prefix} -make chrony.txt prefix=%{_prefix} -make chrony.info prefix=%{_prefix} +./configure \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --infodir=%{_infodir} \ + --mandir=%{_mandir} +make +make chrony.txt +make chrony.info %install rm -rf $RPM_BUILD_ROOT -cd $RPM_BUILD_DIR/chrony-%{version} -make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} +make install DESTDIR=$RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT%{_docdir} mkdir -p $RPM_BUILD_ROOT%{_infodir} cp chrony.info* $RPM_BUILD_ROOT%{_infodir} @@ -47,6 +52,6 @@ cp chrony.info* $RPM_BUILD_ROOT%{_infodir} %doc README %doc chrony.txt %doc COPYING -%doc examples/chrony.conf.example +%doc examples/chrony.conf.example* %doc examples/chrony.keys.example