mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 09:57:14 +08:00
ntp units added to package
This commit is contained in:
parent
b6985663b0
commit
a4811d605d
52
ntp/PKGBUILD
52
ntp/PKGBUILD
@ -4,13 +4,10 @@
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=ntp
|
||||
pkgver=4.2.6.p4
|
||||
_realver=4.2.6p4
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="NTP (Network Time Protocol) tries to keep servers in sync"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('custom')
|
||||
@ -19,16 +16,18 @@ depends=('openssl' 'readline' 'libcap')
|
||||
makedepends=('perl-html-parser')
|
||||
backup=('etc/ntp.conf' 'etc/conf.d/ntpd.conf')
|
||||
install=install
|
||||
source=("http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${_realver}.tar.gz"
|
||||
source=("http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${_realver}.tar.gz"
|
||||
ntp.conf
|
||||
ntpd.conf
|
||||
ntpd
|
||||
ntpdate)
|
||||
ntpdate
|
||||
ntpd.service)
|
||||
md5sums=('1447121a07b49361677ffda4f6e29527'
|
||||
'302c19233dc599328f0faefcce45f109'
|
||||
'58997d6cf4846d80e35a01b855376a33'
|
||||
'1a487594387e87039169e200f74a8346'
|
||||
'ab55ac8d8d7d0eefa3c3bec2ec98a1f4')
|
||||
'ab55ac8d8d7d0eefa3c3bec2ec98a1f4'
|
||||
'883483a27c96e59d9910d18871a91222')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${_realver}"
|
||||
@ -39,23 +38,24 @@ build() {
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-$_realver"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
install -Dm755 ../ntpd "${pkgdir}"/etc/rc.d/ntpd
|
||||
install -Dm755 ../ntpdate "${pkgdir}"/etc/rc.d/ntpdate
|
||||
install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
|
||||
install -Dm644 ../ntpd.conf "${pkgdir}"/etc/conf.d/ntpd.conf
|
||||
|
||||
cd html
|
||||
../scripts/html2man
|
||||
install -d "${pkgdir}"/usr/share/man
|
||||
mv man/man* "${pkgdir}"/usr/share/man
|
||||
mv "${pkgdir}/usr/share/man/man8/ntpd.8" "${pkgdir}/usr/share/man/man8/ntp-ntpd.8" # we should ditch openntpd
|
||||
cd ..
|
||||
|
||||
rmdir "${pkgdir}"/usr/{lib,sbin}
|
||||
install -d "${pkgdir}/var/lib/ntp"
|
||||
install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
cd "${srcdir}/${pkgname}-$_realver"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
install -Dm755 ../ntpd "${pkgdir}"/etc/rc.d/ntpd
|
||||
install -Dm755 ../ntpdate "${pkgdir}"/etc/rc.d/ntpdate
|
||||
install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
|
||||
install -Dm644 ../ntpd.conf "${pkgdir}"/etc/conf.d/ntpd.conf
|
||||
install -Dm644 ../ntpd.service "${pkgdir}"/usr/lib/systemd/system/ntpd.service
|
||||
|
||||
cd html
|
||||
../scripts/html2man
|
||||
install -d "${pkgdir}"/usr/share/man
|
||||
mv man/man* "${pkgdir}"/usr/share/man
|
||||
mv "${pkgdir}/usr/share/man/man8/ntpd.8" "${pkgdir}/usr/share/man/man8/ntp-ntpd.8" # we should ditch openntpd
|
||||
cd ..
|
||||
|
||||
rmdir "${pkgdir}"/usr/{lib,sbin}
|
||||
install -d "${pkgdir}/var/lib/ntp"
|
||||
install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
|
12
ntp/ntpd.service
Normal file
12
ntp/ntpd.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Network Time Service
|
||||
BindTo=systemd-timedated-ntp.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PrivateTmp=true
|
||||
ExecStart=/usr/bin/ntpd -u ntp:ntp
|
||||
ControlGroup=cpu:/
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -23,4 +23,5 @@ package() {
|
||||
sed -i 's/udev-settle/systemd-&/' "$pkgdir"/usr/lib/systemd/system/{lvm,dmraid}.service
|
||||
rm "$pkgdir"/usr/lib/systemd/system/bluetooth.service
|
||||
rm "$pkgdir"/usr/lib/systemd/system/cups.service
|
||||
}
|
||||
rm "$pkgdir"/usr/lib/systemd/system/ntpd.service
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user