summaryrefslogtreecommitdiff
path: root/network/openntpd/openntpd.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2010-05-19 12:59:14 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-05-21 01:19:54 -0500
commit2840cc6b1fd9eaa866c3c9c1c8ef0f213604ba08 (patch)
treead846c30780ff730ee69e49ef70045b50eec9f8b /network/openntpd/openntpd.SlackBuild
parent46ad2866eabe16b466e1c4023b48b19747855f04 (diff)
downloadslackbuilds-2840cc6b1fd9eaa866c3c9c1c8ef0f213604ba08.tar.gz
network/openntpd: Miscellaneous cleanups.
Diffstat (limited to 'network/openntpd/openntpd.SlackBuild')
-rw-r--r--network/openntpd/openntpd.SlackBuild27
1 files changed, 18 insertions, 9 deletions
diff --git a/network/openntpd/openntpd.SlackBuild b/network/openntpd/openntpd.SlackBuild
index 76965be29a..ce26a49f91 100644
--- a/network/openntpd/openntpd.SlackBuild
+++ b/network/openntpd/openntpd.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for openntpd
-# Copyright 2006-2009 Robby Workman, Northport, Alabama, USA
+# Copyright 2006,2008,2009,2010 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,16 +24,25 @@
PRGNAM=openntpd
VERSION=3.9p1
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-make_user() {
+check_user() {
printf " You must have a _ntp user and group to use this package.
\t# groupadd -g 217 _ntp
\t# useradd -u 217 -d /var/empty -s /bin/false -g _ntp _ntp \n\n"
@@ -41,9 +50,9 @@ make_user() {
}
if ! grep -q ^_ntp: /etc/passwd ; then
- make_user
+ check_user
elif ! grep -q ^_ntp: /etc/group ; then
- make_user
+ check_user
fi
if [ "$ARCH" = "i486" ]; then
@@ -55,6 +64,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -82,10 +94,7 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-( 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
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
# Don't clobber config file
mv $PKG/etc/ntpd.conf $PKG/etc/ntpd.conf.new