network/go-sendxmpp: Added (send xmpp messages from command line)

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Alexander Verbovetsky 2022-05-12 13:50:13 +01:00 committed by Willy Sudiarto Raharjo
parent 0f68bd35d5
commit 165827f523
No known key found for this signature in database
GPG key ID: 3F617144D7238786
5 changed files with 246 additions and 0 deletions

View file

@ -0,0 +1,6 @@
Go-sendxmpp is a little command line tool to send messages or files to
an XMPP contact or a multi user chat.
XMPP is an open, non-proprietary protocol for instant messaging.
google-go-lang is needed only at build time.

View file

@ -0,0 +1,109 @@
#!/bin/bash
# Slackware build script for go-sendxmpp
# Copyright 2022, Alexander Verbovetsky, Moscow, Russia
# 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.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=go-sendxmpp
VERSION=${VERSION:-0.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
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}
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-v$VERSION
tar xvf $CWD/$PRGNAM-v$VERSION.tar.gz
cd $PRGNAM-v$VERSION
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)
DIR=vendor/$DIR
tar xvf $CWD/$NAME-*.tar.gz
mkdir -p $(dirname $DIR)
mv $NAME-* $DIR
done
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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
go build
install -sDm 0755 go-sendxmpp -t $PKG/usr/bin
mkdir -p $PKG/usr/man/man{1,5}
gzip -9 -c man/go-sendxmpp.1 > $PKG/usr/man/man1/go-sendxmpp.1.gz
gzip -9 -c man/go-sendxmpp.5 > $PKG/usr/man/man5/go-sendxmpp.5.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG.md README.md $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

View file

@ -0,0 +1,34 @@
PRGNAM="go-sendxmpp"
VERSION="0.5.0"
HOMEPAGE="https://salsa.debian.org/mdosch/go-sendxmpp"
DOWNLOAD="https://salsa.debian.org/mdosch/go-sendxmpp/-/archive/v0.5.0/go-sendxmpp-v0.5.0.tar.gz \
https://github.com/ProtonMail/gopenpgp/archive/v2.4.7/gopenpgp-2.4.7.tar.gz \
https://github.com/beevik/etree/archive/v1.1.0/etree-1.1.0.tar.gz \
https://github.com/gabriel-vasile/mimetype/archive/v1.4.0/mimetype-1.4.0.tar.gz \
https://github.com/mattn/go-xmpp/archive/99ddfc1/go-xmpp-99ddfc1aa46ae0f677dd2a0eee5d414edd65e223.tar.gz \
https://github.com/pborman/getopt/archive/v2.1.0/getopt-2.1.0.tar.gz \
https://salsa.debian.org/mdosch/xmppsrv/-/archive/v0.1.1/xmppsrv-v0.1.1.tar.gz \
https://github.com/ProtonMail/go-crypto/archive/a948124/go-crypto-a94812496cf5f115595b4242a638e8ad2e3cb0d2.tar.gz \
https://github.com/ProtonMail/go-mime/archive/2192574/go-mime-2192574d760f1c639dee6a41684ba0ae4058a0f7.tar.gz \
https://github.com/pkg/errors/archive/v0.9.1/errors-0.9.1.tar.gz \
https://github.com/golang/crypto/archive/eb4f295/crypto-eb4f295cb31f7fb5d52810411604a2638c9b19a2.tar.gz \
https://github.com/golang/net/archive/2871e0c/net-2871e0cb64e47e47ba7466fad6e11562caf99563.tar.gz \
https://github.com/golang/text/archive/v0.3.7/text-0.3.7.tar.gz"
MD5SUM="1efc8159805e2022a1dac05a1dd59d66 \
3133afb32aa3a39b84e436daf7c5f5a5 \
642a97129410b7213645f83a13e81f06 \
62497ee55ded97f3a5eb551fe3b37cdf \
5792b6015ebee3cafa35bdf8336b3d06 \
c52d24206b9fe29454e909a6ecbefe99 \
740851a9cee8c4374b8d17e740e05ca1 \
cc8d1f04c612a767ca19f8d88da63d1a \
f9748048e91aed589f90843e1958c291 \
0951216925c98fda75a484a528b06af6 \
d50f1c2e8243c4f8148644b3d9ee20a5 \
b9076ed70936957da6c17259f4b74c5a \
efe2f974b42f7b0421edc8216aa7fef2"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="google-go-lang"
MAINTAINER="Alexander Verbovetsky"
EMAIL="alik@ejik.org"

