###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
include Config
-VER = 4.2.4p7
+VER = 4.2.8p15
THISAPP = ntp-$(VER)
DL_FILE = $(THISAPP).tar.gz
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8c19ff62ed4f7d64f8e2aa59cb11f364
+$(DL_FILE)_BLAKE2 = 5697d6623d79686f9ca9ad907172bf942383067d1e9817117d20db042e9f7410644f236f1a0d77ab6bf6ec468476e12ea65b494a28f0dd8674bf08fc8875cfef
install : $(TARGET)
download :$(patsubst %,$(DIR_DL)/%,$(objects))
-md5 : $(subst %,%_MD5,$(objects))
+b2 : $(subst %,%_BLAKE2,$(objects))
###############################################################################
-# Downloading, checking, md5sum
+# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
-$(subst %,%_MD5,$(objects)) :
- @$(MD5)
+$(subst %,%_BLAKE2,$(objects)) :
+ @$(B2SUM)
###############################################################################
# Installation Details
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && ./configure --prefix=/usr --bindir=/usr/sbin \
- --sysconfdir=/etc --disable-nls
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ntp-4.2.8p15-build-fix-for-glibc-2.34.patch
+ $(UPDATE_AUTOMAKE)
+ cd $(DIR_APP) && \
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-nls \
+ --enable-all-clocks \
+ --enable-parse-clocks
+
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
+
-mkdir /etc/ntp
- chown -R ntp:ntp /etc/ntp
- echo "restrict default nomodify noquery" > /etc/ntp.conf
- echo "server 127.127.1.0" >> /etc/ntp.conf
- echo "fudge 127.127.1.0 stratum 10" >> /etc/ntp.conf
- echo "driftfile /etc/ntp/drift" >> /etc/ntp.conf
+ install -v -m 644 $(DIR_SRC)/config/ntp/ntp.conf /etc/ntp.conf
+
+ #Enable it by default...
+ cp -vf $(DIR_SRC)/config/time/* /var/ipfire/time/
+ chmod 644 /var/ipfire/time/*
+ chown nobody:nobody /var/ipfire/time/*
+ ln -svf ../init.d/ntp /etc/rc.d/rc0.d/K46ntpd
+ ln -svf ../init.d/ntp /etc/rc.d/rc6.d/K46ntpd
+ ln -svf ../init.d/ntp /etc/rc.d/rc3.d/S26ntpd
+
@rm -rf $(DIR_APP)
@$(POSTBUILD)