development/opendbx: Added (Database Access Library).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Eugene Wissner 2016-07-28 18:25:05 +07:00 committed by Willy Sudiarto Raharjo
parent 023c4f558a
commit e96f0a975b
No known key found for this signature in database
GPG key ID: 887B8374D7333381
7 changed files with 2560 additions and 0 deletions

View file

@ -0,0 +1,6 @@
OpenDBX is an extremely lightweight but extensible database access
library written in C. It provides an abstraction layer to all supported
databases with a single, clean and simple interface that leads to an
elegant code design automatically. If you want your application to
support different databases with little effort, this is definitively
the right thing for you!

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
This way if the test fails, the build will fail.
Need to send upstream.
Index: libopendbx-1.4.6/test/odbxtest.sh
===================================================================
--- libopendbx-1.4.6.orig/test/odbxtest.sh 2012-05-06 08:10:59.000000000 -0400
+++ libopendbx-1.4.6/test/odbxtest.sh 2012-11-19 12:21:05.468414873 -0500
@@ -7,6 +7,7 @@
if ! test -f odbxtest.site
then
echo "No odbxtest.site file found"
+ exit 1
fi
ODBXAPP="./odbxtest ./odbxplustest"
@@ -28,6 +29,7 @@
echo "$1 ERRORS:" >> testresult.err
cat test.err >> testresult.err
diff -b test.out ref/$1.ref >> testresult.err
+ FAILURE="FAILED"
else
echo " $1 OK"
echo " $1 OK" >> testresult.log
@@ -154,5 +156,9 @@
rm -f test.out
rm -f test.err
-
-exit 0
+if [ -n "$FAILURE" ]
+then
+ exit 1
+else
+ exit 0
+fi

View file

@ -0,0 +1,108 @@
#!/bin/sh
# Slackware build script for OpenDBX
# Copyright 2016 Eugene Wissner Dachau, Germany
# 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=opendbx
VERSION=${VERSION:-1.4.6}
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 {} \;
patch -p1 < $CWD/inputname.diff
patch -p1 < $CWD/use_local_dtd.diff
patch -p1 < $CWD/odbxtest_exit_1_on_error.diff
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-static \
--build=$ARCH-slackware-linux
# Fix OpenDBX bug with Doxygen
ln -s api lib/opendbx/api.dox
cd doc
doxygen -u
cd ..
make
make install-strip DESTDIR=$PKG
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ABOUT-NLS INSTALL NEWS COPYING README TODO $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}

View file

@ -0,0 +1,10 @@
PRGNAM="opendbx"
VERSION="1.4.6"
HOMEPAGE="https://www.linuxnetworks.de/doc/index.php/OpenDBX"
DOWNLOAD="http://linuxnetworks.de/opendbx/download/opendbx-1.4.6.tar.gz"
MD5SUM="3e89d7812ce4a28046bd60d5f969263d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libbsd"
MAINTAINER="Eugene Wissner"
EMAIL="belka@caraus.de"

View file

@ -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------------------------------------------------------|
opendbx: opendbx (Database Access Library)
opendbx:
opendbx: OpenDBX is an extremely lightweight but extensible database access
opendbx: library written in C. It provides an abstraction layer to all
opendbx: supported databases with a single, clean and simple interface that
opendbx: leads to an elegant code design automatically. If you want your
opendbx: application to support different databases with little effort, this
opendbx: is definitively the right thing for you!
opendbx:
opendbx:
opendbx:

View file

@ -0,0 +1,30 @@
Description: Use local copy of docbookx.dtd
http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd is added to debian
dir and used instead of the online one so the package can build with no
network access.
Author: Scott Kitterman <scott@kitterman.com>
Origin: vendor
Forwarded: not-needed
Index: libopendbx-1.4.6/utils/doc/opendbx-utils.en.xml
===================================================================
--- libopendbx-1.4.6.orig/utils/doc/opendbx-utils.en.xml 2012-11-03 22:31:11.226725868 -0400
+++ libopendbx-1.4.6/utils/doc/opendbx-utils.en.xml 2012-11-03 22:31:15.022725927 -0400
@@ -1,5 +1,5 @@
<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "../../debian/xml/docbookx.dtd">
<set>
<title>OpenDBX</title>
Index: libopendbx-1.4.6/doc/opendbx.en.xml
===================================================================
--- libopendbx-1.4.6.orig/doc/opendbx.en.xml 2012-11-03 22:29:36.550724394 -0400
+++ libopendbx-1.4.6/doc/opendbx.en.xml 2012-11-03 22:34:20.582728815 -0400
@@ -1,5 +1,5 @@
<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "../debian/xml/docbookx.dtd">
<set>
<title>OpenDBX</title>