wok-next annotate ntpclient/receipt @ rev 14388
embryo: update deps
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Tue Apr 23 07:01:23 2013 +0200 (2013-04-23) |
parents | a1c1d35d9f92 |
children | 749ffdd335d7 |
rev | line source |
---|---|
erjo@506 | 1 # SliTaz package receipt. |
erjo@506 | 2 |
erjo@506 | 3 PACKAGE="ntpclient" |
erjo@3125 | 4 VERSION="2007_365" |
erjo@506 | 5 CATEGORY="system-tools" |
erjo@506 | 6 SHORT_DESC="Tiny NTP Client" |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
erjo@506 | 8 DEPENDS="" |
erjo@506 | 9 TARBALL="${PACKAGE}_${VERSION}.tar.gz" |
erjo@506 | 10 WEB_SITE="http://www.busybox.net/tinyutils.html" |
erjo@506 | 11 WGET_URL="http://doolittle.icarus.com/ntpclient/$TARBALL" |
erjo@506 | 12 |
erjo@506 | 13 # Rules to configure and make the package. |
erjo@506 | 14 compile_rules() |
erjo@506 | 15 { |
erjo@506 | 16 cd $src |
erjo@3125 | 17 |
erjo@3125 | 18 # disable debug |
erjo@3125 | 19 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile |
erjo@506 | 20 make |
erjo@506 | 21 } |
erjo@506 | 22 |
erjo@506 | 23 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@506 | 24 genpkg_rules() |
slaxemulator@8752 | 25 { |
erjo@506 | 26 mkdir -p $fs/usr/bin |
erjo@506 | 27 cp -a $src/ntpclient $fs/usr/bin |
erjo@506 | 28 } |
erjo@506 | 29 |
erjo@506 | 30 post_install() |
erjo@506 | 31 { |
pascal@1137 | 32 [ -n "$1" ] && return |
erjo@506 | 33 echo "" |
erjo@506 | 34 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read anser |
erjo@506 | 35 if [ "$anser" == "y" ]; then |
erjo@506 | 36 srv="fr.pool.ntp.org" |
erjo@506 | 37 echo "" |
erjo@506 | 38 echo -n "Setting up crontab for ntpclient..." |
pascal@6934 | 39 crontab -l 2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' || |
pascal@6934 | 40 crontab - -u root << EOT |
pascal@1926 | 41 $(crontab -l 2> /dev/null) |
pascal@6934 | 42 0 0 * * * /usr/bin/ntpclient -s -h $srv |
pascal@1926 | 43 EOT |
erjo@506 | 44 status |
erjo@506 | 45 else |
erjo@506 | 46 echo "Don't forget to run ntpclient -s -h <NTP Server>" |
erjo@506 | 47 fi |
erjo@506 | 48 } |
erjo@506 | 49 |