summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorGrigorios Bouzakis <grbzks@gmail.com>2010-05-11 22:55:32 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:55:32 +0200
commitf2b35398db49d7dd77a3b4fe6c945d9b2ee0d4ee (patch)
treee6a5df35feadb05d2be270ab9bbdb49cd4e86791 /system
parent37295d878233c06ac1bafe47fdaee00aa7d2c3fe (diff)
downloadslackbuilds-f2b35398db49d7dd77a3b4fe6c945d9b2ee0d4ee.tar.gz
system/tdb: Added to 12.1 repository
Diffstat (limited to 'system')
-rw-r--r--system/tdb/README4
-rw-r--r--system/tdb/gcc.patch41
-rw-r--r--system/tdb/slack-desc19
-rw-r--r--system/tdb/tdb.SlackBuild76
-rw-r--r--system/tdb/tdb.info8
5 files changed, 148 insertions, 0 deletions
diff --git a/system/tdb/README b/system/tdb/README
new file mode 100644
index 0000000000..3a05ab425b
--- /dev/null
+++ b/system/tdb/README
@@ -0,0 +1,4 @@
+TDB is a Trivial Database. In concept, it is very much like GDBM,
+and BSD's DB except that it allows multiple simultaneous writers
+and uses locking internally to keep writers from trampling on each
+other. TDB is also extremely small.
diff --git a/system/tdb/gcc.patch b/system/tdb/gcc.patch
new file mode 100644
index 0000000000..c88c2e7f91
--- /dev/null
+++ b/system/tdb/gcc.patch
@@ -0,0 +1,41 @@
+--- tdb-1.0.6/tdbtool.c 2001-12-10 22:45:47.000000000 -0500
++++ ./tdbtool.c 2003-12-31 19:44:50.000000000 -0500
+@@ -169,22 +169,22 @@
+
+ static void help(void)
+ {
+- printf("
+-tdbtool:
+- create dbname : create a database
+- open dbname : open an existing database
+- erase : erase the database
+- dump dumpname : dump the database as strings
+- insert key data : insert a record
+- store key data : store a record (replace)
+- show key : show a record by key
+- delete key : delete a record by key
+- list : print the database hash table and freelist
+- free : print the database freelist
+- 1 | first : print the first record
+- n | next : print the next record
+- q | quit : terminate
+- \\n : repeat 'next' command
++ printf("\
++tdbtool: \
++ create dbname : create a database\
++ open dbname : open an existing database\
++ erase : erase the database\
++ dump dumpname : dump the database as strings\
++ insert key data : insert a record\
++ store key data : store a record (replace)\
++ show key : show a record by key\
++ delete key : delete a record by key\
++ list : print the database hash table and freelist\
++ free : print the database freelist\
++ 1 | first : print the first record\
++ n | next : print the next record\
++ q | quit : terminate\
++ \\n : repeat 'next' command\
+ ");
+ }
+
diff --git a/system/tdb/slack-desc b/system/tdb/slack-desc
new file mode 100644
index 0000000000..8feb84de28
--- /dev/null
+++ b/system/tdb/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------------------------------------------------------|
+tdb: tdb (Trivial Database)
+tdb:
+tdb: tdb is a Trivial Database. In concept, it is very much like GDBM,
+tdb: and BSD's DB except that it allows multiple simultaneous writers and
+tdb: uses locking internally to keep writers from trampling on each other.
+tdb: TDB is also extremely small.
+tdb:
+tdb: Homepage: http://sourceforge.net/projects/tdb
+tdb:
+tdb:
+tdb:
diff --git a/system/tdb/tdb.SlackBuild b/system/tdb/tdb.SlackBuild
new file mode 100644
index 0000000000..dd2dd47284
--- /dev/null
+++ b/system/tdb/tdb.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Slackware build script for tdb
+
+# Written by Grigorios Bouzakis (grbzks@gmail.com)
+
+PRGNAM=tdb
+VERSION=${VERSION:-1.0.6}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO"
+
+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 . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# apply patch for tdbtool.c and GCC 3.3
+# http://sourceforge.net/tracker/index.php?func=detail&aid=772616&group_id=9569&atid=309569
+patch -p1 < $CWD/gcc.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $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.tgz
diff --git a/system/tdb/tdb.info b/system/tdb/tdb.info
new file mode 100644
index 0000000000..60a4e5a6e8
--- /dev/null
+++ b/system/tdb/tdb.info
@@ -0,0 +1,8 @@
+PRGNAM="tdb"
+VERSION="1.0.6"
+HOMEPAGE="http://sourceforge.net/projects/tdb/"
+DOWNLOAD="http://downloads.sourceforge.net/tdb/tdb-1.0.6.tar.gz"
+MD5SUM="6b643fdeb48304010dcd5f675e458b58"
+MAINTAINER="Grigorios Bouzakis"
+EMAIL="grbzks@gmail.com"
+APPROVED="David Somero"