summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorSean MacLennan <seanm@seanm.ca>2019-01-20 08:09:30 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-01-20 13:21:40 +0700
commit92a0d1f01a0949e54d711530f400c9ae7b8f0e96 (patch)
tree7ce1325b8c19613b0931b245d1799ece0c45d0e0 /libraries
parent813644392ec1b4ffd4e7c71c7a78984938eada20 (diff)
downloadslackbuilds-92a0d1f01a0949e54d711530f400c9ae7b8f0e96.tar.gz
libraries/skalibs: Added (general purpose C libraries).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/skalibs/README12
-rw-r--r--libraries/skalibs/skalibs.SlackBuild95
-rw-r--r--libraries/skalibs/skalibs.info10
-rw-r--r--libraries/skalibs/slack-desc19
-rw-r--r--libraries/skalibs/sysdeps.cfg/sysdeps1
-rw-r--r--libraries/skalibs/sysdeps.cfg/sysdeps.h6
-rw-r--r--libraries/skalibs/sysdeps.cfg/target1
-rw-r--r--libraries/skalibs/sysdeps.cfg/util.lib1
8 files changed, 145 insertions, 0 deletions
diff --git a/libraries/skalibs/README b/libraries/skalibs/README
new file mode 100644
index 0000000000..4a5597a7b3
--- /dev/null
+++ b/libraries/skalibs/README
@@ -0,0 +1,12 @@
+skalibs is a package centralizing the free software / open source C
+development files used for building all software at skarnet.org: it
+contains essentially general-purpose libraries. You will need to
+install skalibs if you plan to build skarnet.org software. The point
+is that you won't have to download and compile big libraries, and care
+about portability issues, everytime you need to build a package: do it
+only once.
+
+skalibs can also be used as a sound basic start for C
+development. There are a lot of general-purpose libraries out there;
+but if your main goal is to produce small and secure C code with a
+focus on system programming, skalibs might be for you.
diff --git a/libraries/skalibs/skalibs.SlackBuild b/libraries/skalibs/skalibs.SlackBuild
new file mode 100644
index 0000000000..e68bf0ce25
--- /dev/null
+++ b/libraries/skalibs/skalibs.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Slackware build script for skalibs
+
+# Copyright 2019 Sean MacLennan Ottawa, Canada
+# 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.
+
+PRGNAM=skalibs
+VERSION=${VERSION:-2.7.0.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+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 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 {} \;
+
+# Static library is needed here
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --dynlibdir=/usr/lib${LIBDIRSUFFIX} \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+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 AUTHORS COPYING INSTALL NEWS README doc $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:-tgz}
diff --git a/libraries/skalibs/skalibs.info b/libraries/skalibs/skalibs.info
new file mode 100644
index 0000000000..2f7e11e546
--- /dev/null
+++ b/libraries/skalibs/skalibs.info
@@ -0,0 +1,10 @@
+PRGNAM="skalibs"
+VERSION="2.7.0.0"
+HOMEPAGE="https://skarnet.org/software/skalibs/"
+DOWNLOAD="https://skarnet.org/software/skalibs/skalibs-2.7.0.0.tar.gz"
+MD5SUM="de26435512337650f6e1bcce3643710d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Sean MacLennan"
+EMAIL="seanm@seanm.ca"
diff --git a/libraries/skalibs/slack-desc b/libraries/skalibs/slack-desc
new file mode 100644
index 0000000000..62a5868bd6
--- /dev/null
+++ b/libraries/skalibs/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------------------------------------------------------|
+skalibs: skalibs (general purpose C libraries)
+skalibs:
+skalibs: skalibs is a package centralizing the free software / open source C
+skalibs: development files used for building all software at skarnet.org: it
+skalibs: contains essentially general-purpose libraries. The point is that
+skalibs: you won't have to download and compile big libraries, and care
+skalibs: about portability issues, everytime you need to build a package: do
+skalibs: it only once.
+skalibs:
+skalibs: https://skarnet.org/software/skalibs/
+skalibs:
diff --git a/libraries/skalibs/sysdeps.cfg/sysdeps b/libraries/skalibs/sysdeps.cfg/sysdeps
new file mode 100644
index 0000000000..8829fd46ab
--- /dev/null
+++ b/libraries/skalibs/sysdeps.cfg/sysdeps
@@ -0,0 +1 @@
+target: x86_64-slackware-linux
diff --git a/libraries/skalibs/sysdeps.cfg/sysdeps.h b/libraries/skalibs/sysdeps.cfg/sysdeps.h
new file mode 100644
index 0000000000..09dd53d4b8
--- /dev/null
+++ b/libraries/skalibs/sysdeps.cfg/sysdeps.h
@@ -0,0 +1,6 @@
+/* ISC license. */
+
+#ifndef SYSDEPS_H
+#define SYSDEPS_H
+
+#define SKALIBS_TARGET "x86_64-slackware-linux"
diff --git a/libraries/skalibs/sysdeps.cfg/target b/libraries/skalibs/sysdeps.cfg/target
new file mode 100644
index 0000000000..210a166722
--- /dev/null
+++ b/libraries/skalibs/sysdeps.cfg/target
@@ -0,0 +1 @@
+x86_64-slackware-linux
diff --git a/libraries/skalibs/sysdeps.cfg/util.lib b/libraries/skalibs/sysdeps.cfg/util.lib
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/libraries/skalibs/sysdeps.cfg/util.lib
@@ -0,0 +1 @@
+