summaryrefslogtreecommitdiff
path: root/source/ap/mysql/mysql-embedded.build
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/mysql/mysql-embedded.build')
-rwxr-xr-xsource/ap/mysql/mysql-embedded.build26
1 files changed, 22 insertions, 4 deletions
diff --git a/source/ap/mysql/mysql-embedded.build b/source/ap/mysql/mysql-embedded.build
index 9b06d386..2ac77f31 100755
--- a/source/ap/mysql/mysql-embedded.build
+++ b/source/ap/mysql/mysql-embedded.build
@@ -3,10 +3,19 @@
# by: David Cantrell <david@slackware.com>
# Currently maintained by: Patrick Volkerding <volkerdi@slackware.com>
-VERSION=5.0.84
-ARCH=${ARCH:-x86_64}
+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
@@ -20,6 +29,9 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG
@@ -29,15 +41,21 @@ 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-innodb --without-bench \
+ --with-embedded-server --without-innodb \
--without-berkeley-db --without-row-based-replication \
--without-readline --disable-shared --with-charset=utf8 \
- --without-debug --with-pthread --without-openssl --without-query-cache \
+ --without-debug --with-pthread --without-ssl --without-query-cache \
--without-geometry --with-pic
make -j6 || make || exit 1