wok-stable view ntpclient/receipt @ rev 5139
Up: slitaz-boot-scripts (3.3) Bug fix release
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Mar 23 20:45:29 2010 +0100 (2010-03-23) |
parents | 5c39f33a1d37 |
children | fdc7f9d423dd |
line source
1 # SliTaz package receipt.
3 PACKAGE="ntpclient"
4 VERSION="2007_365"
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-2007
17 cd $src
19 # disable debug
20 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile
21 make
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 src=$PACKAGE-2007
28 mkdir -p $fs/usr/bin
29 cp -a $src/ntpclient $fs/usr/bin
30 strip -s $fs/usr/bin/*
31 }
34 clen_rules()
35 {
36 rm -rf $PWD/$PACKAGE
37 }
39 post_install()
40 {
41 [ -n "$1" ] && return
42 echo ""
43 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read anser
44 if [ "$anser" == "y" ]; then
45 srv="fr.pool.ntp.org"
46 echo ""
47 echo -n "Setting up crontab for ntpclient..."
48 crontab - -u root << EOT
49 $(crontab -l 2> /dev/null)
50 0 0 * * * $root/usr/bin/ntpclient -s -h $srv
51 EOT
52 status
53 else
54 echo "Don't forget to run ntpclient -s -h <NTP Server>"
55 fi
56 }