mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
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:
Executable
+61
@@ -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
|
||||
Reference in New Issue
Block a user