1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 04:14:01 +02:00
openwrt-packages/libs/libmariadb/files/mysql_config
Sebastian Kemper c1964dd8d2 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>
2019-11-17 16:05:29 +01:00

62 lines
1.2 KiB
Bash
Executable File

#!/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