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
/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,
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
it to work.

View file

@ -2,7 +2,7 @@
# 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.
#
# Redistribution and use of this script, with or without modification, is
@ -25,8 +25,9 @@
PRGNAM=openntpd
VERSION=3.9p1
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@ -36,14 +37,39 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
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
mkdir -p $TMP $PKG/usr $OUTPUT
cd $TMP || exit 1
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
@ -52,22 +78,18 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
|| exit 1
--build=$ARCH-slackware-linux
make || exit 1
make install DESTDIR=$PKG || exit 1
make
make install DESTDIR=$PKG
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | 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
)
find $PKG | xargs file | grep -e "executable" -e "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
find . -type f -exec gzip -9 {} \;
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
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
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
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

View file

@ -1,8 +1,8 @@
PRGNAM="openntpd"
VERSION="3.9p1"
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"
MAINTAINER="Robby Workman"
EMAIL="rw@rlworkman.net"
APPROVED="BP{k}"
APPROVED="David Somero"

View file

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