wok-next annotate ntpclient/receipt @ rev 20678
Up clisp (2.50)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue May 15 02:59:03 2018 +0300 (2018-05-15) |
parents | b278b2018965 |
children | d5aab818505e |
rev | line source |
---|---|
al@20481 | 1 # SliTaz package receipt v2. |
erjo@506 | 2 |
erjo@506 | 3 PACKAGE="ntpclient" |
al@18964 | 4 VERSION="2015_365" |
erjo@506 | 5 CATEGORY="system-tools" |
erjo@506 | 6 SHORT_DESC="Tiny NTP Client" |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15584 | 8 LICENSE="GPL2" |
al@20481 | 9 WEB_SITE="http://doolittle.icarus.com/ntpclient/" |
al@20481 | 10 |
al@18964 | 11 TARBALL="${PACKAGE}_$VERSION.tar.gz" |
al@20513 | 12 WGET_URL="$WEB_SITE$TARBALL" |
erjo@506 | 13 |
al@20481 | 14 compile_rules() { |
erjo@3125 | 15 # disable debug |
al@18964 | 16 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile && |
al@20481 | 17 make && |
al@20481 | 18 install -Dm 755 $src/ntpclient $install/usr/bin/ntpclient |
erjo@506 | 19 } |
erjo@506 | 20 |
al@20481 | 21 genpkg_rules() { |
al@20481 | 22 copy @std |
erjo@506 | 23 } |
erjo@506 | 24 |
al@20481 | 25 post_install() { |
al@18964 | 26 [ -n "$1" -o -n "$quiet" ] && return |
al@18964 | 27 echo -en '\nDo you want to run ntpclient in automatic mode (y/N): ' |
al@18964 | 28 read -t 30 anser |
al@18964 | 29 if [ "$anser" == 'y' ]; then |
al@18964 | 30 srv='fr.pool.ntp.org' |
al@18964 | 31 action 'Setting up crontab for ntpclient...' |
al@18964 | 32 crontab -l 2>/dev/null | grep -q '/usr/bin/ntpclient -s -h' || |
al@18964 | 33 crontab - -u root <<EOT |
al@18964 | 34 $(crontab -l 2>/dev/null) |
pascal@6934 | 35 0 0 * * * /usr/bin/ntpclient -s -h $srv |
pascal@1926 | 36 EOT |
al@18964 | 37 else |
al@20481 | 38 cat <<EOT |
al@20481 | 39 |
al@20481 | 40 .------------------------------. |
al@20481 | 41 | Don't forget to run: | |
al@20481 | 42 | | |
al@20481 | 43 | ntpclient -s -h <NTP Server> | |
al@20481 | 44 '------------------------------' |
al@20481 | 45 EOT |
al@18964 | 46 fi |
erjo@506 | 47 } |