diff options
author | Robby Workman <rw@rlworkman.net> | 2010-05-11 15:01:33 +0200 |
---|---|---|
committer | Piter PUNK <piterpk@slackbuilds.org> | 2010-05-11 15:01:33 +0200 |
commit | ff9b7ad258b1f6f0b13e8584ce1213f997e5253a (patch) | |
tree | 8289fa8c17a1f03a6a9b8772374edd2d87955924 /network/openntpd/openntpd.SlackBuild | |
parent | 456d07a8a92408f81fba2603c976897cc62f8ba5 (diff) |
network/openntpd: Initial import
Diffstat (limited to 'network/openntpd/openntpd.SlackBuild')
-rw-r--r-- | network/openntpd/openntpd.SlackBuild | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/network/openntpd/openntpd.SlackBuild b/network/openntpd/openntpd.SlackBuild new file mode 100644 index 0000000000000..b5903a26bd72d --- /dev/null +++ b/network/openntpd/openntpd.SlackBuild @@ -0,0 +1,89 @@ +#!/bin/sh + +# Slackware build script for openntpd + +# Copyright 2006-2007 Robby Workman (http://rlworkman.net) +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=openntpd +VERSION=3.9p1 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG/usr $OUTPUT +cd $TMP || exit 1 +rm -rf $PRGNAM-$VERSION +tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +cd $PRGNAM-$VERSION || exit 1 +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + || exit 1 + +make || exit 1 +make install DESTDIR=$PKG || exit 1 + +( 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 +) + +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 \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# Add an init script that works with OpenNTPD (see the README) +mkdir -p $PKG/etc/rc.d +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 + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |