aboutsummaryrefslogtreecommitdiff
path: root/office/mdbtools/mdbtools.SlackBuild
diff options
context:
space:
mode:
authorJuan M. Lasca <juanmlasca@gmail.com>2022-04-24 21:35:13 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-30 13:52:03 +0700
commit124d6d187784bfee7922ef20875c6c38dfe7c6db (patch)
tree9f4dec9547a8bc854f9e93e9f92b1764ad823df9 /office/mdbtools/mdbtools.SlackBuild
parent0bdd9e124ce185f232fc726fadcb5b147486a11b (diff)
office/mdbtools: Updated for version 1.0.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office/mdbtools/mdbtools.SlackBuild')
-rw-r--r--office/mdbtools/mdbtools.SlackBuild51
1 files changed, 38 insertions, 13 deletions
diff --git a/office/mdbtools/mdbtools.SlackBuild b/office/mdbtools/mdbtools.SlackBuild
index fc47fe123d1f0..ff9cdcd8cf283 100644
--- a/office/mdbtools/mdbtools.SlackBuild
+++ b/office/mdbtools/mdbtools.SlackBuild
@@ -2,7 +2,8 @@
# Slackware build script for mdbtools
-# Copyright 2008 Hans Goossen <goosseno@gmail.com>
+# Copyright 2008 Hans Goossen <goosseno@gmail.com>
+# Copyright 2022 Juan M. Lasca <juanmlasca@gmail.com>
# All rights reserved.
#
@@ -26,11 +27,16 @@
# 20220217 bkw: Modified by SlackBuilds.org:
# - fix build on 15.0.
# - remove .la files.
+# 20221804 Modified by Juan M. Lasca:
+# - update to version 1.0.0
+# - include bash completions
+# - add option to build iodbc or unixodbc driver if installed
+# - add option to include debugging tools
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mdbtools
-VERSION=${VERSION:-0.5}
+VERSION=${VERSION:-1.0.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -76,35 +82,54 @@ 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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \+
+ \( -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 {} \;
+
+
+with_odbc="";
+[ -f /usr/lib${LIBDIRSUFFIX}/libiodbc.so ] && [ "${UNIXODBC_DRIVER:-yes}" = "no" ] &&
+ with_odbc="--with-iodbc=/usr";
+[ -f /usr/lib${LIBDIRSUFFIX}/libodbc.so ] && [ "${UNIXODBC_DRIVER:-yes}" != "no" ] &&
+ with_odbc="--with-unixodbc=/usr";
-SLKCFLAGS+=" -fcommon"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
- --enable-sql \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-static=no \
--enable-shared=yes \
+ $with_odbc \
+ --with-bash-completion-dir=/usr/share/bash-completion/completions \
--build=$ARCH-slackware-linux
make
-make install-strip DESTDIR=$PKG
-gzip -9 $PKG/usr/man/man*/*
+make install DESTDIR=$PKG
+
+# Does the user wants the debugging tools?
+if [ "${DEBUGGING_TOOLS:-yes}" != "no" ]; then
+ for i in $( find src/util/.libs/ \! -name "mdb-*" -a -type f -printf "%f\n" ); do
+ mv src/util/.libs/$i $PKG/usr/bin/mdb-$i;
+ done;
+fi;
+
+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
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog NEWS README TODO HACKING $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING COPYING.LIB NEWS README.md HACKING.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-rm -f $PKG/usr/lib*/*.la
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc