File rdate.spec of Package rdate
# norootforbuild
Name: rdate
Version: 20201119
Release: 1%{?dist}
Summary: Set the system's date and time from a remote host
# 4-clause BSD (rdate.8 rdate.c rfc868time.c), 3-clause BSD (ntp.c), MirOS (the rest)
License: BSD-4-Clause AND BSD-3-Clause AND MirOS
URL: http://www.mirbsd.org/cvs.cgi/src/usr.sbin/rdate/
Group: Productivity/Networking/Other
Source0: https://www.mirbsd.org/MirOS/dist/mir/%{name}/%{name}-%{version}.tar.gz
Source1: https://www.mirbsd.org/MirOS/dist/hosted/other/arc4random.c.1.30
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc glibc-devel make
Provides: mirdate
%description
rdate displays and sets the local date and time from the host name
or address given as the argument. The time source may be an RFC 868
TCP protocol server, which is usually implemented as a built-in
service of inetd(8), or an RFC 2030 protocol SNTP/NTP server. By
default, rdate uses the RFC 868 TCP protocol. This version comes
from MirBSD and has optional debug output, security features, and
handles leap seconds correctly.
Authors:
--------
Thorsten Glaser <tg@mirbsd.org>
%prep
%setup -q -n %{name}
%build
%__cp "%{SOURCE1}" arc4random.c
CC="%__cc"
CFLAGS="%{?mageia:-g }%{optflags}"
if printf '#include <%s>\n' sys/param.h sys/sysctl.h | cc -E - >/dev/null 2>&1; then
CPPFLAGS="$CPPFLAGS -DHAVE_SYS_SYSCTL_H"
fi
export CC CFLAGS CPPFLAGS
%{__make}
%install
%__install -d -m0755 "%{buildroot}%{_sbindir}"
%__install -d -m0755 "%{buildroot}%{_mandir}/man8"
%{__make} install DESTDIR="%{buildroot}" \
BINMODE=0755 MANMODE=0644 INSTALL_STRIP=
%clean
%__rm -rf "%{buildroot}"
%files
%defattr(-,root,root,-)
%{_sbindir}/%{name}
%{_mandir}/man8/%{name}.8*
%changelog
* Thu Nov 19 2020 Thorsten Glaser <tg@mirbsd.org> 20201119-1
- Update to latest upstream version
* Thu Nov 19 2020 Thorsten Glaser <tg@mirbsd.org> 20181225-1
- Update to latest upstream version
- Work around missing <sys/sysctl.h> on Feodora Rawhide
* Sun Dec 21 2014 Thorsten Glaser <tg@mirbsd.org> 20131031-3
- Update to latest upstream version
- Update arc4random.c from MirBSD
* Wed Jun 22 2011 Thorsten Glaser <tg@mirbsd.org> 20100805-4
- rpmlint says to add an http or ftp URL tag, so do that
* Wed Jun 22 2011 Thorsten Glaser <tg@mirbsd.org> 20100805-2
- Update arc4random.c from MirBSD
- Provides: mirdate (for dependencies, mostly)
- Indent spec file with tabs, for sanity
* Thu Aug 5 2010 Thorsten Glaser <tg@mirbsd.org> 20100805-1
- Initial package