diff options
author | root <root@rshg054.dnsready.net> | 2012-06-24 00:04:12 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-06-24 00:04:12 +0000 |
commit | 4319f36e44d4e7c70bf010c3286bb1739c59d4de (patch) | |
tree | 570e5a756192067d69cbabeab8fcf6b81cec3c51 /community/chrony | |
parent | 11357a5ab02a7d536375fb8333b2fb67278b4a36 (diff) |
Sun Jun 24 00:04:11 UTC 2012
Diffstat (limited to 'community/chrony')
-rw-r--r-- | community/chrony/PKGBUILD | 29 | ||||
-rw-r--r-- | community/chrony/rc.d | 37 | ||||
-rw-r--r-- | community/chrony/service | 10 |
3 files changed, 66 insertions, 10 deletions
diff --git a/community/chrony/PKGBUILD b/community/chrony/PKGBUILD index d49b286e4..5b0fad6de 100644 --- a/community/chrony/PKGBUILD +++ b/community/chrony/PKGBUILD @@ -1,30 +1,39 @@ -# $Id: PKGBUILD 65088 2012-02-20 03:35:18Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# $Id: PKGBUILD 72784 2012-06-22 12:49:49Z dreisner $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> # Contributor: Patrick Leslie Polzer <leslie.polzer@gmx.net> # Contributor: cdhotfire <cdhotfire@gmail.com> # Contributor: Shinlun Hsieh <yngwiexx@yahoo.com.tw> -# Maintainer: Elisamuel Resto <ryuji@simplysam.us> +# Contributor: Elisamuel Resto <ryuji@simplysam.us> pkgname=chrony pkgver=1.26 -pkgrel=2 -pkgdesc="Dial-up friendly NTP daemon and excellent replacement for NTP on desktop systems" +pkgrel=3 +pkgdesc='Lightweight NTP client and server' arch=('i686' 'x86_64') url="http://chrony.tuxfamily.org/" options=('strip') license=('GPL') depends=('readline' 'libcap') backup=('etc/chrony.conf') -source=("http://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz" \ - 'chrony') +source=(http://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz + rc.d + service) md5sums=('ad6dd619ff1986e4ff780363c64e2246' - 'd8b653c8bcc76cef00aa10fbd3eeb4f7') + 'd8b653c8bcc76cef00aa10fbd3eeb4f7' + 'd78e6189c6f51a2af30a65bdedcdb2eb') build() { cd $srcdir/$pkgname-$pkgver ./configure --prefix=/usr make +} + +package() { + cd $srcdir/$pkgname-$pkgver make DESTDIR=$pkgdir install - install -D -m0644 $srcdir/$pkgname-$pkgver/examples/chrony.conf.example $pkgdir/etc/chrony.conf - install -D -m0755 $srcdir/chrony $pkgdir/etc/rc.d/chrony + + install -Dm0644 $srcdir/$pkgname-$pkgver/examples/chrony.conf.example $pkgdir/etc/chrony.conf + install -Dm0755 $srcdir/rc.d $pkgdir/etc/rc.d/chrony + install -Dm644 $srcdir/service $pkgdir/usr/lib/systemd/system/chrony.service } diff --git a/community/chrony/rc.d b/community/chrony/rc.d new file mode 100644 index 000000000..ec042d798 --- /dev/null +++ b/community/chrony/rc.d @@ -0,0 +1,37 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/chronyd` +case "$1" in + start) + stat_busy "Starting chrony Daemon" + if [ -z "$PID" ]; then + /usr/sbin/chronyd $NTPD_ARGS & + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + stat_fail + else + add_daemon chrony + stat_done + fi + ;; + stop) + stat_busy "Stopping chrony Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon chrony + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac diff --git a/community/chrony/service b/community/chrony/service new file mode 100644 index 000000000..8bc8da9d2 --- /dev/null +++ b/community/chrony/service @@ -0,0 +1,10 @@ +[Unit] +Description=Chrony Network Time Daemon + +[Service] +Type=forking +ExecStart=/usr/sbin/chronyd +PIDFile=/var/run/chronyd.pid + +[Install] +WantedBy=multi-user.target |