wok-6.x annotate ntp/receipt @ rev 24782

Up alpine (2.25)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 20 12:08:15 2022 +0000 (2022-03-20)
parents 92ee1de174b9
children 00e3b45c063b
rev   line source
pascal@1741 1 # SliTaz package receipt.
pascal@1741 2
pascal@1741 3 PACKAGE="ntp"
Hans-G?nter@21588 4 VERSION="4.2.8p13"
pascal@1741 5 CATEGORY="network"
pascal@1741 6 SHORT_DESC="Network Time Protocol daemon."
pascal@1741 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15601 8 LICENSE="GPL3"
Hans-G?nter@21588 9 WEB_SITE="http://www.ntp.org/"
Hans-G?nter@21588 10
pascal@1741 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@1741 12 WGET_URL="http://archive.ntp.org/ntp4/$TARBALL"
Hans-G?nter@21588 13
Hans-G?nter@21588 14 DEPENDS="attr libcap libcrypto readline"
Hans-G?nter@21588 15 CONFIG_FILES="/etc/ntp.conf"
Hans-G?nter@21588 16
pankso@16477 17 HOST_ARCH="i486 arm"
pankso@16477 18
pascal@24453 19 # What is the latest version available today?
pascal@24453 20 current_version()
pascal@24453 21 {
pascal@24453 22 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
pascal@24453 23 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
pascal@24453 24 }
pascal@24453 25
pascal@1741 26 # Rules to configure and make the package.
pascal@1741 27 compile_rules()
pascal@1741 28 {
pascal@4275 29 sed -i 's/MOD_NANO/0/' ntpd/ntp_loopfilter.c
Hans-G?nter@21588 30
Hans-G?nter@21588 31 ./configure \
Hans-G?nter@21588 32 --prefix=/usr \
Hans-G?nter@21588 33 --infodir=/usr/share/info \
Hans-G?nter@21588 34 --sysconfdir=/etc \
Hans-G?nter@21588 35 --localstatedir=/var \
Hans-G?nter@21588 36 --mandir=/usr/share/man \
Hans-G?nter@21588 37 $CONFIGURE_ARGS && \
Hans-G?nter@21588 38 make &&
Hans-G?nter@21588 39 make DESTDIR=$DESTDIR install
pascal@1741 40 }
pascal@1741 41
pascal@1741 42 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1741 43 genpkg_rules()
pascal@1741 44 {
Hans-G?nter@21588 45 mkdir -p $fs/usr
Hans-G?nter@21588 46 mkdir -p $fs/etc/init.d
Hans-G?nter@21588 47
Hans-G?nter@21588 48 cp -a $install/usr/bin $fs/usr
Hans-G?nter@21588 49 cp stuff/ntp $fs/etc/init.d
pascal@1751 50 cat > $fs/etc/ntp.conf <<EOT
pascal@15924 51 restrict default noquery
pascal@15924 52 restrict 192.168.0.0 mask 255.255.0.0
pascal@15924 53 restrict 127.0.0.1
Hans-G?nter@21588 54 server europe.pool.ntp.org
Hans-G?nter@21588 55 server pool.ntp.org
pascal@1751 56 EOT
pascal@1741 57 }