wok-next view ntpclient/receipt @ rev 20891
cookutils: up (1085); syslinux: remove docs
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Jul 19 18:27:17 2018 +0300 (2018-07-19) |
parents | b278b2018965 |
children | d5aab818505e |
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="erjo@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 -Dm 755 $src/ntpclient $install/usr/bin/ntpclient
19 }
21 genpkg_rules() {
22 copy @std
23 }
25 post_install() {
26 [ -n "$1" -o -n "$quiet" ] && return
27 echo -en '\nDo you want to run ntpclient in automatic mode (y/N): '
28 read -t 30 anser
29 if [ "$anser" == 'y' ]; then
30 srv='fr.pool.ntp.org'
31 action 'Setting up crontab for ntpclient...'
32 crontab -l 2>/dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
33 crontab - -u root <<EOT
34 $(crontab -l 2>/dev/null)
35 0 0 * * * /usr/bin/ntpclient -s -h $srv
36 EOT
37 else
38 cat <<EOT
40 .------------------------------.
41 | Don't forget to run: |
42 | |
43 | ntpclient -s -h <NTP Server> |
44 '------------------------------'
45 EOT
46 fi
47 }