aboutsummaryrefslogtreecommitdiff
path: root/misc/ciso/ciso.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ciso/ciso.SlackBuild')
-rw-r--r--misc/ciso/ciso.SlackBuild65
1 files changed, 28 insertions, 37 deletions
diff --git a/misc/ciso/ciso.SlackBuild b/misc/ciso/ciso.SlackBuild
index 0262b5bddc3f5..b42d03a0b2f35 100644
--- a/misc/ciso/ciso.SlackBuild
+++ b/misc/ciso/ciso.SlackBuild
@@ -2,31 +2,23 @@
# Slackware build script for ciso
-# Copyright 2008-2009 Tarantino Antonino <metrofox9@gmail.com>
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Originally written by Tarantino Antonino.
+# Modified and now maintained by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20220126 bkw: BUILD=3
+# - take over maintenance.
+# - rework -p0 patches into one -p1 patch.
+# - add man page.
+# - actually use SLKCFLAGS.
+# - fix banner so it shows the right version number.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ciso
VERSION=${VERSION:-1.0.0}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +30,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -69,26 +58,28 @@ 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 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+chmod 644 *
+
+# Patch does this:
+# - fix x86_64 build.
+# - add missing includes.
+# - add CFLAGS support to Makefile.
+# - make the banner show the actual version number.
-# Patching the source for compiling better on x64 arch and for avoiding warnings during compilation
-patch -p0 < $CWD/ciso.h.patch
-patch -p0 < $CWD/fix_includes.patch
+patch -p1 < $CWD/compilefix.diff
mkdir -p $PKG/usr/bin
-make CC="gcc $SLKCFLAGS"
+make CFLAGS="$SLKCFLAGS -Wl,-s"
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# 20220126 bkw: man page explains WTF a CSO image is (I didn't know).
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp license $PKG/usr/doc/$PRGNAM-$VERSION
-chmod 0644 $PKG/usr/doc/$PRGNAM-$VERSION/*
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a license $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc