wok view ntpclient/receipt @ rev 14869

Up: perl-pango (1.224)
author Claudinei Pereira <claudinei@slitaz.org>
date Mon Jul 22 19:47:37 2013 -0300 (2013-07-22)
parents 02bbaa9d12ba
children 3765f181a6d5
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 }
30 post_install()
31 {
32 [ -n "$1" ] && return
33 echo ""
34 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read t 30 anser
35 if [ "$anser" == "y" ]; then
36 srv="fr.pool.ntp.org"
37 echo ""
38 echo -n "Setting up crontab for ntpclient..."
39 crontab -l 2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
40 crontab - -u root << EOT
41 $(crontab -l 2> /dev/null)
42 0 0 * * * /usr/bin/ntpclient -s -h $srv
43 EOT
44 status
45 else
46 echo "Don't forget to run ntpclient -s -h <NTP Server>"
47 fi
48 }