diff options
author | B. Watson <yalhcru@gmail.com> | 2020-10-01 19:03:11 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-10-03 09:01:42 +0700 |
commit | 880f42641e0a11b722405037900da73fa1baa8db (patch) | |
tree | ab284915d63f25dfd9f82f1a0e8b6e0ec92042aa /desktop/salmon/salmon.SlackBuild | |
parent | dee654060638e2d454864ec4300590a92e769434 (diff) |
desktop/salmon: Added (afterstep-style load monitor applet)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/salmon/salmon.SlackBuild')
-rw-r--r-- | desktop/salmon/salmon.SlackBuild | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/desktop/salmon/salmon.SlackBuild b/desktop/salmon/salmon.SlackBuild new file mode 100644 index 0000000000000..8c2cb82bc8e68 --- /dev/null +++ b/desktop/salmon/salmon.SlackBuild @@ -0,0 +1,85 @@ +#!/bin/sh + +# Slackware build script for salmon + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=salmon +VERSION=${VERSION:-1.2.2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -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 . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# According to MLanden on IRC (and the man page for gethostname), it's +# checking for the wrong error. +sed -i 's,EINPROGRESS,ENAMETOOLONG,' salmon_x.c + +# One way to include missing headers and prototypes. +SLKCFLAGS+=" -include $CWD/missing.h" + +# --docdir not supported (or needed). +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make + +# DESTDIR not supported, it's only 2 files, do it manually. +mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/usr/doc/$PRGNAM-$VERSION +install -s -m0755 $PRGNAM $PKG/usr/bin +gzip -9c < $PRGNAM.man > $PKG/usr/man/man1/$PRGNAM.1x.gz + +cp -a CHANGES COPYING LICENSE 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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |