summaryrefslogtreecommitdiffstats
path: root/source/ap/mariadb/mariadb.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/mariadb/mariadb.SlackBuild')
-rwxr-xr-xsource/ap/mariadb/mariadb.SlackBuild67
1 files changed, 43 insertions, 24 deletions
diff --git a/source/ap/mariadb/mariadb.SlackBuild b/source/ap/mariadb/mariadb.SlackBuild
index 976f85170..f7d803d88 100755
--- a/source/ap/mariadb/mariadb.SlackBuild
+++ b/source/ap/mariadb/mariadb.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
-# Copyright 2011, 2012, 2013, 2014 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2011, 2012, 2013, 2014, 2017 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,8 +26,10 @@
# MariaDB conversion by: Heinz Wiesinger <pprkut@liwjatan.at>
# Also maintained by: Patrick Volkerding <volkerdi@slackware.com>
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=mariadb
-VERSION=${VERSION:-$(echo ${PKGNAM}-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo ${PKGNAM}-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
# To reduce the package size, the embedded server may be omitted. Currently
@@ -55,8 +57,15 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-${BUILD}${TAG}.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
@@ -78,14 +87,8 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-$VERSION
-tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
-cd ${PKGNAM}-$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
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
chown -R root:root .
find . \
@@ -94,15 +97,11 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix linking with libwrap
-sed -i "s|\${CMAKE_REQUIRED_LIBRARIES} wrap|\${CMAKE_REQUIRED_LIBRARIES} wrap nsl|" \
- configure.cmake
-
mkdir build
cd build
cmake \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS="$SLKCFLAGS -felide-constructors -fno-exceptions -fno-rtti" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DBUILD_CONFIG=mysql_release \
-DFEATURE_SET="community" \
-DINSTALL_LAYOUT="RPM" \
@@ -126,24 +125,44 @@ cmake \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_EMBEDDED_SERVER=${EMBEDDED} \
+ -DWITH_LIBARCHIVE=ON \
-DWITH_READLINE=ON \
- -DWITH_SSL=system \
- -DWITH_ZLIB=system \
-DWITH_JEMALLOC=system \
+ -DWITH_ZLIB=system \
+ -DWITH_EXTERNAL_ZLIB=ON \
+ -DWITH_SSL=system \
+ -DCONC_WITH_SSL=ON \
-DUSE_ARIA_FOR_TMP_TABLES=ON \
- ..
+ -DAWS_SDK_EXTERNAL_PROJECT=OFF \
+ .. || exit 1
+
+# doesn't currently compile
+# -DWITH_ROCKSDB_JEMALLOC=ON \
# not building with libwrap. Do we still need tcp_wrappers support?
# -DWITH_LIBWRAP=ON \
make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG
+make install DESTDIR=$PKG || exit 1
+
+# Sorry, I'm not going to put up with "/etc/systemd/" just for a config file
+# that isn't really needed anyway:
+rm -rf $PKG/etc/systemd
# Leave build directory:
cd ..
+# Install innotop
+install -m755 debian/additions/innotop/innotop $PKG/usr/bin/
+install -m644 debian/additions/innotop/innotop.1 $PKG/usr/man/man1/
+
+# Install mysqlreport
+install -m755 debian/additions/mysqlreport $PKG/usr/bin/
+install -m644 debian/additions/mysqlreport.1 $PKG/usr/man/man1/
+
if [ "$KEEPSTATIC" = "NO" ]; then
# Remove large static libraries:
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmariadbclient.a
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient.a
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient_r.a
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqld.a
@@ -172,7 +191,7 @@ chmod 0755 $PKG/var/run/mysql
mkdir -p $PKG/etc/rc.d
# This is installed chmod 644 so that the server does not run by default.
zcat $CWD/rc.mysqld.gz > $PKG/etc/rc.d/rc.mysqld.new
-rm -rf $PKG/etc/init.d
+rm -rf $PKG/etc/init.d $PKG/usr/libexec/rcmysql
# Install mysqlaccess.conf
install -m 644 scripts/mysqlaccess.conf $PKG/etc/mysqlaccess.conf.new
@@ -180,7 +199,7 @@ install -m 644 scripts/mysqlaccess.conf $PKG/etc/mysqlaccess.conf.new
# Mark config files under /etc as .new
mv $PKG/etc/my.cnf $PKG/etc/my.cnf.new
mv $PKG/etc/logrotate.d/mysql $PKG/etc/logrotate.d/mysql.new
-for i in client mysql-clients server; do
+for i in client mysql-clients server tokudb; do
mv $PKG/etc/my.cnf.d/$i.cnf $PKG/etc/my.cnf.d/$i.cnf.new
done