wok view ntpclient/receipt @ rev 24417

created recipes for perl-cairo-gobject, perl-glib-object-introspection and perl-gtk3
author Hans-G?nter Theisgen
date Fri Feb 11 09:16:47 2022 +0100 (2022-02-11)
parents 77be6b57303b
children ad8b9ff412d2
line source
1 # SliTaz package receipt.
3 PACKAGE="ntpclient"
4 VERSION="2015_365"
5 CATEGORY="system-tools"
6 SHORT_DESC="Tiny NTP Client"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="${PACKAGE}_$VERSION.tar.gz"
10 WEB_SITE="http://doolittle.icarus.com/ntpclient/"
11 WGET_URL="${WEB_SITE}$TARBALL"
12 HOST_ARCH="i486 arm"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 # disable debug
18 sed -i 's/\(^CFLAGS += -DENABLE_DEBUG\)/#\1/' Makefile &&
19 make
20 }
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 genpkg_rules()
24 {
25 mkdir -p $fs/usr/bin
26 cp -a $src/ntpclient $fs/usr/bin
27 }
29 post_install()
30 {
31 [ -n "$1" -o -n "$quiet" ] && return
32 echo -en '\nDo you want to run ntpclient in automatic mode (y/N): '
33 read -t 30 anser
34 if [ "$anser" = 'y' ]; then
35 srv='fr.pool.ntp.org'
36 action 'Setting up crontab for ntpclient...'
37 crontab -l 2>/dev/null | grep -q '/usr/bin/ntpclient -s -h' ||
38 crontab - -u root <<EOT
39 $(crontab -l 2>/dev/null)
40 0 0 * * * /usr/bin/ntpclient -s -h $srv
41 EOT
42 else
43 echo "Don't forget to run ntpclient -s -h <NTP Server>"
44 fi
45 }