diff options
Diffstat (limited to 'network/openntpd/openntpd.SlackBuild')
-rw-r--r-- | network/openntpd/openntpd.SlackBuild | 27 |
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 |