aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorAndy Alt <arch_stanton5995@proton.me>2024-02-22 21:37:56 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-02-24 15:34:47 +0700
commit7fa2620f4d2d99714a5cb7211a66725d938674b8 (patch)
tree86dcbb7a3829edd381d2cbecda77fe377de1b620 /libraries
parent303dc40b71c07239d6ac8484d61e61998d8adaea (diff)
libraries/canfigger: Added (file parser library).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/canfigger/README11
-rw-r--r--libraries/canfigger/canfigger.SlackBuild99
-rw-r--r--libraries/canfigger/canfigger.info10
-rw-r--r--libraries/canfigger/slack-desc19
4 files changed, 139 insertions, 0 deletions
diff --git a/libraries/canfigger/README b/libraries/canfigger/README
new file mode 100644
index 000000000000..d1315c49fb44
--- /dev/null
+++ b/libraries/canfigger/README
@@ -0,0 +1,11 @@
+# canfigger
+
+Simple configuration file parser library
+
+website: https://github.com/andy5995/canfigger
+
+This library contains a function that parses simple configuration
+files that use a key/value pair with optional attributes.
+
+See README.md on the GitHub repo for more info about the API and
+examples.
diff --git a/libraries/canfigger/canfigger.SlackBuild b/libraries/canfigger/canfigger.SlackBuild
new file mode 100644
index 000000000000..d503979bd8b1
--- /dev/null
+++ b/libraries/canfigger/canfigger.SlackBuild
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+# Slackware build script for canfigger
+
+# Copyright 2024 Andy Alt / United States
+# All rights reserved.
+
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+
+# 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=canfigger
+VERSION=${VERSION:-0.2.0}
+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 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}
+
+LIBDIRSUFFIX=""
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$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 {} \;
+
+mkdir build
+cd build
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+meson .. \
+ --buildtype=release \
+ --strip \
+ --libdir="/usr/lib$LIBDIRSUFFIX" \
+ --prefix=/usr \
+ -Ddocdir=/usr/doc/$PRGNAM-$VERSION \
+ -Ddefault_library=both
+
+ninja -v
+DESTDIR=$PKG ninja install
+cd ..
+
+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/libraries/canfigger/canfigger.info b/libraries/canfigger/canfigger.info
new file mode 100644
index 000000000000..f62f22a8ac2e
--- /dev/null
+++ b/libraries/canfigger/canfigger.info
@@ -0,0 +1,10 @@
+PRGNAM="canfigger"
+VERSION="0.2.0"
+HOMEPAGE="https://github.com/andy5995/canfigger/"
+DOWNLOAD="https://github.com/andy5995/canfigger/releases/download/v0.2.0/canfigger-0.2.0.tar.xz"
+MD5SUM="8550259d3b26b36fcb519ce297aaaccf"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="geany"
+MAINTAINER="Andy Alt"
+EMAIL="arch_stanton5995@proton.me"
diff --git a/libraries/canfigger/slack-desc b/libraries/canfigger/slack-desc
new file mode 100644
index 000000000000..710f7e24d0b3
--- /dev/null
+++ b/libraries/canfigger/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------------------------------------------------------|
+canfigger: canfigger (Config File Parser)
+canfigger:
+canfigger: canfigger is a library that contains a function that parses simple
+canfigger: configuration files which consist of a key/value pair with optional
+canfigger: attributes.
+canfigger:
+canfigger:
+canfigger:
+canfigger:
+canfigger: Homepage: https://github.com/andy5995/canfigger/
+canfigger: