summaryrefslogtreecommitdiffstats
path: root/patches/source/mysql/mysql-embedded.build
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 15:13:35 -0700
commit9097b9a1f29939d4996b0a685847517d02f7b5ad (patch)
treec74b091b97e2f7655593b7e011e8b37bcf1e8611 /patches/source/mysql/mysql-embedded.build
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-13.37.tar.gz
current-13.37.tar.xz
Fri May 25 23:29:36 UTC 201813.37
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack13.37.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/mysql/mysql-embedded.build')
-rwxr-xr-xpatches/source/mysql/mysql-embedded.build63
1 files changed, 63 insertions, 0 deletions
diff --git a/patches/source/mysql/mysql-embedded.build b/patches/source/mysql/mysql-embedded.build
new file mode 100755
index 000000000..004bb30d6
--- /dev/null
+++ b/patches/source/mysql/mysql-embedded.build
@@ -0,0 +1,63 @@
+#!/bin/sh
+# Build and install MySQL on Slackware
+# by: David Cantrell <david@slackware.com>
+# Currently maintained by: Patrick Volkerding <volkerdi@slackware.com>
+
+VERSION=${VERSION:-$(echo mysql-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mysql
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf mysql-$VERSION
+tar xvf $CWD/mysql-$VERSION.tar.?z* || exit 1
+cd mysql-$VERSION
+
+if ls $CWD/*.diff.gz 1> /dev/null 2> /dev/null ; then
+ for patch in $CWD/*.diff.gz ; do
+ zcat $patch | patch -p1 --verbose || exit 1
+ done
+fi
+
+CFLAGS="$SLKCFLAGS -fPIC" CXXFLAGS="$SLKCFLAGS -fPIC" \
+ ./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --datadir=/usr/share --sysconfdir=/etc/mysql \
+ --libexecdir=/usr/sbin --localstatedir=/var/lib/mysql \
+ --without-docs --without-man --without-server \
+ --with-embedded-server \
+ --without-readline --disable-shared --with-charset=utf8 \
+ --without-debug --with-pthread --without-ssl --without-query-cache \
+ --without-geometry --with-pic
+
+make -j6 || make || exit 1
+
+cp libmysqld/libmysqld.a /usr/lib${LIBDIRSUFFIX}/mysql/
+