diff options
author | Alexander Verbovetsky <alik@ejik.org> | 2022-07-08 22:44:57 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-07-09 10:06:08 +0700 |
commit | a6f8ecc014552944d0aa9457bc41a0798cb8f470 (patch) | |
tree | d28219570ea007d51f160c9e6e1ea1e63292c617 /network/goimapnotify | |
parent | 027349a2e1c78ce05dbf90d72afc87e2f5eb5b1f (diff) | |
download | slackbuilds-a6f8ecc014552944d0aa9457bc41a0798cb8f470.tar.gz |
network/goimapnotify: Added (IMAP IDLE notifications)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/goimapnotify')
-rw-r--r-- | network/goimapnotify/README | 2 | ||||
-rw-r--r-- | network/goimapnotify/goimapnotify.SlackBuild | 108 | ||||
-rw-r--r-- | network/goimapnotify/goimapnotify.info | 26 | ||||
-rw-r--r-- | network/goimapnotify/modules.txt | 32 | ||||
-rw-r--r-- | network/goimapnotify/slack-desc | 19 |
5 files changed, 187 insertions, 0 deletions
diff --git a/network/goimapnotify/README b/network/goimapnotify/README new file mode 100644 index 0000000000..550f17545a --- /dev/null +++ b/network/goimapnotify/README @@ -0,0 +1,2 @@ +Execute scripts on IMAP mailbox changes (new/deleted/updated messages) +using IDLE, Golang version. diff --git a/network/goimapnotify/goimapnotify.SlackBuild b/network/goimapnotify/goimapnotify.SlackBuild new file mode 100644 index 0000000000..3dc76eb4a5 --- /dev/null +++ b/network/goimapnotify/goimapnotify.SlackBuild @@ -0,0 +1,108 @@ +#!/bin/bash + +# Slackware build script for goimapnotify + +# 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=goimapnotify +VERSION=${VERSION:-2.3.7} +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-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION + +mkdir -p vendor +cat $CWD/modules.txt > vendor/modules.txt +for DIR in $(grep -o "^# .* " vendor/modules.txt | cut -d' ' -f2) +do + NAME=$(basename $DIR) + NAME=${NAME%.*} + DIR=vendor/$DIR + mkdir -p $(dirname $DIR) + find -L $CWD -type f -regex ".*/${NAME}-[^-]*\.tar\.gz" -exec tar xvf {} \; + 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 {} \; + +[ -z "$GOROOT" ] && source /etc/profile.d/go.sh + +CGO_CFLAGS="$SLKCFLAGS" \ +CGO_CXXFLAGS="$SLKCFLAGS" \ +go build + +install -sDm 755 goimapnotify $PKG/usr/bin/goimapnotify + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CHANGELOG.rst 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 diff --git a/network/goimapnotify/goimapnotify.info b/network/goimapnotify/goimapnotify.info new file mode 100644 index 0000000000..63c0537dd9 --- /dev/null +++ b/network/goimapnotify/goimapnotify.info @@ -0,0 +1,26 @@ +PRGNAM="goimapnotify" +VERSION="2.3.7" +HOMEPAGE="https://gitlab.com/shackra/goimapnotify" +DOWNLOAD="https://gitlab.com/shackra/goimapnotify/-/archive/2.3.7/goimapnotify-2.3.7.tar.gz \ + https://github.com/emersion/go-imap/archive/b7db4a2/go-imap-b7db4a2bc5cc04fb568fb036a438da43ee9a9f78.tar.gz \ + https://github.com/emersion/go-imap-idle/archive/2af9377/go-imap-idle-2af93776db6b042cc1116b0d0af00d7f58eea696.tar.gz \ + https://github.com/emersion/go-sasl/archive/7bfe0ed/go-sasl-7bfe0ed36a210245143572d8f52f41485cbf57e1.tar.gz \ + https://github.com/sirupsen/logrus/archive/v1.8.1/logrus-1.8.1.tar.gz \ + https://github.com/stretchr/testify/archive/v1.7.0/testify-1.7.0.tar.gz \ + https://github.com/golang/sys/archive/39ccf1d/sys-39ccf1dd6fa64b525e017b629b9a83409d294c7e.tar.gz \ + https://github.com/golang/text/archive/v0.3.2/text-0.3.2.tar.gz \ + https://github.com/go-yaml/yaml/archive/496545a/yaml-496545a6307b2a7d7a710fd516e5e16e8ab62dbc.tar.gz" +MD5SUM="a036ab0a34b0b3215ee304c79c24eb96 \ + 61a83dd25e83c4bd81369353200b83d6 \ + a17401f5e2c4ef0678b70bbc42e97b2e \ + 4f12c474fd396d64b3b37f5977a4da2b \ + 8fdbcd94e87390b3cbaeacd054196c05 \ + 5d04ceccdea0a91310fee95b63d8e1f6 \ + d26dd3d3fa7247d88a89d7268bb876c5 \ + 5c3d2e3c8af2436fea967042a9623ba1 \ + 11c0a4ee0531d35936af883fa7d0089a" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="google-go-lang" +MAINTAINER="Alexander Verbovetsky" +EMAIL="alik@ejik.org" diff --git a/network/goimapnotify/modules.txt b/network/goimapnotify/modules.txt new file mode 100644 index 0000000000..9c3d13f082 --- /dev/null +++ b/network/goimapnotify/modules.txt @@ -0,0 +1,32 @@ +# github.com/emersion/go-imap v1.0.0-beta.4.0.20190414203716-b7db4a2bc5cc +## explicit +github.com/emersion/go-imap +github.com/emersion/go-imap/backend +github.com/emersion/go-imap/client +github.com/emersion/go-imap/commands +github.com/emersion/go-imap/responses +github.com/emersion/go-imap/server +github.com/emersion/go-imap/utf7 +# github.com/emersion/go-imap-idle v0.0.0-20180114101550-2af93776db6b +## explicit +github.com/emersion/go-imap-idle +# github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21 +## explicit +github.com/emersion/go-sasl +# github.com/sirupsen/logrus v1.8.1 +## explicit +github.com/sirupsen/logrus +# github.com/stretchr/testify v1.7.0 +## explicit +# golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 +## explicit +golang.org/x/sys/internal/unsafeheader +golang.org/x/sys/unix +golang.org/x/sys/windows +# golang.org/x/text v0.3.2 +## explicit +golang.org/x/text/encoding +golang.org/x/text/encoding/internal/identifier +golang.org/x/text/transform +# gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b +## explicit diff --git a/network/goimapnotify/slack-desc b/network/goimapnotify/slack-desc new file mode 100644 index 0000000000..99f801ff77 --- /dev/null +++ b/network/goimapnotify/slack-desc @@ -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------------------------------------------------------| +goimapnotify: goimapnotify (IMAP IDLE notifications) +goimapnotify: +goimapnotify: +goimapnotify: Execute scripts on IMAP mailbox changes (new/deleted/updated +goimapnotify: messages) using IDLE, Golang version. +goimapnotify: +goimapnotify: +goimapnotify: +goimapnotify: Homepage: https://gitlab.com/shackra/goimapnotify +goimapnotify: +goimapnotify: |