mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
added extra/ntp
This commit is contained in:
parent
9f47c951b9
commit
dbd2309cd4
6 changed files with 137 additions and 0 deletions
25
extra/ntp/0001-disable-pthread-warmup-on-ARM.patch
Normal file
25
extra/ntp/0001-disable-pthread-warmup-on-ARM.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
From c93db056e57b2eb58975f8a0ad329f75dcd177b8 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sat, 14 Jan 2017 14:08:30 -0700
|
||||
Subject: [PATCH] disable pthread warmup on ARM
|
||||
|
||||
---
|
||||
ntpd/ntpd.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c
|
||||
index 2c7f02ec5..8746eff4c 100644
|
||||
--- a/ntpd/ntpd.c
|
||||
+++ b/ntpd/ntpd.c
|
||||
@@ -34,7 +34,7 @@
|
||||
# ifdef HAVE_PTHREAD_H
|
||||
# include <pthread.h>
|
||||
# endif
|
||||
-# if defined(linux)
|
||||
+# if defined(linux) && !defined(__arm__)
|
||||
# define NEED_PTHREAD_WARMUP
|
||||
# endif
|
||||
#endif
|
||||
--
|
||||
2.11.0
|
||||
|
58
extra/ntp/PKGBUILD
Normal file
58
extra/ntp/PKGBUILD
Normal file
|
@ -0,0 +1,58 @@
|
|||
# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
|
||||
# Contributor: Gaetan Bisson <bisson@archlinux.org>
|
||||
# Contributor: kevin <kevin@archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - disable pthread warmup on 32-bit ARM
|
||||
|
||||
pkgname=ntp
|
||||
_pkgname=ntp #-dev
|
||||
_pkgver=4.2.8p9
|
||||
pkgver=${_pkgver/p/.p}
|
||||
pkgrel=1.1
|
||||
pkgdesc='Network Time Protocol reference implementation'
|
||||
url='http://www.ntp.org/'
|
||||
license=('custom')
|
||||
arch=('i686' 'x86_64')
|
||||
depends=('openssl' 'libcap' 'libedit')
|
||||
backup=('etc/ntp.conf')
|
||||
source=("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${_pkgname}-${_pkgver}.tar.gz"
|
||||
'0001-disable-pthread-warmup-on-ARM.patch'
|
||||
'ntp.conf'
|
||||
'ntpd.service'
|
||||
'ntpdate.service')
|
||||
sha1sums=('032e58e7e416ffa1cbdcbb81021785fce4ed4d4b'
|
||||
'ec9bd3894b65edca8efdb34ce12b3eb144336294'
|
||||
'ad1d6ee2e9aca64a84a7224c88bf6008ac6c69e1'
|
||||
'0cccca872385e0142888ab48d273fec0669b30a8'
|
||||
'059b382d1af0c55202e2d17f2ae065a2cbfec9ee')
|
||||
|
||||
options=('!emptydirs')
|
||||
install=ntp.install
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_pkgname}-${_pkgver}"
|
||||
|
||||
patch -p1 -i ../0001-disable-pthread-warmup-on-ARM.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_pkgname}-${_pkgver}"
|
||||
|
||||
./configure --prefix=/usr --libexecdir=/usr/lib --enable-linuxcaps --enable-ntp-signd
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_pkgname}-${_pkgver}"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
|
||||
install -Dm644 ../ntpd.service "${pkgdir}"/usr/lib/systemd/system/ntpd.service
|
||||
install -Dm644 ../ntpdate.service "${pkgdir}"/usr/lib/systemd/system/ntpdate.service
|
||||
install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
|
||||
install -d -o 87 "${pkgdir}"/var/lib/ntp
|
||||
echo > "${pkgdir}/var/lib/ntp/.placeholder"
|
||||
}
|
24
extra/ntp/ntp.conf
Normal file
24
extra/ntp/ntp.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Please consider joining the pool:
|
||||
#
|
||||
# http://www.pool.ntp.org/join.html
|
||||
#
|
||||
# For additional information see:
|
||||
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
|
||||
# - http://support.ntp.org/bin/view/Support/GettingStarted
|
||||
# - the ntp.conf man page
|
||||
|
||||
# Associate to Arch's NTP pool
|
||||
server 0.arch.pool.ntp.org
|
||||
server 1.arch.pool.ntp.org
|
||||
server 2.arch.pool.ntp.org
|
||||
server 3.arch.pool.ntp.org
|
||||
|
||||
# By default, the server allows:
|
||||
# - all queries from the local host
|
||||
# - only time queries from remote hosts, protected by rate limiting and kod
|
||||
restrict default kod limited nomodify nopeer noquery notrap
|
||||
restrict 127.0.0.1
|
||||
restrict ::1
|
||||
|
||||
# Location of drift file
|
||||
driftfile /var/lib/ntp/ntp.drift
|
5
extra/ntp/ntp.install
Normal file
5
extra/ntp/ntp.install
Normal file
|
@ -0,0 +1,5 @@
|
|||
post_install() {
|
||||
getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
|
||||
getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
|
||||
true
|
||||
}
|
13
extra/ntp/ntpd.service
Normal file
13
extra/ntp/ntpd.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=Network Time Service
|
||||
After=network.target nss-lookup.target
|
||||
Conflicts=systemd-timesyncd.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PrivateTmp=true
|
||||
ExecStart=/usr/bin/ntpd -g -u ntp:ntp
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
12
extra/ntp/ntpdate.service
Normal file
12
extra/ntp/ntpdate.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=One-Shot Network Time Service
|
||||
After=network.target nss-lookup.target
|
||||
Before=ntpd.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
PrivateTmp=true
|
||||
ExecStart=/usr/bin/ntpd -q -n -g -u ntp:ntp
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue