diff options
author | Yth - Arnaud <yth@ythogtha.org> | 2018-07-05 21:14:00 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-07-07 06:54:16 +0700 |
commit | 5274da70742b28730b4fa54c937a41d0fe3b775b (patch) | |
tree | c609c4f7101626ef7b20caffbd177a55943e5bd8 | |
parent | 0ba978d3e10b174d67edfd28f12734c9c6ba105f (diff) |
system/sqldiff: Added (display differences).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/sqldiff/README | 15 | ||||
-rw-r--r-- | system/sqldiff/slack-desc | 19 | ||||
-rw-r--r-- | system/sqldiff/sqldiff.SlackBuild | 119 | ||||
-rw-r--r-- | system/sqldiff/sqldiff.info | 10 |
4 files changed, 163 insertions, 0 deletions
diff --git a/system/sqldiff/README b/system/sqldiff/README new file mode 100644 index 000000000000..bf4909faa9e1 --- /dev/null +++ b/system/sqldiff/README @@ -0,0 +1,15 @@ +The sqldiff binary is a command-line utility program that displays +the differences between SQLite databases. + +Example usage: +sqldiff [options] database1.sqlite database2.sqlite + +The usual output is an SQL script that will transform database1.sqlite +(the "source" database) into database2.sqlite (the "destination" database). + + +sqldiff is part of SQLite, it comes inside the tools directory of +the SQLite sources. It isn't included in the stock slackware SQLite package. +Hence this SlackBuild follows the Slackware SQLite version and compilation options. +This is why the source used are linked from Slackware mirrors, to ensure +maximum compatibility with stock Slackware. diff --git a/system/sqldiff/slack-desc b/system/sqldiff/slack-desc new file mode 100644 index 000000000000..20dc5474c321 --- /dev/null +++ b/system/sqldiff/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +sqldiff: sqldiff (display differences) +sqldiff: +sqldiff: The sqldiff binary is a command-line utility program that displays +sqldiff: the differences between SQLite databases. +sqldiff: +sqldiff: Example usage: +sqldiff: sqldiff [options] database1.sqlite database2.sqlite +sqldiff: +sqldiff: The usual output is an SQL script that will transform +sqldiff: database1.sqlite (the "source" database) into database2.sqlite +sqldiff: (the "destination" database). diff --git a/system/sqldiff/sqldiff.SlackBuild b/system/sqldiff/sqldiff.SlackBuild new file mode 100644 index 000000000000..f3e9b7e75902 --- /dev/null +++ b/system/sqldiff/sqldiff.SlackBuild @@ -0,0 +1,119 @@ +#!/bin/sh + +# Slackware build script for sqldiff + +# Yth | Pont-en-Royans, France | yth@ythogtha.org + +# 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=sqldiff +VERSION=${VERSION:-3.13} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +SRCNAM=sqlite +SRCVER=$(tr -d . <<< "${VERSION}0000") + +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 + +# Enable the same features as slackware official sqlite package: +SLKCFLAGS="$SLKCFLAGS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_ICU -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_STAT2=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1" + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-src-$SRCVER +tar xvf $CWD/$SRCNAM-src-$SRCVER.tar.?z* || exit 1 +cd $SRCNAM-src-$SRCVER || exit 1 +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 {} \; + +# Completely copied from slackware's official sqlite SlackBuild +# except --enable-cross-thread-connections is removed because it does not work. +configure() { +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS $(icu-config --cppflags)" \ +LDFLAGS="$(icu-config --ldflags)" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --enable-threadsafe \ + --enable-tempstore=yes \ + --enable-load-extension \ + --enable-static=no \ + --build=$ARCH-slackware-linux + return $? +} + +if ! configure ; then + # Try regenerating configure: + autoconf + configure || exit 1 +fi +# End of Slackware's SlackBuild copy-pasting + +# Here we only build $PRGNAM target +make $NUMJOBS $PRGNAM || make $PRGNAM || exit 1 + +mkdir -p $PKG/usr/bin +install -m755 $PRGNAM $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 + +mkdir -p $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:-txz} diff --git a/system/sqldiff/sqldiff.info b/system/sqldiff/sqldiff.info new file mode 100644 index 000000000000..5a13395c3376 --- /dev/null +++ b/system/sqldiff/sqldiff.info @@ -0,0 +1,10 @@ +PRGNAM="sqldiff" +VERSION="3.13" +HOMEPAGE="https://www.sqlite.org/" +DOWNLOAD="https://mirrors.slackware.com/slackware/slackware64-14.2/source/ap/sqlite/sqlite-src-3130000.tar.xz" +MD5SUM="871f618307359b5a739955f690eebba0" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Yth - Arnaud" +EMAIL="yth@ythogtha.org" |