academic/calcoo: Updated for version 2.1.0.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Robby Workman 2013-11-03 11:08:15 -06:00
parent 54ad5b6b46
commit 57cafca9a6
4 changed files with 22 additions and 56 deletions

View File

@ -2,7 +2,7 @@
# Slackware build script for calcoo
# Copyright 2006-2012 Robby Workman, Northport, Alabama, USA
# Copyright 2006-2013 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -23,70 +23,33 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=calcoo
VERSION=${VERSION:-1.3.18}
VERSION=${VERSION:-2.1.0}
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
ARCH=noarch
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 $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var \
--mandir=/usr/man \
--build=$ARCH-slackware-linux
mkdir -p $PKG/usr/share/java
cp -a $CWD/calcoo.jar $PKG/usr/share/java
chmod 0644 $PKG/usr/share/java/calcoo.jar
make LIBS+="-lm" # libm doesn't get linked otherwise
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/bin
cat $CWD/calcoo.wrapper > $PKG/usr/bin/calcoo
chmod 0755 $PKG/usr/bin/calcoo
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

View File

@ -1,10 +1,10 @@
PRGNAM="calcoo"
VERSION="1.3.18"
VERSION="2.1.0"
HOMEPAGE="http://calcoo.sourceforge.net/"
DOWNLOAD="http://downloads.sourceforge.net/calcoo/calcoo-1.3.18.tar.gz"
MD5SUM="0740045dc83fb74c7b40a785b37a6514"
DOWNLOAD="http://downloads.sourceforge.net/project/calcoo/calcoo/2.1.0/calcoo.jar"
MD5SUM="78880e375fb50cb6b945e43713c11065"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
REQUIRES="jdk"
MAINTAINER="Robby Workman"
EMAIL="rworkman@slackbuilds.org"

View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /usr/share/java
exec java -jar calcoo.jar

View File

@ -1,9 +1,9 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
calcoo: Calcoo (RPN and Scientific Calculator)