diff options
Diffstat (limited to 'development/hexinator/hexinator.SlackBuild')
-rw-r--r-- | development/hexinator/hexinator.SlackBuild | 85 |
1 files changed, 71 insertions, 14 deletions
diff --git a/development/hexinator/hexinator.SlackBuild b/development/hexinator/hexinator.SlackBuild index 7966c38c29..d2e1335947 100644 --- a/development/hexinator/hexinator.SlackBuild +++ b/development/hexinator/hexinator.SlackBuild @@ -1,17 +1,28 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for hexinator -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211224 bkw: BUILD=2, fix for -current (add old openssl lib). +# 20200326 bkw: update for v1.12 for 64-bit, stay at 1.10 for 32-bit. +# 20200317 bkw: update for v1.10, switched from RPM to .deb. Yes, there +# is a v1.11 available, but there are good reasons for not packaging it, +# from our POV: +# 1) v1.11 dropped support for 32-bit. +# 2) The 64-bit .deb for v1.11 is missing one of the shared libraries that +# should be packaged with it, so it doesn't *work*. Reported to +# upstream, possibly will be fixed soon. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=hexinator -VERSION=${VERSION:-1.9_1} -BUILD=${BUILD:-1} +VERSION=${VERSION:-1.12} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} - -RPMVER="$( echo $VERSION | sed 's/_/-/g' )" +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -21,45 +32,91 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} case "$ARCH" in - i?86) RPMARCH=i386 ;; - x86_64) RPMARCH="$ARCH" ;; + i?86) DEBARCH=i386 ;; + x86_64) DEBARCH=amd64 ;; *) echo "!!! Unsupported ARCH '$ARCH'. Only i586|i686|x86_64 allowed." 1>&2 exit 1 ;; esac set -e +# 1.10 is the last version with 32-bit support. Doing it this way +# allows 32-bit users to set VERSION in the environment, if they +# want to build 1.08 or 1.09. +if [ "$DEBARCH" = "i386" ]; then + VERMINOR="$( echo $VERSION | cut -d. -f2 )" + if [ "$VERMINOR" -gt 9 ]; then + NEWVER=1.10 + echo "*** Packaging $NEWVER as $VERSION lacks 32-bit support" + VERSION=$NEWVER + fi +fi + # No 'source' dir, extract directly to $PKG rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP mkdir -p $PKG cd $PKG -rpm2cpio $CWD/$PRGNAM-$RPMVER.$RPMARCH.rpm | cpio -idmv +ar p $CWD/$PRGNAM-${VERSION}_$DEBARCH.deb data.tar.xz | tar xvfJ - + +# png icons don't need to be +x +chmod -x usr/share/icons/*/*/*/* + 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 {} \+ -# No docs in the RPM, include our own README. +# No docs in the .deb, include our own README. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $CWD/README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# 20211224 bkw: upstream's QtNetwork library was built with +# openssl-1.0.x. It won't work with openssl-1.1.x, and hexinator +# won't work with Slackware's qt5. Since PV dropped openssl10-solibs, +# we have to include the shared lib in this package. Before you +# start freaking out about how insecure and unmaintained this old +# openssl is, remember that it's *only* used by hexinator (lives in +# /opt/hexinator), and that hexinator only uses it to talk to its own +# vendor's server. So long as you trust the vendor, it's OK. And if +# you don't, you wouldn't run their precompiled binary anyway, right? + +SSL10VER="${SSL10VER:-1.0.2u}" +SSL10BLD="${SSL10BLD:-2}" +SSL10ARCH="x86_64" +[ "$ARCH" != "x86_64" ] && SSL10ARCH=i586 + +mkdir tmp +cd tmp + tar xvf $CWD/openssl10-solibs-$SSL10VER-$SSL10ARCH-$SSL10BLD.txz + mv ./lib*/lib{ssl,crypto}*.so.* $PKG/opt/$PRGNAM/lib +cd - +rm -rf tmp + # The hexinator binary was built with rpath support, so it can find its # own libraries. The libs need some attention before hexinator can find -# them (presumably rpm would automagically do this when the package gets +# them (presumably dpkg would automagically do this when the package gets # installed). It's a qt5 app that ships with its own private set of qt5 # libs. We *don't* want it using any other qt5 libs that may happen to # exist (like the ones in /usr/lib64 from the qt5 SlackBuild). The # ldconfig step here prevents that. + chmod 755 $PKG/opt/$PRGNAM/lib/* ldconfig -n -N $PKG/opt/$PRGNAM/lib +for i in ssl crypto; do + ln -s lib$i.so.1 $PKG/opt/$PRGNAM/lib/lib$i.so +done # Convenience symlink, for us command line freaks. mkdir -p $PKG/usr/bin @@ -70,4 +127,4 @@ 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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |