aboutsummaryrefslogtreecommitdiff
path: root/network/wire/wire.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/wire/wire.SlackBuild')
-rw-r--r--network/wire/wire.SlackBuild58
1 files changed, 31 insertions, 27 deletions
diff --git a/network/wire/wire.SlackBuild b/network/wire/wire.SlackBuild
index 160bd830cf369..ae72e4ccbec86 100644
--- a/network/wire/wire.SlackBuild
+++ b/network/wire/wire.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/usr/bin/env bash
# Slackware build script for wire
-# Copyright 2016-2019 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2016-2019 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2020 David O'Shaughnessy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,16 +24,16 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=wire
-VERSION=${VERSION:-3.5.2881}
+VERSION=${VERSION:-3.20.2934}
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
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
fi
CWD=$(pwd)
@@ -41,24 +42,27 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
-DEBARCH="i386"
+# Upstream only has binary support for x86_64.
if [ "$ARCH" = "x86_64" ]; then
DEBARCH="amd64"
+else
+ echo "Sorry, the Wire binary is only available for x86_64."
+ exit 1
fi
rm -rf $PKG
@@ -66,26 +70,26 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION && cd $PRGNAM-$VERSION
-ar p $CWD/$PRGNAM\_$VERSION\_$DEBARCH.deb data.tar.xz | tar xJv
+ar p $CWD/${PRGNAM^}-$VERSION\_$DEBARCH.deb data.tar.xz | tar xJv
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 {} \;
+ \( -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 {} \;
# Install data
mkdir -p $PKG/opt/${PRGNAM^}
cp -rf opt/${PRGNAM^}/* $PKG/opt/${PRGNAM^}
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Create soft link for launcher
mkdir -p $PKG/usr/bin
(
- cd $PKG/usr/bin
- ln -sf /opt/${PRGNAM^}/$PRGNAM-desktop $PRGNAM-desktop
+ cd $PKG/usr/bin
+ ln -sf /opt/${PRGNAM^}/$PRGNAM-desktop $PRGNAM-desktop
)
# Install .desktop file
@@ -96,12 +100,12 @@ cat usr/share/applications/$PRGNAM-desktop.desktop > \
# Install .desktop icon
mkdir -p $PKG/usr/share/pixmaps
install -D -m0644 usr/share/icons/hicolor/32x32/apps/$PRGNAM-desktop.png \
- $PKG/usr/share/pixmaps/$PRGNAM-desktop.png
+ $PKG/usr/share/pixmaps/$PRGNAM-desktop.png
gunzip usr/share/doc/$PRGNAM-desktop/changelog.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a usr/share/doc/$PRGNAM-desktop/changelog opt/${PRGNAM^}/LICENSE* \
- $PKG/usr/doc/$PRGNAM-$VERSION
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install