aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorAndrew Clemons <andrew.clemons@gmail.com>2024-11-04 16:49:13 +0900
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-11-05 00:13:00 +0700
commit0f966abe1fc739cd3f2f5b94d739a6084b4fc13b (patch)
tree4abd3cf53bedc7ea05d2ce10970e824a46142e92 /development
parenta2c00b6af2b01146667c0e65e0124cc23e1daef5 (diff)
development/gopls: Added (go language server).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/gopls/README7
-rw-r--r--development/gopls/gopls.SlackBuild82
-rw-r--r--development/gopls/gopls.info10
-rw-r--r--development/gopls/slack-desc19
4 files changed, 118 insertions, 0 deletions
diff --git a/development/gopls/README b/development/gopls/README
new file mode 100644
index 000000000000..e3cd4c25282f
--- /dev/null
+++ b/development/gopls/README
@@ -0,0 +1,7 @@
+gopls - the Go language server
+
+NOTE: google-go-lang is only needed at compile time - not at runtime.
+
+Warning: This SlackBuild requires network access when it runs, meaning
+it downloads files from the Internet with root access. You should
+decide for yourself whether or not you think this is a good idea.
diff --git a/development/gopls/gopls.SlackBuild b/development/gopls/gopls.SlackBuild
new file mode 100644
index 000000000000..703adff4cd2d
--- /dev/null
+++ b/development/gopls/gopls.SlackBuild
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+# Slackware build script for gopls
+
+# Copyright 2023-2024 Andrew Clemons, Tokyo Japan
+# 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=gopls
+VERSION=${VERSION:-0.16.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}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf tools-$PRGNAM-v$VERSION
+tar xvf $CWD/tools-$PRGNAM-v$VERSION.tar.gz
+cd tools-$PRGNAM-v$VERSION
+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 {} \;
+
+cd gopls
+go build -ldflags "-X main.version=v$VERSION"
+install -D -m0755 gopls $PKG/usr/bin/gopls
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ 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/development/gopls/gopls.info b/development/gopls/gopls.info
new file mode 100644
index 000000000000..b98c1e1fb425
--- /dev/null
+++ b/development/gopls/gopls.info
@@ -0,0 +1,10 @@
+PRGNAM="gopls"
+VERSION="0.16.2"
+HOMEPAGE="https://github.com/golang/tools/blob/master/gopls"
+DOWNLOAD="https://github.com/golang/tools/archive/gopls/v0.16.2/tools-gopls-v0.16.2.tar.gz"
+MD5SUM="d64d5d23d04be629783a17895524cad3"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="google-go-lang"
+MAINTAINER="Andrew Clemons"
+EMAIL="andrew.clemons@gmail.com"
diff --git a/development/gopls/slack-desc b/development/gopls/slack-desc
new file mode 100644
index 000000000000..573bffda1cb5
--- /dev/null
+++ b/development/gopls/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------------------------------------------------------|
+gopls: gopls (the Go language server)
+gopls:
+gopls: gopls (pronounced "Go please") is the official Go language server
+gopls: developed by the Go team. It provides a wide variety of IDE features
+gopls: to any LSP-compatible editor.
+gopls:
+gopls: https://github.com/golang/tools/tree/master/gopls
+gopls:
+gopls:
+gopls:
+gopls: