%global commit db85de4d87b533ddbc89c72a8596b012e2837fbb %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20160119 Name: ntpsec Version: 0.9.1 Release: 0.1.%{commitdate}git%{shortcommit}%{?dist} Summary: A security-hardened implementation of Network Time Protocol Version 4 License: BSD and MIT and NTP and CC-BY-SA and Public Domain URL: https://www.ntpsec.org/ Source0: https://gitlab.com/NTPsec/ntpsec/repository/archive.tar.gz?ref=%{commit}#/ntpsec-%{shortcommit}.tar.gz Patch0: ntpsec-use-system-sodium.patch # fix missed function rename Patch1: ntpsec-intercept_ntp_adjtime-rename.patch BuildRequires: asciidoc BuildRequires: avahi-compat-libdns_sd-devel BuildRequires: bison BuildRequires: libcap-devel BuildRequires: libevent-devel BuildRequires: libsodium-devel BuildRequires: openssl-devel BuildRequires: pps-tools-devel BuildRequires: python BuildRequires: readline-devel BuildRequires: waf %description A security-hardened implementation of Network Time Protocol Version 4. %prep %setup -q -n ntpsec-%{commit}-%{commit} %patch0 -p1 -b .sodium %patch1 -p1 -b .pll # make sure we use system waf and libsodium rm ./waf rm -r libsodium %build export CFLAGS="%{optflags}" export LDFLAGS="%{__global_ldflags}" waf configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --check \ --enable-crypto \ --enable-doc \ --enable-leap-smear \ --enable-lockclock \ --enable-mssntp \ --refclock=all \ waf build -v %{?_smp_mflags} %install rm -rf %{buildroot} waf install --destdir=%{buildroot} mkdir -p %{buildroot}%{_mandir} mv %{buildroot}%{_prefix}/man* %{buildroot}%{_mandir} mkdir -p %{buildroot}%{_docdir}/ntpsec mv %{buildroot}%{_datadir}/ntpsec/docs/* %{buildroot}%{_docdir}/ntpsec for tool in ntpleapfetch ntptrace ntpwait ; do install -pm755 $tool/$tool %{buildroot}%{_bindir}/ done %check waf check %{?_smp_mflags} %files %doc %{_docdir}/ntpsec %{_bindir}/ntpdig %{_bindir}/ntpfrob %{_bindir}/ntpkeygen %{_bindir}/ntpleapfetch %{_bindir}/ntpq %{_bindir}/ntptime %{_bindir}/ntptrace %{_bindir}/ntpwait %exclude %{_bindir}/test_* %{_mandir}/man1/ntpdig.1* %{_mandir}/man1/ntpq.1* %{_mandir}/man1/ntpsweep.1* %{_mandir}/man1/ntptrace.1* %{_mandir}/man5/ntp.conf.5* %{_mandir}/man5/ntp.keys.5* %{_mandir}/man8/ntpd.8* %{_mandir}/man8/ntpfrob.8* %{_mandir}/man8/ntpkeygen.8* %{_mandir}/man8/ntpleapfetch.8* %{_mandir}/man8/ntptime.8* %{_mandir}/man8/ntpwait.8* %{_sbindir}/ntpd %changelog * Tue Jan 19 2016 Dominik Mierzejewski 0.9.1-0.1.20160119gitdb85de4 - updated to pre-0.9.1 * Wed Dec 2 2015 Dominik Mierzejewski 0.9.0-1 - initial build