mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-26 22:06:35 +01:00
network/wego: Added (openweathermap app).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
bf405bb507
commit
ed73f48e0a
5 changed files with 169 additions and 0 deletions
4
network/wego/README
Normal file
4
network/wego/README
Normal file
|
@ -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.
|
18
network/wego/modules.txt
Normal file
18
network/wego/modules.txt
Normal file
|
@ -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
|
19
network/wego/slack-desc
Normal file
19
network/wego/slack-desc
Normal 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------------------------------------------------------|
|
||||
wego: wego (Go weather app)
|
||||
wego:
|
||||
wego: wego is a weather app for the terminal.
|
||||
wego:
|
||||
wego:
|
||||
wego:
|
||||
wego:
|
||||
wego:
|
||||
wego:
|
||||
wego:
|
||||
wego:
|
106
network/wego/wego.SlackBuild
Normal file
106
network/wego/wego.SlackBuild
Normal file
|
@ -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
|
22
network/wego/wego.info
Normal file
22
network/wego/wego.info
Normal file
|
@ -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"
|
Loading…
Reference in a new issue