aboutsummaryrefslogtreecommitdiff
path: root/network/mosaic-ck/mosaic-ck.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-06-19 22:55:07 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-06-19 22:55:07 +0700
commit2c1adc18ed1833be2dff1aac3924ae3fbf5c800b (patch)
tree382ae3761a2d9f89b348b91e4e6ca19d8dba6603 /network/mosaic-ck/mosaic-ck.SlackBuild
parent8c2db2dd95c60c61337dcaa2f0b40ed4479598e3 (diff)
network/mosaic-ck: Added (Fork of NCSA Mosaic).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/mosaic-ck/mosaic-ck.SlackBuild')
-rw-r--r--network/mosaic-ck/mosaic-ck.SlackBuild109
1 files changed, 109 insertions, 0 deletions
diff --git a/network/mosaic-ck/mosaic-ck.SlackBuild b/network/mosaic-ck/mosaic-ck.SlackBuild
new file mode 100644
index 0000000000000..5d37ac86b595d
--- /dev/null
+++ b/network/mosaic-ck/mosaic-ck.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# Slackware build script for mosaic-ck
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=mosaic-ck
+VERSION=${VERSION:-2.7ck9}
+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}
+
+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
+
+TARBALL="mosaic${VERSION//./}.tar.gz"
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM
+tar xvf $CWD/$TARBALL
+cd $PRGNAM
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# I don't know who thought it was a good idea to link with /usr/lib/libjpeg.a
+# instead of just saying -ljpeg. Also, have to build against old libpng.
+# Use our CFLAGS too.
+sed -i \
+ -e '/^pnglibs/s,.*,pnglibs = -lpng12 -lz -lm,' \
+ -e '/^jpeglibs/s,.*,jpeglibs = -ljpeg,' \
+ -e '/^pngincludedir/s,/include,/include/libpng12,' \
+ -e "/^CFLAGS/s,-g,$SLKCFLAGS," \
+ makefiles/Makefile.linux
+
+# there's a configure script, but it's just cruft.
+make -j1 linux
+
+# no 'make install' target, it's fairly self-contained anyway.
+# binary gets installed as mosaic-ck, doinst.sh will symlink it to
+# Mosaic if there's not already a Mosaic in /usr/bin.
+mkdir -p $PKG/usr/bin
+install -m0755 -oroot -groot -s src/Mosaic $PKG/usr/bin/$PRGNAM
+
+# Maybe this could be a .new config file? None of Pat's packages that
+# have app-defaults install them as .new, so I won't either.
+mkdir -p $PKG/etc/X11/app-defaults
+install -m0644 app-defaults.color $PKG/etc/X11/app-defaults/Mosaic
+
+# .desktop file is a modified copy of
+# https://github.com/wtachi/ncsa-mosaic/blob/master/desktop/Mosaic.desktop
+mkdir -p $PKG/usr/share/applications
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+# Original mosaic uses an icon that looks like icon.1.xpm. We'll pick one
+# of the other animation frames for mosaic-ck, to avoid confusion with
+# the original.
+mkdir -p $PKG/usr/share/pixmaps
+convert src/pixmaps/icon.10.xpm png:- > $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# man page written for this build. kind of amazed that the source doesn't
+# come with a man page.
+mkdir -p $PKG/usr/man/man1
+sed "s,@VERSION@,$VERSION,g" $CWD/$PRGNAM.1 | \
+ gzip -9c - > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/sample_dotfiles
+cp -a AATODO CHANGES COPYRIGHT FEATURES README* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a mosaic-* $PKG/usr/doc/$PRGNAM-$VERSION/sample_dotfiles
+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}