mirror of
https://github.com/openwrt/packages.git
synced 2025-02-14 14:58:03 +00:00
c1964dd8d2
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>
62 lines
1.2 KiB
Bash
Executable File
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
|