summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
author Robby Workman <rworkman@slackbuilds.org>2010-05-19 12:59:14 -0500
committer Robby Workman <rworkman@slackbuilds.org>2010-05-21 01:19:54 -0500
commit2840cc6b1fd9eaa866c3c9c1c8ef0f213604ba08 (patch)
treead846c30780ff730ee69e49ef70045b50eec9f8b /network
parent46ad2866eabe16b466e1c4023b48b19747855f04 (diff)
downloadslackbuilds-2840cc6b1fd9eaa866c3c9c1c8ef0f213604ba08.tar.gz
slackbuilds-2840cc6b1fd9eaa866c3c9c1c8ef0f213604ba08.tar.xz
network/openntpd: Miscellaneous cleanups.
Diffstat (limited to 'network')
-rw-r--r--network/openntpd/README5
-rw-r--r--network/openntpd/doinst.sh18
-rw-r--r--network/openntpd/openntpd.SlackBuild27
-rw-r--r--network/openntpd/slack-desc6
4 files changed, 34 insertions, 22 deletions
diff --git a/network/openntpd/README b/network/openntpd/README
index 2950f6147c..22cecd1631 100644
--- a/network/openntpd/README
+++ b/network/openntpd/README
@@ -12,6 +12,5 @@ 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.1 will not work with
-OpenNTPD; be sure to move the /etc/rc.d/rc.ntpd.new over if you want
-it to work.
+The /etc/rc.d/rc.ntpd script in Slackware will not work with OpenNTPD;
+be sure to move the /etc/rc.d/rc.ntpd.new over if you want it to work.
diff --git a/network/openntpd/doinst.sh b/network/openntpd/doinst.sh
index d1589f1e71..27ac593f97 100644
--- a/network/openntpd/doinst.sh
+++ b/network/openntpd/doinst.sh
@@ -11,13 +11,17 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.ntpd.new:
-if [ -e etc/rc.d/rc.ntpd ]; then
- cp -a etc/rc.d/rc.ntpd etc/rc.d/rc.ntpd.new.incoming
- cat etc/rc.d/rc.ntpd.new > etc/rc.d/rc.ntpd.new.incoming
- mv etc/rc.d/rc.ntpd.new.incoming etc/rc.d/rc.ntpd.new
-fi
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
-config etc/rc.d/rc.ntpd.new
+preserve_perms etc/rc.d/rc.ntpd.new
config etc/ntpd.conf.new
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
diff --git a/network/openntpd/slack-desc b/network/openntpd/slack-desc
index 1522a801ff..32d58bbba8 100644
--- a/network/openntpd/slack-desc
+++ b/network/openntpd/slack-desc
@@ -7,13 +7,13 @@
|-----handy-ruler------------------------------------------------------|
openntpd: OpenNTPD (Network Time Protocol client/server)
-openntpd:
+openntpd:
openntpd: OpenNTPD is a FREE, easy to use implementation of the Network Time
openntpd: Protocol. It provides the ability to sync the local clock to remote
openntpd: NTP servers and can act as NTP server itself, redistributing the
openntpd: local clock. OpenNTPD is primarily developed by Henning Brauer as
openntpd: part of the OpenBSD Project. The portable version is made by Darren
openntpd: Tucker.
-openntpd:
+openntpd:
openntpd: Homepage: http://www.openntpd.org
-openntpd:
+openntpd: