diff options
author | Andrzej Telszewski <atelszewski@gmail.com> | 2010-07-12 15:28:20 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-07-12 15:28:20 -0500 |
commit | 0f1ac701b7a52d5b3bcc61d1e5560c3259dd757a (patch) | |
tree | c830ce91a4612cb75073389a89e6e54fb75e9cd4 /libraries/libmpc/libmpc.SlackBuild | |
parent | b80ae35a65c23bfefb28f8ce37cbf7e4acba930f (diff) | |
download | slackbuilds-0f1ac701b7a52d5b3bcc61d1e5560c3259dd757a.tar.gz |
libraries/libmpc: Added (C library for complex number arithmetic)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries/libmpc/libmpc.SlackBuild')
-rw-r--r-- | libraries/libmpc/libmpc.SlackBuild | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/libraries/libmpc/libmpc.SlackBuild b/libraries/libmpc/libmpc.SlackBuild new file mode 100644 index 0000000000..ef3ab361f5 --- /dev/null +++ b/libraries/libmpc/libmpc.SlackBuild @@ -0,0 +1,80 @@ +#!/bin/sh + +# Slackware build script for MPC + +# Written by Andrzej Telszewski <atelszewski@gmail.com> + +PRGNAM=libmpc +VERSION=0.8.2 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRCNAM=mpc + +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} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --enable-static=no \ + --enable-shared=yes \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG + +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/* + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS ChangeLog COPYING.LIB INSTALL NEWS README TODO \ + $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 -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |