wok-current view ntpclient/receipt @ rev 16274
Up: git (1.9.1)
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Sat Apr 05 21:34:07 2014 +0000 (2014-04-05) |
parents | 749ffdd335d7 |
children | 7d672a2330b8 |
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 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"
13 DEPENDS=""
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
20 # disable debug
21 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile
22 make
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr/bin
29 cp -a $src/ntpclient $fs/usr/bin
30 }
32 post_install()
33 {
34 [ -n "$1" ] && return
35 echo ""
36 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read t 30 anser
37 if [ "$anser" == "y" ]; then
38 srv="fr.pool.ntp.org"
39 echo ""
40 echo -n "Setting up crontab for ntpclient..."
41 crontab -l 2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
42 crontab - -u root << EOT
43 $(crontab -l 2> /dev/null)
44 0 0 * * * /usr/bin/ntpclient -s -h $srv
45 EOT
46 status
47 else
48 echo "Don't forget to run ntpclient -s -h <NTP Server>"
49 fi
50 }