network/openntpd: Updated for version 3.9p1

This commit is contained in:
Robby Workman 2010-05-11 22:25:38 +02:00 committed by David Somero
parent db09f3f58b
commit fd0f6eef88
4 changed files with 50 additions and 20 deletions

View file

@ -7,10 +7,11 @@ Tucker.
You will need to add the "_ntp" user and group to /etc/passwd and You will need to add the "_ntp" user and group to /etc/passwd and
/etc/group if it's not present on your system. Without these groups, /etc/group if it's not present on your system. Without these groups,
the package will not work. the package will not work. See http://slackbuilds.org/uid_gid.txt
for uid and gid recommendations.
This package conflicts with the "ntp" package included with Slackware, This package conflicts with the "ntp" package included with Slackware,
so only one of them should be installed at any given time. so only one of them should be installed at any given time.
The /etc/rc.d/rc.ntpd script in Slackware 12.0 will not work with The /etc/rc.d/rc.ntpd script in Slackware 12.1 will not work with
OpenNTPD; be sure to move the /etc/rc.d/rc.ntpd.new over if you want OpenNTPD; be sure to move the /etc/rc.d/rc.ntpd.new over if you want
it to work. it to work.

View file

@ -2,7 +2,7 @@
# Slackware build script for openntpd # Slackware build script for openntpd
# Copyright 2006-2007 Robby Workman (http://rlworkman.net) # Copyright 2006,2007,2008 Robby Workman, Northport, Alabama, USA
# All rights reserved. # All rights reserved.
# #
# Redistribution and use of this script, with or without modification, is # Redistribution and use of this script, with or without modification, is
@ -25,8 +25,9 @@
PRGNAM=openntpd PRGNAM=openntpd
VERSION=3.9p1 VERSION=3.9p1
ARCH=${ARCH:-i486} ARCH=${ARCH:-i486}
BUILD=${BUILD:-1} BUILD=${BUILD:-2}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
CWD=$(pwd) CWD=$(pwd)
TMP=${TMP:-/tmp/SBo} TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM PKG=$TMP/package-$PRGNAM
@ -36,14 +37,39 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686" SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi fi
if ! grep -q ^_ntp: /etc/passwd ; then
cat << EOF
You must have a _ntp user and group to use this package.
# groupadd -g 217 _ntp
# useradd -u 217 -d /var/empty -s /bin/false -g _ntp _ntp
EOF
exit 1
fi
if ! grep -q ^_ntp: /etc/group ; then
cat << EOF
You must have a _ntp user and group to use this package.
# groupadd -g 217 _ntp
# useradd -u 217 -d /var/empty -s /bin/false -g _ntp _ntp
EOF
exit 1
fi
set -e
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG/usr $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1 cd $TMP
rm -rf $PRGNAM-$VERSION rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION || exit 1 cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
chmod -R a-s,u+w,go+r-w . chmod -R a-s,u+w,go+r-w .
@ -52,22 +78,18 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \ --prefix=/usr \
--sysconfdir=/etc \ --sysconfdir=/etc \
--localstatedir=/var \ --localstatedir=/var \
|| exit 1 --build=$ARCH-slackware-linux
make || exit 1 make
make install DESTDIR=$PKG || exit 1 make install DESTDIR=$PKG
( cd $PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man ( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \; find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
) )
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CREDITS ChangeLog INSTALL LICENCE README \ cp -a CREDITS ChangeLog INSTALL LICENCE README \
@ -81,6 +103,11 @@ install -m 0755 $CWD/rc.ntpd $PKG/etc/rc.d/rc.ntpd.new
# Don't clobber config file # Don't clobber config file
mv $PKG/etc/ntpd.conf $PKG/etc/ntpd.conf.new mv $PKG/etc/ntpd.conf $PKG/etc/ntpd.conf.new
# Make sure the chroot directory exists with correct ownership/mode
mkdir -p $PKG/var/empty
chown root:root $PKG/var/empty
chmod 0755 $PKG/var/empty
mkdir -p $PKG/install mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh cat $CWD/doinst.sh > $PKG/install/doinst.sh

View file

@ -1,8 +1,8 @@
PRGNAM="openntpd" PRGNAM="openntpd"
VERSION="3.9p1" VERSION="3.9p1"
HOMEPAGE="http://www.openntpd.org" HOMEPAGE="http://www.openntpd.org"
DOWNLOAD="ftp://openbsd.mirrors.pair.com/OpenNTPD/openntpd-3.9p1.tar.gz" DOWNLOAD="ftp://ftp.eu.openbsd.org/pub/OpenBSD/OpenNTPD/openntpd-3.9p1.tar.gz"
MD5SUM="afc34175f38d08867c1403d9008600b3" MD5SUM="afc34175f38d08867c1403d9008600b3"
MAINTAINER="Robby Workman" MAINTAINER="Robby Workman"
EMAIL="rw@rlworkman.net" EMAIL="rw@rlworkman.net"
APPROVED="BP{k}" APPROVED="David Somero"

View file

@ -1,8 +1,10 @@
#!/bin/sh #!/bin/sh
# Start/stop/restart the network time protocol daemon # Start/stop/restart the network time protocol daemon
#
# Written for Slackware Linux by Robby Workman <http://rlworkman.net> # Written for Slackware Linux by Robby Workman <http://rlworkman.net>
# ## (by modifying one of Pat's scripts) # ## (by modifying one of Pat's scripts)
# Add -s to the command to set the time at startup # Add -s to the command to set the time at startup
ntpd_start() { ntpd_start() {