Files
xf86-video-fbdev/.gitlab-ci/common/build-driver.sh
Enrico Weigelt, metux IT consult 0f89fbffcb gitlab CI: common scripts for driver builds
Adding a bunch of common scripts for building xorg drivers on different
platforms (for now Debian and FreeBSD) against different server versions.

Also designed to be executed locally (eg. within a VM), so one doesn't
always have to employ f.d.o gitlab.

For now, these are synced manually across various driver repos, until we've
found a viable solution for a central place.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-06 17:27:45 +02:00

59 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
PLATFORM="$1"
XSERVER_REF="$2"
if [ ! "$PLATFORM" ]; then
echo "missing PLATFORM" >&2
exit 1
fi
if [ ! "$XSERVER_REF" ]; then
echo "missing XSERVER_REF" >&2
exit 1
fi
.gitlab-ci/common/build-xserver.sh "$PLATFORM" "$XSERVER_REF"
case "$PLATFORM" in
freebsd)
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/libdata/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig"
export ACLOCAL_PATH="/usr/share/aclocal:/usr/local/share/aclocal"
export CFLAGS="$CFLAGS -I/usr/local/include"
export UDEV_CFLAGS=" "
export UDEV_LIBS=" "
;;
debian)
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig"
;;
*)
echo "unknown platform $PLATFORM" >&2
;;
esac
if [ -f autogen.sh ]; then
(
echo "building driver via autotools"
rm -Rf _builddir
mkdir -p _builddir
cd _builddir
../autogen.sh --disable-silent-rules
make
make check
make distcheck
)
elif [ -f meson.build ]; then
(
echo "building driver via meson"
meson setup _build
cd _build
meson compile
meson install
)
else
echo "failed detecting build system"
exit 1
fi