wok view ntpclient/receipt @ rev 16503
Up: spk (1.4)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Apr 24 03:14:13 2014 +0200 (2014-04-24) |
parents | 7d672a2330b8 |
children | a5192a6e0733 |
line source
1 # SliTaz package receipt.
3 PACKAGE="ntpclient"
4 VERSION="2010_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://www.busybox.net/tinyutils.html"
11 WGET_URL="http://doolittle.icarus.com/ntpclient/$TARBALL"
12 HOST_ARCH="i486 arm"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 # disable debug
18 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile &&
19 make
20 }
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 genpkg_rules()
24 {
25 mkdir -p $fs/usr/bin
26 cp -a $src/ntpclient $fs/usr/bin
27 }
29 post_install()
30 {
31 [ -n "$1" ] && return
32 echo ""
33 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read t 30 anser
34 if [ "$anser" == "y" ]; then
35 srv="fr.pool.ntp.org"
36 echo ""
37 echo -n "Setting up crontab for ntpclient..."
38 crontab -l 2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
39 crontab - -u root << EOT
40 $(crontab -l 2> /dev/null)
41 0 0 * * * /usr/bin/ntpclient -s -h $srv
42 EOT
43 status
44 else
45 echo "Don't forget to run ntpclient -s -h <NTP Server>"
46 fi
47 }