aboutsummaryrefslogtreecommitdiff
path: root/business
diff options
context:
space:
mode:
authorLockywolf <for_sbo.exercism_2025-02-12@lockywolf.net>2025-02-12 23:20:32 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2025-02-15 08:30:16 +0700
commitacfdfc02cd5537af837ed6a35d7b9f4e9948cd49 (patch)
treec7d73157922aa8094497ce563991cb930dbd9b2e /business
parentfe27a758612d184937164b7890591c69d20fee6c (diff)
business/exercism_repack: Added (Solving exercises).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'business')
-rw-r--r--business/exercism_repack/README79
-rw-r--r--business/exercism_repack/exercism_repack.SlackBuild120
-rw-r--r--business/exercism_repack/exercism_repack.info10
-rw-r--r--business/exercism_repack/slack-desc19
4 files changed, 228 insertions, 0 deletions
diff --git a/business/exercism_repack/README b/business/exercism_repack/README
new file mode 100644
index 0000000000..bffe880172
--- /dev/null
+++ b/business/exercism_repack/README
@@ -0,0 +1,79 @@
+Exercism clie is a cli tool to solve exercises on exercism.
+
+Solving exercises on your local machine allows you to do all the
+coding in an environment you're familiar with.
+
+Installing the CLI
+
+To solve an Exercise on your local machine, you first need to install
+and configure the Exercism Command Line Interface using these
+instructions.
+
+Configuration
+
+You need to tell the CLI who you are so we can download things
+correctly. You can find your token in your settings page. You can then
+configure the CLI using the following, replacing <your-api-token> for
+the value on the settings page:
+
+exercism configure --token=<your-api-token>
+
+Downloading the Exercise
+
+Once installed, you can use the CLI to download the exercise to your
+local machine using the following command (replacing <exercise-slug>
+and <track-slug> with the relevant values:
+
+exercism download --exercise=<exercise-slug> --track=<track-slug>
+
+You don't have to remember this command structure, as the exercise
+page lists the appropriate command for that exercise.
+
+Once the download command has finished, the exercise's files will be
+downloaded to your local machine.
+
+Solving the Exercise
+
+The goal of each exercise is to create an implementation that passes
+all the tests. Such an implementation is known as a solution.
+
+To help you with that, each exercise contains the following files:
+
+README.md: the instructions that explain what is expected of you
+
+HELP.md: information on how to run the tests and how to get help when
+you're stuck
+
+HINTS.md (optional): hints to help solve the exercise
+
+Test file(s): they contain the tests that verify your solution's
+correctness
+
+Stub file(s): they provide a starting point to help you get started
+with building your implementation
+
+Depending on the track, there might be other files that the track
+tooling requires for the tests to run.
+
+Submitting your Solution
+
+Once your solution passes all the tests, you can submit your solution
+using the following command:
+
+exercism submit <implementation_file_paths>
+
+This command will upload your solution to the Exercism website and
+print the solution page's URL.
+
+Once again, you don't have to remember this command, as the exercise's
+HELP.md file will list the correct command.
+
+It's possible to submit an incomplete solution which allows you to:
+
+See how others have completed the exercise
+Request help from a mentor
+Other CLI functionality
+Seeing all the commands
+Run the help subcommand to get the full list of available commands.
+
+exercism help
diff --git a/business/exercism_repack/exercism_repack.SlackBuild b/business/exercism_repack/exercism_repack.SlackBuild
new file mode 100644
index 0000000000..0cffeb63de
--- /dev/null
+++ b/business/exercism_repack/exercism_repack.SlackBuild
@@ -0,0 +1,120 @@
+#!/bin/bash
+
+# Slackware build script for exercism_repack
+
+# Copyright 2025, Lockywolf
+# 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=exercism_repack
+VERSION=${VERSION:-3.5.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+TARNAM=exercism
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+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=""
+ TARARCH=i386
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ TARARCH=i386
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ TARARCH=x86_64
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ TARARCH=arm64
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ printf "Build not supported on ARCH=%s\n" "$ARCH" 1>&2
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+
+tar xvf $CWD/$TARNAM-$VERSION-linux-$TARARCH.tar.gz
+
+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 {} +
+
+
+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/bin/
+cp exercism $PKG/usr/bin/
+mkdir -p $PKG/usr/share/bash-completion/completions/
+cp shell/exercism_completion.bash $PKG/usr/share/bash-completion/completions/
+mkdir -p $PKG/usr/share/zsh/site-functions/
+cp shell/exercism_completion.zsh $PKG/usr/share/zsh/site-functions/_exercism
+
+
+
+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/business/exercism_repack/exercism_repack.info b/business/exercism_repack/exercism_repack.info
new file mode 100644
index 0000000000..fa3dc1c839
--- /dev/null
+++ b/business/exercism_repack/exercism_repack.info
@@ -0,0 +1,10 @@
+PRGNAM="exercism_repack"
+VERSION="3.5.4"
+HOMEPAGE="https://exercism.org/docs/using/solving-exercises/working-locally"
+DOWNLOAD="https://github.com/exercism/cli/releases/download/v3.5.4/exercism-3.5.4-linux-i386.tar.gz"
+MD5SUM="8299f6836d06b0ee7275c3f8e47ead00"
+DOWNLOAD_x86_64="https://github.com/exercism/cli/releases/download/v3.5.4/exercism-3.5.4-linux-x86_64.tar.gz"
+MD5SUM_x86_64="d9975676210e90e6f4ce328bb26f882c"
+REQUIRES=""
+MAINTAINER="Lockywolf"
+EMAIL="for_sbo.exercism_2025-02-12@lockywolf.net"
diff --git a/business/exercism_repack/slack-desc b/business/exercism_repack/slack-desc
new file mode 100644
index 0000000000..2cc25d8126
--- /dev/null
+++ b/business/exercism_repack/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------------------------------------------------------|
+exercism_repack: exercism_repack (cli for exercism.org written in Go)
+exercism_repack:
+exercism_repack: This is a binary repack.
+exercism_repack:
+exercism_repack: exercism cli lets you solve exercism exercises while working
+exercism_repack: locally. You need an API token.
+exercism_repack:
+exercism_repack:
+exercism_repack:
+exercism_repack:
+exercism_repack: