wok-next view ntpclient/receipt @ rev 20458

Unlock x86_64 architecture
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 02 12:12:14 2018 +0200 (2018-03-02)
parents 77be6b57303b
children b278b2018965
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"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 # disable debug
17 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile &&
18 make
19 }
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 genpkg_rules()
23 {
24 mkdir -p $fs/usr/bin
25 cp -a $src/ntpclient $fs/usr/bin
26 }
28 post_install()
29 {
30 [ -n "$1" -o -n "$quiet" ] && return
31 echo -en '\nDo you want to run ntpclient in automatic mode (y/N): '
32 read -t 30 anser
33 if [ "$anser" == 'y' ]; then
34 srv='fr.pool.ntp.org'
35 action 'Setting up crontab for ntpclient...'
36 crontab -l 2>/dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
37 crontab - -u root <<EOT
38 $(crontab -l 2>/dev/null)
39 0 0 * * * /usr/bin/ntpclient -s -h $srv
40 EOT
41 else
42 echo "Don't forget to run ntpclient -s -h <NTP Server>"
43 fi
44 }