wok-next annotate ntpclient/receipt @ rev 15690

dpkg,debootstrap: Fix missing mkdir command
author Stanislas Leduc <shann@slitaz.org>
date Sat Dec 21 08:14:41 2013 +0100 (2013-12-21)
parents 749ffdd335d7
children 7d672a2330b8
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"
pascal@15584 8 LICENSE="GPL2"
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
pascal@15584 13 DEPENDS=""
pascal@15584 14
erjo@506 15 # Rules to configure and make the package.
erjo@506 16 compile_rules()
erjo@506 17 {
erjo@506 18 cd $src
erjo@3125 19
erjo@3125 20 # disable debug
erjo@3125 21 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile
erjo@506 22 make
erjo@506 23 }
erjo@506 24
erjo@506 25 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@506 26 genpkg_rules()
slaxemulator@8752 27 {
erjo@506 28 mkdir -p $fs/usr/bin
erjo@506 29 cp -a $src/ntpclient $fs/usr/bin
erjo@506 30 }
erjo@506 31
erjo@506 32 post_install()
erjo@506 33 {
pascal@1137 34 [ -n "$1" ] && return
erjo@506 35 echo ""
pascal@14582 36 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read t 30 anser
erjo@506 37 if [ "$anser" == "y" ]; then
erjo@506 38 srv="fr.pool.ntp.org"
erjo@506 39 echo ""
erjo@506 40 echo -n "Setting up crontab for ntpclient..."
pascal@6934 41 crontab -l 2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
pascal@6934 42 crontab - -u root << EOT
pascal@1926 43 $(crontab -l 2> /dev/null)
pascal@6934 44 0 0 * * * /usr/bin/ntpclient -s -h $srv
pascal@1926 45 EOT
erjo@506 46 status
erjo@506 47 else
erjo@506 48 echo "Don't forget to run ntpclient -s -h <NTP Server>"
erjo@506 49 fi
erjo@506 50 }
erjo@506 51