aboutsummaryrefslogtreecommitdiff
path: root/network/openntpd/openntpd.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-11 22:25:38 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:25:38 +0200
commitfd0f6eef88bf02d1e4b3268cdd22af9b716553b8 (patch)
tree30b96a32cd9d592b463f29809c11dd9d34357582 /network/openntpd/openntpd.SlackBuild
parentdb09f3f58bee7e53455eea0c84e729c240ef1389 (diff)
network/openntpd: Updated for version 3.9p1
Diffstat (limited to 'network/openntpd/openntpd.SlackBuild')
-rw-r--r--network/openntpd/openntpd.SlackBuild57
1 files changed, 42 insertions, 15 deletions
diff --git a/network/openntpd/openntpd.SlackBuild b/network/openntpd/openntpd.SlackBuild
index ab31dc3b13118..4af2139e313e3 100644
--- a/network/openntpd/openntpd.SlackBuild
+++ b/network/openntpd/openntpd.SlackBuild
@@ -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