View file

@ -0,0 +1,78 @@
# github.com/ProtonMail/go-crypto v0.0.0-20220407094043-a94812496cf5
## explicit
github.com/ProtonMail/go-crypto/bitcurves
github.com/ProtonMail/go-crypto/brainpool
github.com/ProtonMail/go-crypto/eax
github.com/ProtonMail/go-crypto/internal/byteutil
github.com/ProtonMail/go-crypto/ocb
github.com/ProtonMail/go-crypto/openpgp
github.com/ProtonMail/go-crypto/openpgp/aes/keywrap
github.com/ProtonMail/go-crypto/openpgp/armor
github.com/ProtonMail/go-crypto/openpgp/clearsign
github.com/ProtonMail/go-crypto/openpgp/ecdh
github.com/ProtonMail/go-crypto/openpgp/elgamal
github.com/ProtonMail/go-crypto/openpgp/errors
github.com/ProtonMail/go-crypto/openpgp/internal/algorithm
github.com/ProtonMail/go-crypto/openpgp/internal/ecc
github.com/ProtonMail/go-crypto/openpgp/internal/encoding
github.com/ProtonMail/go-crypto/openpgp/packet
github.com/ProtonMail/go-crypto/openpgp/s2k
# github.com/ProtonMail/go-mime v0.0.0-20220429130430-2192574d760f
## explicit
github.com/ProtonMail/go-mime
# github.com/ProtonMail/gopenpgp/v2 v2.4.7
## explicit
github.com/ProtonMail/gopenpgp/v2/armor
github.com/ProtonMail/gopenpgp/v2/constants
github.com/ProtonMail/gopenpgp/v2/crypto
github.com/ProtonMail/gopenpgp/v2/internal
# github.com/beevik/etree v1.1.0
## explicit
github.com/beevik/etree
# github.com/gabriel-vasile/mimetype v1.4.0
## explicit
github.com/gabriel-vasile/mimetype
github.com/gabriel-vasile/mimetype/internal/charset
github.com/gabriel-vasile/mimetype/internal/json
github.com/gabriel-vasile/mimetype/internal/magic
# github.com/mattn/go-xmpp v0.0.0-20220410054612-99ddfc1aa46a
## explicit
github.com/mattn/go-xmpp
# github.com/pborman/getopt/v2 v2.1.0
## explicit
github.com/pborman/getopt/v2
# github.com/pkg/errors v0.9.1
## explicit
github.com/pkg/errors
# golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f
## explicit
golang.org/x/crypto/cast5
golang.org/x/crypto/curve25519
golang.org/x/crypto/curve25519/internal/field
golang.org/x/crypto/ed25519
# golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
## explicit
golang.org/x/net/html
golang.org/x/net/html/atom
# golang.org/x/text v0.3.7
## explicit
golang.org/x/text/encoding
golang.org/x/text/encoding/charmap
golang.org/x/text/encoding/htmlindex
golang.org/x/text/encoding/internal
golang.org/x/text/encoding/internal/identifier
golang.org/x/text/encoding/japanese
golang.org/x/text/encoding/korean
golang.org/x/text/encoding/simplifiedchinese
golang.org/x/text/encoding/traditionalchinese
golang.org/x/text/encoding/unicode
golang.org/x/text/internal/language
golang.org/x/text/internal/language/compact
golang.org/x/text/internal/tag
golang.org/x/text/internal/utf8internal
golang.org/x/text/language
golang.org/x/text/runes
golang.org/x/text/transform
# salsa.debian.org/mdosch/xmppsrv v0.1.1
## explicit
salsa.debian.org/mdosch/xmppsrv

View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
go-sendxmpp: go-sendxmpp (send xmpp messages from the command line)
go-sendxmpp:
go-sendxmpp:
go-sendxmpp: Go-sendxmpp is a little command line tool to send messages or files
go-sendxmpp: to an XMPP contact or a multi user chat.
go-sendxmpp:
go-sendxmpp: XMPP is an open, non-proprietary protocol for instant messaging.
go-sendxmpp:
go-sendxmpp: Homepage: https://salsa.debian.org/mdosch/go-sendxmpp
go-sendxmpp:
go-sendxmpp: