wok-current annotate ntpclient/receipt @ rev 5808

nss_ldap: fix TARBALL
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jul 12 11:23:49 2010 +0200 (2010-07-12)
parents 5c39f33a1d37
children fdc7f9d423dd
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@3125 16 src=$PACKAGE-2007
erjo@506 17 cd $src
erjo@3125 18
erjo@3125 19 # disable debug
erjo@3125 20 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile
erjo@506 21 make
erjo@506 22 }
erjo@506 23
erjo@506 24 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@506 25 genpkg_rules()
erjo@506 26 {
erjo@3125 27 src=$PACKAGE-2007
erjo@506 28 mkdir -p $fs/usr/bin
erjo@506 29 cp -a $src/ntpclient $fs/usr/bin
erjo@506 30 strip -s $fs/usr/bin/*
erjo@506 31 }
erjo@506 32
erjo@506 33
erjo@506 34 clen_rules()
erjo@506 35 {
erjo@506 36 rm -rf $PWD/$PACKAGE
erjo@506 37 }
erjo@506 38
erjo@506 39 post_install()
erjo@506 40 {
pascal@1137 41 [ -n "$1" ] && return
erjo@506 42 echo ""
erjo@506 43 echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read anser
erjo@506 44 if [ "$anser" == "y" ]; then
erjo@506 45 srv="fr.pool.ntp.org"
erjo@506 46 echo ""
erjo@506 47 echo -n "Setting up crontab for ntpclient..."
pascal@1926 48 crontab - -u root << EOT
pascal@1926 49 $(crontab -l 2> /dev/null)
pascal@1926 50 0 0 * * * $root/usr/bin/ntpclient -s -h $srv
pascal@1926 51 EOT
erjo@506 52 status
erjo@506 53 else
erjo@506 54 echo "Don't forget to run ntpclient -s -h <NTP Server>"
erjo@506 55 fi
erjo@506 56 }
erjo@506 57