wok-4.x view ntpclient/receipt @ rev 9040
Up: tazwok 4.2.4
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Mar 04 02:43:18 2011 +0100 (2011-03-04) |
parents | fdc7f9d423dd |
children | 02bbaa9d12ba |
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 cd $src
18 # disable debug
19 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile
20 make
21 }
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 genpkg_rules()
25 {
26 mkdir -p $fs/usr/bin
27 cp -a $src/ntpclient $fs/usr/bin
28 strip -s $fs/usr/bin/*
29 }
31 post_install()
32 {
33 [ -n "$1" ] && return
34 echo ""
35 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read anser
36 if [ "$anser" == "y" ]; then
37 srv="fr.pool.ntp.org"
38 echo ""
39 echo -n "Setting up crontab for ntpclient..."
40 crontab -l 2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
41 crontab - -u root << EOT
42 $(crontab -l 2> /dev/null)
43 0 0 * * * /usr/bin/ntpclient -s -h $srv
44 EOT
45 status
46 else
47 echo "Don't forget to run ntpclient -s -h <NTP Server>"
48 fi
49 }