diff options
author | titopoquito <titopoquito@cooltoad.com> | 2010-05-11 15:18:47 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackbuilds.org> | 2010-05-11 15:18:47 +0200 |
commit | 27da3ddf82316842257c38fad64e8b8309913a0d (patch) | |
tree | 45c0ece353afa3509ed7d99040dc283901f8c609 /system/unrtf/unrtf.SlackBuild | |
parent | 189a6d77200b5c9aa986d7c6faec161702107442 (diff) |
system/unrtf: Initial import
Diffstat (limited to 'system/unrtf/unrtf.SlackBuild')
-rw-r--r-- | system/unrtf/unrtf.SlackBuild | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/system/unrtf/unrtf.SlackBuild b/system/unrtf/unrtf.SlackBuild new file mode 100644 index 000000000000..46e51e1d7c06 --- /dev/null +++ b/system/unrtf/unrtf.SlackBuild @@ -0,0 +1,85 @@ +#!/bin/sh +# Slackware build script for unrtf +# Copyright 2007 by titopoquito (titopoquito@cooltoad.com) +# Permission to use, copy, modify, and distribute this software for +# any purpose with or without fee is hereby granted, provided that +# the above copyright notice and this permission notice appear in all +# copies. +# +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR +# CONTRIBUTORS 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. +# --------------------------------------------------------------------------- +# Modified by the SlackBuilds.org Project + +# Exit on most errors +set -e + +PRGNAM=unrtf # replace with name of program +VERSION=0.20.2 # replace with version of program +ARCH=${ARCH:-i486} # this should not change +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} # the "_SBo" is required +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} # Drop the package in /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 $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar -xvf $CWD/$PRGNAM"_"$VERSION.tar.gz +cd $PRGNAM"_"$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var + +# Compile the application and install it into the $PKG directory +make +make install DESTDIR=$PKG + +( 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 +) + +# Compress man pages +( 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 +) + +# Copy program documentation into the package +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# Copy the slack-desc +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Make the package +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |