aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDejan Strbac <me@dejanstrbac.com>2019-06-09 04:59:27 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-06-09 05:32:07 +0700
commit693231e406ce8af16a613ecdc864027d0d671f82 (patch)
tree7bfe9d4665a8db7f18b6858df534873aede0ae56
parent8a9a4807b2880d0e52edaf6fece0e2ea02baf770 (diff)
system/tinycdb: Added (Constant Database).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/tinycdb/README16
-rw-r--r--system/tinycdb/slack-desc19
-rw-r--r--system/tinycdb/tinycdb.SlackBuild78
-rw-r--r--system/tinycdb/tinycdb.info11
4 files changed, 124 insertions, 0 deletions
diff --git a/system/tinycdb/README b/system/tinycdb/README
new file mode 100644
index 000000000000..3c3724c74ca4
--- /dev/null
+++ b/system/tinycdb/README
@@ -0,0 +1,16 @@
+TinyCDB is a very fast and simple package for creating and reading constant
+data bases, a data structure introduced by Dan J. Bernstein in his cdb
+package. It may be used to speed up searches in a sequence of (key,value)
+pairs with very big number of records. Example usage is indexing a big list
+of users - where a search will require linear reading of a large /etc/passwd
+file, and for many other tasks. It's usage/API is similar to ones found in
+BerkeleyDB, gdbm and traditional *nix dbm/ndbm libraries, and is compatible
+in great extent to cdb-0.75 package by Dan Bernstein.
+
+CDB is a constant database, that is, it cannot be updated at a runtime, only
+rebuilt. Rebuilding is atomic operation and is very fast - much faster than of
+many other similar packages. Once created, CDB may be queried, and a query
+takes very little time to complete.
+
+The SlackBuild will install both the binary cdb as well the system library for
+use in other applications such as Postfix.
diff --git a/system/tinycdb/slack-desc b/system/tinycdb/slack-desc
new file mode 100644
index 000000000000..16149d7a8baf
--- /dev/null
+++ b/system/tinycdb/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+tinycdb: tinycdb (Constant Database)
+tinycdb:
+tinycdb: TinyCDB is a very fast and simple package for creating and reading
+tinycdb: constant data bases, a data structure introduced by Dan J. Bernstein
+tinycdb: in his cdb package. It may be used to speed up searches in a
+tinycdb: sequence of (key,value) pairs with very big number of records.
+tinycdb: between remote client and local (inetd-startable) or remote servers.
+tinycdb:
+tinycdb:
+tinycdb:
+tinycdb:
diff --git a/system/tinycdb/tinycdb.SlackBuild b/system/tinycdb/tinycdb.SlackBuild
new file mode 100644
index 000000000000..621a9add4fa4
--- /dev/null
+++ b/system/tinycdb/tinycdb.SlackBuild
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# Slackware build script for tinycdb
+
+# Maintainer: Dejan Strbac <me at dejanstrbac dot com>
+
+# This script is released in the public domain.
+# I am not responsible for any consequences that follow from the
+# incorrect use of this script.
+
+PRGNAM=tinycdb
+VERSION=${VERSION:-0.78}
+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 {} \;
+
+make
+make install prefix=$PKG mandir=$PKG/usr/man libdir=$PKG/usr/lib$LIBDIRSUFFIX bindir=$PKG/usr/bin
+
+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
+
+# Create the directory for program documentation.
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+cp -a ChangeLog* NEWS $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/system/tinycdb/tinycdb.info b/system/tinycdb/tinycdb.info
new file mode 100644
index 000000000000..5c24c40b4454
--- /dev/null
+++ b/system/tinycdb/tinycdb.info
@@ -0,0 +1,11 @@
+PRGNAM="tinycdb"
+VERSION="0.78"
+HOMEPAGE="http://www.corpit.ru/mjt/tinycdb.html"
+DOWNLOAD="http://www.corpit.ru/mjt/tinycdb/tinycdb-0.78.tar.gz"
+MD5SUM="976266afc3f6e7e17492a8d18f21f8f6"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Dejan Strbac"
+EMAIL="me@dejanstrbac.com"
+