aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/kubectx/README8
-rw-r--r--system/kubectx/kubectx.SlackBuild76
-rw-r--r--system/kubectx/kubectx.info12
-rw-r--r--system/kubectx/slack-desc19
4 files changed, 115 insertions, 0 deletions
diff --git a/system/kubectx/README b/system/kubectx/README
new file mode 100644
index 0000000000..994b2de63e
--- /dev/null
+++ b/system/kubectx/README
@@ -0,0 +1,8 @@
+kubectx + kubens: Power tools for kubectl
+
+kubectx is a tool to switch between contexts (clusters) on kubectl
+kubens is a tool to switch between Kubernetes namespaces easily
+
+kubectl is runtime dependency
+
+This script package the binaries provided upstream
diff --git a/system/kubectx/kubectx.SlackBuild b/system/kubectx/kubectx.SlackBuild
new file mode 100644
index 0000000000..7ada014e0a
--- /dev/null
+++ b/system/kubectx/kubectx.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+# Slackware build script for kubectx
+
+# Copyright 2025 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# 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=kubectx
+PRGNAM2=kubens
+VERSION=${VERSION:-0.9.5}
+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 $PRGNAM-$VERSION
+mkdir -p $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/${PRGNAM}_v${VERSION}_linux_x86_64.tar.gz
+tar xvf $CWD/${PRGNAM2}_v${VERSION}_linux_x86_64.tar.gz
+chown -R root:root .
+
+strip $PRGNAM $PRGNAM2
+mkdir -p $PKG/usr/bin
+mv $PRGNAM $PRGNAM2 $PKG/usr/bin
+chmod 755 $PKG/usr/bin/*
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE $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/system/kubectx/kubectx.info b/system/kubectx/kubectx.info
new file mode 100644
index 0000000000..0a9b360620
--- /dev/null
+++ b/system/kubectx/kubectx.info
@@ -0,0 +1,12 @@
+PRGNAM="kubectx"
+VERSION="0.9.5"
+HOMEPAGE="https://github.com/ahmetb/kubectx"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubectx_v0.9.5_linux_x86_64.tar.gz \
+ https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubens_v0.9.5_linux_x86_64.tar.gz"
+MD5SUM_x86_64="3c128084d3024301b500a3f20a1d94da \
+ 5f070e3c3c0fbce7b92509cad7196d0a"
+REQUIRES=""
+MAINTAINER="Willy Sudiarto Raharjo"
+EMAIL="willysr@slackbuilds.org"
diff --git a/system/kubectx/slack-desc b/system/kubectx/slack-desc
new file mode 100644
index 0000000000..61830c1a7b
--- /dev/null
+++ b/system/kubectx/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------------------------------------------------------|
+kubectx: kubectx (power tools for kubectl)
+kubectx:
+kubectx: kubectx + kubens: Power tools for kubectl
+kubectx:
+kubectx: kubectx is a tool to switch between contexts (clusters) on kubectl
+kubectx: kubens is a tool to switch between Kubernetes namespaces easily
+kubectx:
+kubectx:
+kubectx: Project URL: https://github.com/ahmetb/kubectx
+kubectx:
+kubectx: