wok-current view ntpclient/receipt @ rev 24644

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