diff options
author | Dejan Strbac <me@dejanstrbac.com> | 2019-06-09 04:59:27 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-06-09 05:32:07 +0700 |
commit | 693231e406ce8af16a613ecdc864027d0d671f82 (patch) | |
tree | 7bfe9d4665a8db7f18b6858df534873aede0ae56 /system/tinycdb/tinycdb.SlackBuild | |
parent | 8a9a4807b2880d0e52edaf6fece0e2ea02baf770 (diff) | |
download | slackbuilds-693231e406ce8af16a613ecdc864027d0d671f82.tar.gz |
system/tinycdb: Added (Constant Database).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/tinycdb/tinycdb.SlackBuild')
-rw-r--r-- | system/tinycdb/tinycdb.SlackBuild | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/system/tinycdb/tinycdb.SlackBuild b/system/tinycdb/tinycdb.SlackBuild new file mode 100644 index 0000000000..621a9add4f --- /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} + |