wok-current annotate ntpclient/receipt @ rev 24477
updated dialog and dialog-dev (1.3_20210324 -> 1.3_20220117)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Feb 18 10:50:23 2022 +0100 (2022-02-18) |
parents | 02c70d036ea0 |
children |
rev | line source |
---|---|
erjo@506 | 1 # SliTaz package receipt. |
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@18964 | 9 TARBALL="${PACKAGE}_$VERSION.tar.gz" |
al@18964 | 10 WEB_SITE="http://doolittle.icarus.com/ntpclient/" |
al@18964 | 11 WGET_URL="${WEB_SITE}$TARBALL" |
pankso@16477 | 12 HOST_ARCH="i486 arm" |
erjo@506 | 13 |
pascal@24433 | 14 # What is the latest version available today? |
pascal@24433 | 15 current_version() |
pascal@24433 | 16 { |
pascal@24433 | 17 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24433 | 18 sed "/latest/d;/${PACKAGE}_[0-9]/!d;/tar/!d;s|.*${PACKAGE}_\\(.*\\).tar..*|\\1|" | sort -Vr | sed q |
pascal@24433 | 19 } |
pascal@24433 | 20 |
erjo@506 | 21 # Rules to configure and make the package. |
erjo@506 | 22 compile_rules() |
erjo@506 | 23 { |
erjo@3125 | 24 # disable debug |
al@18964 | 25 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile && |
al@18964 | 26 make |
erjo@506 | 27 } |
erjo@506 | 28 |
erjo@506 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@506 | 30 genpkg_rules() |
al@18964 | 31 { |
erjo@506 | 32 mkdir -p $fs/usr/bin |
erjo@506 | 33 cp -a $src/ntpclient $fs/usr/bin |
erjo@506 | 34 } |
erjo@506 | 35 |
erjo@506 | 36 post_install() |
erjo@506 | 37 { |
al@18964 | 38 [ -n "$1" -o -n "$quiet" ] && return |
al@18964 | 39 echo -en '\nDo you want to run ntpclient in automatic mode (y/N): ' |
al@18964 | 40 read -t 30 anser |
pascal@20892 | 41 if [ "$anser" = 'y' ]; then |
al@18964 | 42 srv='fr.pool.ntp.org' |
al@18964 | 43 action 'Setting up crontab for ntpclient...' |
al@18964 | 44 crontab -l 2>/dev/null | grep -q '/usr/bin/ntpclient -s -h' || |
al@18964 | 45 crontab - -u root <<EOT |
al@18964 | 46 $(crontab -l 2>/dev/null) |
pascal@6934 | 47 0 0 * * * /usr/bin/ntpclient -s -h $srv |
pascal@1926 | 48 EOT |
al@18964 | 49 else |
al@18964 | 50 echo "Don't forget to run ntpclient -s -h <NTP Server>" |
al@18964 | 51 fi |
erjo@506 | 52 } |