diff options
author | Isaac Yu <isaacyu@protonmail.com> | 2024-02-07 06:36:07 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-02-10 16:09:45 +0700 |
commit | ed73f48e0a4f484a44682fe2de6da68ff80f9f50 (patch) | |
tree | bb59fcc63ea7d462ea0c8ef5f914252637ade07b | |
parent | bf405bb507db1d47a359250d05e398cd03f7d0a2 (diff) |
network/wego: Added (openweathermap app).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | network/wego/README | 4 | ||||
-rw-r--r-- | network/wego/modules.txt | 18 | ||||
-rw-r--r-- | network/wego/slack-desc | 19 | ||||
-rw-r--r-- | network/wego/wego.SlackBuild | 106 | ||||
-rw-r--r-- | network/wego/wego.info | 22 |
5 files changed, 169 insertions, 0 deletions
diff --git a/network/wego/README b/network/wego/README new file mode 100644 index 0000000000000..80aa78d7db177 --- /dev/null +++ b/network/wego/README @@ -0,0 +1,4 @@ +wego is a weather app for the terminal. + +Usage requires registering for an API (ex. OpenWeatherMap). +See the github page for more details. diff --git a/network/wego/modules.txt b/network/wego/modules.txt new file mode 100644 index 0000000000000..4d9a71a0fcb2d --- /dev/null +++ b/network/wego/modules.txt @@ -0,0 +1,18 @@ +# github.com/mattn/go-colorable v0.1.13 +## explicit +github.com/mattn/go-colorable +# github.com/mattn/go-runewidth v0.0.14 +## explicit +github.com/mattn/go-runewidth +# github.com/schachmat/ingo v0.0.0-20170403011506-a4bdc0729a3f +## explicit +github.com/schachmat/ingo +# github.com/mattn/go-isatty v0.0.19 +## explicit +github.com/mattn/go-isatty +# github.com/rivo/uniseg v0.4.4 +## explicit; go 1.18 +github.com/rivo/uniseg +# golang.org/x/sys v0.8.0 +## explicit; go 1.17 +golang.org/x/sys/unix diff --git a/network/wego/slack-desc b/network/wego/slack-desc new file mode 100644 index 0000000000000..aaf253caeb67c --- /dev/null +++ b/network/wego/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------------------------------------------------------| +wego: wego (Go weather app) +wego: +wego: wego is a weather app for the terminal. +wego: +wego: +wego: +wego: +wego: +wego: +wego: +wego: diff --git a/network/wego/wego.SlackBuild b/network/wego/wego.SlackBuild new file mode 100644 index 0000000000000..daf93fb7b0fdd --- /dev/null +++ b/network/wego/wego.SlackBuild @@ -0,0 +1,106 @@ +#!/bin/bash + +# Slackware build script for wego + +# Copyright 2024 Isaac Yu <isaacyu@protonmail.com> +# 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=wego +VERSION=${VERSION:-2.2} +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=$(echo $DIR | sed 's/[./]v[0-9]\+$//' | xargs basename) + 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 {} \; + +CGO_CFLAGS="$SLKCFLAGS" \ +CGO_CXXFLAGS="$SLKCFLAGS" \ +go build -mod vendor + +install -Dm755 wego $PKG/usr/bin/wego +strip --strip-unneeded $PKG/usr/bin/wego + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE 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/wego/wego.info b/network/wego/wego.info new file mode 100644 index 0000000000000..6469f342fdc0a --- /dev/null +++ b/network/wego/wego.info @@ -0,0 +1,22 @@ +PRGNAM="wego" +VERSION="2.2" +HOMEPAGE="https://github.com/schachmat/wego" +DOWNLOAD="https://github.com/schachmat/wego/archive/2.2/wego-2.2.tar.gz \ + https://github.com/mattn/go-colorable/archive/v0.1.13/go-colorable-0.1.13.tar.gz \ + https://github.com/mattn/go-runewidth/archive/v0.0.14/go-runewidth-0.0.14.tar.gz \ + https://github.com/schachmat/ingo/archive/a4bdc07/ingo-a4bdc0729a3fda62cc4069b6e490fc657fd54e33.tar.gz \ + https://github.com/mattn/go-isatty/archive/v0.0.19/go-isatty-0.0.19.tar.gz \ + https://github.com/rivo/uniseg/archive/v0.4.4/uniseg-0.4.4.tar.gz \ + https://github.com/golang/sys/archive/v0.8.0/sys-0.8.0.tar.gz" +MD5SUM="c62b99d7bfc2901dedf571de859799c3 \ + ac74020d881d4966e33ab6580f509aeb \ + c41abbf9dc5def08ef8e6999efbe2c8c \ + 6077da012ebc665f84b9baf79b56c0b6 \ + e10ea58c2288fbef0d8ea37dea93718a \ + 4e272ceb8899ee895e425f16347d10a6 \ + 4bd786fbbcf550e794db58cc7ece443c" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="google-go-lang" +MAINTAINER="Isaac Yu" +EMAIL="isaacyu@protonmail.com" |