wok-next view ntpclient/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents d5aab818505e
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="ntpclient"
4 VERSION="2015_365"
5 CATEGORY="system-tools"
6 SHORT_DESC="Tiny NTP Client"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://doolittle.icarus.com/ntpclient/"
11 TARBALL="${PACKAGE}_$VERSION.tar.gz"
12 WGET_URL="$WEB_SITE$TARBALL"
14 compile_rules() {
15 # disable debug
16 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile &&
17 make &&
18 install -Dm755 $src/ntpclient $install/usr/bin/ntpclient
19 }
21 post_install() {
22 [ -n "$1" -o -n "$quiet" ] && return
23 echo -en '\nDo you want to run ntpclient in automatic mode (y/N): '
24 read -t 30 anser
25 if [ "$anser" == 'y' ]; then
26 srv='fr.pool.ntp.org'
27 action 'Setting up crontab for ntpclient...'
28 crontab -l 2>/dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
29 crontab - -u root <<EOT
30 $(crontab -l 2>/dev/null)
31 0 0 * * * /usr/bin/ntpclient -s -h $srv
32 EOT
33 else
34 cat <<EOT
36 .------------------------------.
37 | Don't forget to run: |
38 | |
39 | ntpclient -s -h <NTP Server> |
40 '------------------------------'
41 EOT
42 fi
43 }