wok-next view ntpclient/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | d43bf7aae921 |
children | d635206a5649 |
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 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 }