diff options
author | Vincent Batts <vbatts@hashbangbash.com> | 2011-06-25 18:25:57 +0200 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-07-14 21:56:59 -0300 |
commit | 13845052c32cfa2bbd1404172618692a6fd92311 (patch) | |
tree | 682ae052a7ac17cc2d30578aea522048ea9d7d0d /system/slack-utils/slack-utils.SlackBuild | |
parent | d6d2be05e281c0054e1334ee62ca47abdc6f0090 (diff) | |
download | slackbuilds-13845052c32cfa2bbd1404172618692a6fd92311.tar.gz |
system/slack-utils: Added. (utilities and Ruby library, for Slackware)
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'system/slack-utils/slack-utils.SlackBuild')
-rw-r--r-- | system/slack-utils/slack-utils.SlackBuild | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/system/slack-utils/slack-utils.SlackBuild b/system/slack-utils/slack-utils.SlackBuild new file mode 100644 index 0000000000..56924dc5dd --- /dev/null +++ b/system/slack-utils/slack-utils.SlackBuild @@ -0,0 +1,71 @@ +#!/bin/sh + +# Slackware build script for slack-utils + +# Copyright 2010,2011 Vincent Batts, vbatts@hashbangbash.com, http://hashbangbash.com/ +# 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. + +set -e + +PRGNAM=slack-utils +VERSION=${VERSION:-0.6.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION + +ruby setup.rb config \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/man + +ruby setup.rb install \ + --prefix=$PKG + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.rdoc examples $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -p -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} |