###############################################################################
name = ntp
-version = %{ver_major}.6p5
+version = %{ver_major}.8
ver_major = 4.2
-release = 2
+release = 4
groups = System/Daemons
url = http://www.ntp.org/
end
source_dl = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-%{ver_major}/
-sources += ntpstat-0.2.tgz
# The vendor part in the NTP pool address.
VENDORZONE = %{DISTRO_SNAME}
pps-tools-devel
end
- prepare
- %{MACRO_EXTRACT_TARBALL}
-
- ln -svf ../ntpstat-0.2 .
-
- %{MACRO_PATCHES}
-
+ prepare_cmds
# Create ntp user and group.
%{create_user}
end
configure_options += \
--sysconfdir=%{sysconfdir}/ntp/crypto \
- --with-openssl-libdir=%{libdir} \
--enable-all-clocks \
--enable-parse-clocks \
- --enable-ntp-signd=%{localstatedir}/run/ntp_signd
-
- build
- ./configure %{configure_options}
-
- echo "#define KEYFILE \"%{sysconfdir}/ntp/keys\"" >> ntpdate/ntpdate.h
- echo "#define NTP_VAR \"%{localstatedir}/log/ntpstats/\"" >> config.h
-
- make ${PARALLELISMFLAGS}
-
- sed -i 's|$ntpq = "ntpq"|$ntpq = "%{sbindir}/ntpq"|' scripts/ntptrace
- sed -i 's|ntpq -c |%{sbindir}/ntpq -c |' scripts/ntp-wait
-
- # Build ntpstat.
- make -C ntpstat-0.2
- end
+ --enable-ntp-signd=%{localstatedir}/run/ntp_signd \
+ --without-rpath
make_install_targets += bindir=%{sbindir}
mv -v %{BUILDROOT}%{mandir}/man{1/sntp.1,8/sntp.8}
rm -rfv %{BUILDROOT}%{mandir}/man1
- # Install ntpstat.
- pushd ntpstat-0.2
- mkdir -pv %{BUILDROOT}%{bindir}
- install -m 755 ntpstat %{BUILDROOT}%{bindir}
- install -m 644 ntpstat.1 %{BUILDROOT}%{mandir}/man8/ntpstat.8
- popd
-
# Fix section numbers.
sed -i 's/\(\.TH[a-zA-Z ]*\)[1-9]\(.*\)/\18\2/' \
%{BUILDROOT}%{mandir}/man8/*.8
packages
package %{name}
+ groups += Base
+
requires
ntpdate = %{thisver}
end
script postin
systemctl daemon-reload >/dev/null 2>&1 || :
+ systemctl --no-reload enable ntpd.service >/dev/null 2>&1 || :
end
script preun
end
end
- package %{name}-perl
- summary = NTP utilities written in Perl.
- description
- This package contains Perl scripts ntp-wait and ntptrace.
- end
- groups = Applications/System
-
- requires
- %{name} = %{thisver}
- end
-
- files
- %{sbindir}/ntp-wait
- %{sbindir}/ntptrace
- %{mandir}/man8/ntp-wait.8*
- %{mandir}/man8/ntptrace.8*
- %{unitdir}/ntp-wait.service
- end
-
- script preun
- systemctl --no-reload disable ntp-wait.service >/dev/null 2>&1 || :
- systemctl stop ntp-wait.service >/dev/null 2>&1 || :
- end
-
- script postun
- systemctl daemon-reload >/dev/null 2>&1 || :
- end
-
- script postup
- systemctl daemon-reload >/dev/null 2>&1 || :
- end
- end
-
package %{name}-devel
template DEVEL
end