wok-6.x diff ntpclient/receipt @ rev 18964

Up: ntpclient(2015_365); change output of some post_install()
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Mar 10 02:23:56 2016 +0200 (2016-03-10)
parents a5192a6e0733
children 02c70d036ea0
line diff
     1.1 --- a/ntpclient/receipt	Mon Feb 23 04:23:26 2015 -0500
     1.2 +++ b/ntpclient/receipt	Thu Mar 10 02:23:56 2016 +0200
     1.3 @@ -1,48 +1,45 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="ntpclient"
     1.7 -VERSION="2010_365"
     1.8 +VERSION="2015_365"
     1.9  CATEGORY="system-tools"
    1.10  SHORT_DESC="Tiny NTP Client"
    1.11  MAINTAINER="erjo@slitaz.org"
    1.12  LICENSE="GPL2"
    1.13 -TARBALL="${PACKAGE}_${VERSION}.tar.gz"
    1.14 -WEB_SITE="http://www.busybox.net/tinyutils.html"
    1.15 -WGET_URL="http://doolittle.icarus.com/ntpclient/$TARBALL"
    1.16 +TARBALL="${PACKAGE}_$VERSION.tar.gz"
    1.17 +WEB_SITE="http://doolittle.icarus.com/ntpclient/"
    1.18 +WGET_URL="${WEB_SITE}$TARBALL"
    1.19  HOST_ARCH="i486 arm"
    1.20  
    1.21  # Rules to configure and make the package.
    1.22  compile_rules()
    1.23  {
    1.24  	# disable debug
    1.25 -	sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile && 
    1.26 -	make 
    1.27 +	sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile &&
    1.28 +	make
    1.29  }
    1.30  
    1.31  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.32  genpkg_rules()
    1.33 -{	
    1.34 +{
    1.35  	mkdir -p $fs/usr/bin
    1.36  	cp -a $src/ntpclient  $fs/usr/bin
    1.37  }
    1.38  
    1.39  post_install()
    1.40  {
    1.41 -    [ -n "$1" ] && return
    1.42 -    echo ""
    1.43 -    echo -n "Do you want to run ntpclient in automatic mode (y/N): "; read -t 30 anser
    1.44 -    	if [ "$anser" == "y" ]; then
    1.45 -    		srv="fr.pool.ntp.org"
    1.46 -            echo ""
    1.47 -            echo -n "Setting up crontab for ntpclient..."
    1.48 -            crontab -l  2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' || 
    1.49 -	    crontab - -u root << EOT
    1.50 -$(crontab -l 2> /dev/null)
    1.51 +	[ -n "$1" -o -n "$quiet" ] && return
    1.52 +	echo -en '\nDo you want to run ntpclient in automatic mode (y/N): '
    1.53 +	read -t 30 anser
    1.54 +		if [ "$anser" == 'y' ]; then
    1.55 +			srv='fr.pool.ntp.org'
    1.56 +			action 'Setting up crontab for ntpclient...'
    1.57 +			crontab -l  2>/dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
    1.58 +			crontab - -u root <<EOT
    1.59 +$(crontab -l 2>/dev/null)
    1.60  0 0 * * * /usr/bin/ntpclient -s -h $srv
    1.61  EOT
    1.62 -            status
    1.63 -        else
    1.64 -        	echo "Don't forget to run ntpclient -s -h <NTP Server>"
    1.65 -        fi
    1.66 +		else
    1.67 +			echo "Don't forget to run ntpclient -s -h <NTP Server>"
    1.68 +		fi
    1.69  }
    1.70 -