summaryrefslogtreecommitdiffstats
path: root/network/go-sendxmpp/go-sendxmpp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/go-sendxmpp/go-sendxmpp.SlackBuild')
-rw-r--r--network/go-sendxmpp/go-sendxmpp.SlackBuild15
1 files changed, 8 insertions, 7 deletions
diff --git a/network/go-sendxmpp/go-sendxmpp.SlackBuild b/network/go-sendxmpp/go-sendxmpp.SlackBuild
index d3930b0171..1f5aeb9936 100644
--- a/network/go-sendxmpp/go-sendxmpp.SlackBuild
+++ b/network/go-sendxmpp/go-sendxmpp.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for go-sendxmpp
-# Copyright 2022, Alexander Verbovetsky, Moscow, Russia
+# Copyright 2022-2024, Alexander Verbovetsky, Moscow, Russia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=go-sendxmpp
-VERSION=${VERSION:-0.5.1}
+VERSION=${VERSION:-0.10.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -74,11 +74,12 @@ mkdir -p vendor
cat $CWD/modules.txt > vendor/modules.txt
for DIR in $(grep -o "^# .* " vendor/modules.txt | cut -d' ' -f2)
do
- NAME=$(echo $DIR | cut -d/ -f3)
+ NAME=$(echo $DIR | sed 's/[./]v[0-9]\+$//' | xargs basename)
DIR=vendor/$DIR
- tar xvf $CWD/$NAME-*.tar.gz
+ find -L $CWD -maxdepth 1 -type f -regex ".*/${NAME}-[^-]*\.tar\.gz" \
+ -exec tar xvf '{}' \;
mkdir -p $(dirname $DIR)
- mv $NAME-* $DIR
+ mv ${NAME}-* $DIR
done
chown -R root:root .
@@ -88,8 +89,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CGO_CFLAGS="$SLKCFLAGS" \
+CGO_CXXFLAGS="$SLKCFLAGS" \
go build
install -sDm 0755 go-sendxmpp -t $PKG/usr/bin