wok view ntpclient/receipt @ rev 16477

Up alsa, ARM add ntp* + a bunch of python packages
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 23 01:06:05 2014 +0200 (2014-04-23)
parents 3765f181a6d5
children 1170c748b1ab
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 DEPENDS=""
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
21 # disable debug
22 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile
23 make
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/usr/bin
30 cp -a $src/ntpclient $fs/usr/bin
31 }
33 post_install()
34 {
35 [ -n "$1" ] && return
36 echo ""
37 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read t 30 anser
38 if [ "$anser" == "y" ]; then
39 srv="fr.pool.ntp.org"
40 echo ""
41 echo -n "Setting up crontab for ntpclient..."
42 crontab -l 2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
43 crontab - -u root << EOT
44 $(crontab -l 2> /dev/null)
45 0 0 * * * /usr/bin/ntpclient -s -h $srv
46 EOT
47 status
48 else
49 echo "Don't forget to run ntpclient -s -h <NTP Server>"
50 fi
51 }