mariadb: move libmariadb into its own package

This way when only wanting the library nobody needs to download and
compile the server package, saving space and time. Also this way we can
avoid sudden SONAME bumps during a server upgrade.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper
2019-11-17 16:05:26 +01:00
parent 88511f13d0
commit c1964dd8d2
5 changed files with 301 additions and 89 deletions
+61
View File
@@ -0,0 +1,61 @@
#!/bin/sh
PCFILE=libmariadb
command -v pkg-config > /dev/null 2>&1
ret="$?"
if [ "$ret" -ne 0 ]; then
echo pkg-config not found >&2
exit 1
fi
pkg-config $PCFILE > /dev/null 2>&1
ret="$?"
if [ "$ret" -ne 0 ]; then
echo $PCFILE pkg-config file missing >&2
exit 1
fi
cflags=$(pkg-config $PCFILE --cflags)
include=$(pkg-config $PCFILE --cflags)
libs=$(pkg-config $PCFILE --libs)
plugindir=PLUGIN_DIR
socket=SOCKET
port=PORT
version=VERSION
usage () {
cat <<EOF
Usage: $0 [OPTIONS]
Options:
--cflags [$cflags]
--include [$include]
--libs [$libs]
--libs_r [$libs]
--plugindir [$plugindir]
--socket [$socket]
--port [$port]
--version [$version]
EOF
exit "$1"
}
if test $# -le 0; then usage 0 ; fi
while test $# -gt 0; do
case $1 in
--cflags) echo "$cflags" ;;
--include) echo "$include" ;;
--libs) echo "$libs" ;;
--libs_r) echo "$libs" ;;
--plugindir) echo "$plugindir" ;;
--socket) echo "$socket" ;;
--port) echo "$port" ;;
--version) echo "$version" ;;
*) usage 1 >&2 ;;
esac
shift
done
exit 0