wok-4.x view ntpclient/receipt @ rev 3060

Linux: don't forget firmwares...
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 13 17:34:54 2009 +0200 (2009-05-13)
parents 10710b8535bc
children bcb2999e13f6
line source
1 # SliTaz package receipt.
3 PACKAGE="ntpclient"
4 VERSION="2000_339"
5 CATEGORY="system-tools"
6 SHORT_DESC="Tiny NTP Client"
7 MAINTAINER="erjo@slitaz.org"
8 DEPENDS=""
9 TARBALL="${PACKAGE}_${VERSION}.tar.gz"
10 WEB_SITE="http://www.busybox.net/tinyutils.html"
11 WGET_URL="http://doolittle.icarus.com/ntpclient/$TARBALL"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 src=$PACKAGE
17 cd $src
18 make
19 }
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 genpkg_rules()
23 {
24 src=$PACKAGE
25 mkdir -p $fs/usr/bin
26 cp -a $src/ntpclient $fs/usr/bin
27 strip -s $fs/usr/bin/*
28 }
31 clen_rules()
32 {
33 rm -rf $PWD/$PACKAGE
34 }
36 post_install()
37 {
38 [ -n "$1" ] && return
39 echo ""
40 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read anser
41 if [ "$anser" == "y" ]; then
42 srv="fr.pool.ntp.org"
43 echo ""
44 echo -n "Setting up crontab for ntpclient..."
45 crontab - -u root << EOT
46 $(crontab -l 2> /dev/null)
47 0 0 * * * $root/usr/bin/ntpclient -s -h $srv
48 EOT
49 status
50 else
51 echo "Don't forget to run ntpclient -s -h <NTP Server>"
52 fi
53 }