summaryrefslogtreecommitdiff
path: root/academic/wmcalc/wmcalc.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-08-16 08:18:06 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-20 07:50:03 +0700
commite63ab9ad48e4110b5da528e02ec57850d7a003bc (patch)
tree41a7d06b6d94c92c05ac65e6a1e2e480670335bb /academic/wmcalc/wmcalc.SlackBuild
parentdd947381cedb6e704809db16e3efc37aae6bcd69 (diff)
downloadslackbuilds-e63ab9ad48e4110b5da528e02ec57850d7a003bc.tar.gz
academic/wmcalc: New maintainer, minor fixes.
Diffstat (limited to 'academic/wmcalc/wmcalc.SlackBuild')
-rw-r--r--academic/wmcalc/wmcalc.SlackBuild51
1 files changed, 27 insertions, 24 deletions
diff --git a/academic/wmcalc/wmcalc.SlackBuild b/academic/wmcalc/wmcalc.SlackBuild
index f8e9169fd6..27383497f1 100644
--- a/academic/wmcalc/wmcalc.SlackBuild
+++ b/academic/wmcalc/wmcalc.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for wmcalc
#
-# Copyright 2015 Gethyn ThomasQuail <gethyn@bloodbathsoftworks.com>
+# Copyright 2015 Gethyn ThomasQuail <email removed>
# All rights reserved.
#
# Based on:
@@ -25,15 +25,26 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Now maintained by B. Watson <yalhcru@gmail.com>
+
+# 20160816 bkw:
+# - take over maintenance
+# - BUILD=2
+# - install binary stripped
+# - actually use SLKCFLAGS
+# - don't install extra copy of wmcalc.conf in doc dir
+# - use .new for the config file, add doinst.sh
+# - i486 => i586
+# - use tarball hosted on naptime, to avoid md5sum mismatches
+
PRGNAM=wmcalc
VERSION=${VERSION:-0.5}
-ARCHIVEFIX=dockapps-c2f0ad2 # This is because the archive is named incorrectly.
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -44,8 +55,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,9 +74,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $ARCHIVEFIX
-tar xvf $CWD/$ARCHIVEFIX.tar.gz
-cd $ARCHIVEFIX
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -73,28 +84,20 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Let's compile!
-make
-make install DESTDIR=$PKG
-
-# Create bin directory and move executable there
-mkdir -p $PKG/usr/bin
-mv $PKG/usr/local/bin/wmcalc $PKG/usr/bin
-
-# Creates man page directory
-mkdir -p $PKG/usr/man/man1
+make CFLAGS="$SLKCFLAGS"
+strip $PRGNAM
+make install DESTDIR=$PKG PREFIX=/usr MANDIR=/usr/man/man1
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
-# Compresses man page and moves it into place
-gzip -9 $PKG/usr/local/share/man/man1/wmcalc.1
-mv $PKG/usr/local/share/man/man1/wmcalc.1.gz $PKG/usr/man/man1
-rm -rf $PKG/usr/local
+mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING wmcalc.conf README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}