]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Update chrony.spec.sample
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 1 Jul 2013 17:00:06 +0000 (19:00 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 1 Jul 2013 17:00:06 +0000 (19:00 +0200)
chrony.spec.sample

index 1ea69690f308b24f04c9b397eda10882963a6b05..acd71b5b3270919396bdd12da4579a45c048fad4 100644 (file)
@@ -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 <rc@rc0.org.uk>
 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