aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorYossi Neiman <mishehu+sbo@shavedgoats.net>2023-09-23 09:19:59 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-09-23 09:19:59 +0700
commit7b67d0783c1b898b8ab4e138bf0ff74066cb39d6 (patch)
tree49b6c03c076cd4c704598a0c1ed7b784f85d3cc4 /libraries
parentdac7d45703676f9cc90980c850e957c81032d1f1 (diff)
libraries/libks: Added (cross platform kitchen sink library).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/libks/README3
-rw-r--r--libraries/libks/libks.SlackBuild103
-rw-r--r--libraries/libks/libks.info10
-rw-r--r--libraries/libks/slack-desc19
4 files changed, 135 insertions, 0 deletions
diff --git a/libraries/libks/README b/libraries/libks/README
new file mode 100644
index 000000000000..8f034e84a53b
--- /dev/null
+++ b/libraries/libks/README
@@ -0,0 +1,3 @@
+libks (a cross platform kitchen sink library)
+
+libks is required for FreeSWITCH, to enable the mod_verto module.
diff --git a/libraries/libks/libks.SlackBuild b/libraries/libks/libks.SlackBuild
new file mode 100644
index 000000000000..eebe0541c850
--- /dev/null
+++ b/libraries/libks/libks.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+# Slackware build script for libks
+
+# Copyright 2023 Yossi Neiman, mishehu+sbo@shavedgoats.net
+# 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=libks
+PRGPATHNAME=libks2
+VERSION=${VERSION:-2.0.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
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+sed -i '/install(/s,\<lib\>,'lib$LIBDIRSUFFIX',' CMakeLists.txt
+sed -i "/^libdir=/s,/lib,/lib$LIBDIRSUFFIX," libks.pc.in
+
+mkdir -p build
+cp copyright build/
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONFDIR=/etc \
+ -DCMAKE_BUILD_TYPE=release ..
+
+make
+make install/strip DESTDIR=$PKG
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc
+mv $PKG/usr/share/doc/$PRGPATHNAME $PKGDOC
+rm -rf $PKG/usr/share
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/libraries/libks/libks.info b/libraries/libks/libks.info
new file mode 100644
index 000000000000..fc6f7cb649a0
--- /dev/null
+++ b/libraries/libks/libks.info
@@ -0,0 +1,10 @@
+PRGNAM="libks"
+VERSION="2.0.2"
+HOMEPAGE="http://www.freeswitch.org"
+DOWNLOAD="https://github.com/signalwire/libks/archive/v2.0.2/libks-2.0.2.tar.gz"
+MD5SUM="e6e7596add90b72a4fb60bdd7e936a21"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Yossi Neiman"
+EMAIL="mishehu+sbo@shavedgoats.net"
diff --git a/libraries/libks/slack-desc b/libraries/libks/slack-desc
new file mode 100644
index 000000000000..557cad20888a
--- /dev/null
+++ b/libraries/libks/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------------------------------------------------------|
+libks: libks (a cross platform kitchen sink library)
+libks:
+libks: libks is required for freeswitch, to enable the mod_verto module.
+libks:
+libks:
+libks:
+libks:
+libks:
+libks:
+libks:
+libks: