#!/bin/sh set -eu makei() { echo "==> Running: make DESTDIR=\"$pkgdir\" install $*" make DESTDIR="$pkgdir" install "$@" } mesoni() { echo "==> Running: meson install --destdir \"$pkgdir\" $*" meson install --destdir "$pkgdir" "$@" } cmakei() { echo "==> Running: cmake --install $*" DESTDIR="$pkgdir" cmake --install "$@" } starmove() { [ "$#" -ge 1 ] || { echo "starmove: requires at least one path pattern" >&2 return 1 } [ "${DEPOT_OUTPUT_NAME:-}" != "" ] || { echo "starmove: DEPOT_OUTPUT_NAME is not set" >&2 return 1 } haul "$DEPOT_OUTPUT_NAME" "$@" } depot_starbuild_sync_srcdir() { workdir=${DEPOT_STARBUILD_WORKDIR:?} compat_root="$workdir/.depot-starbuild" mkdir -p "$compat_root/packages" for entry in "$workdir"/* "$workdir"/.[!.]* "$workdir"/..?*; do [ -e "$entry" ] || [ -L "$entry" ] || continue base=$(basename "$entry") [ "$base" = ".depot-starbuild" ] && continue [ "$base" = "packages" ] && continue ln -snf "$entry" "$compat_root/$base" done mkdir -p "$compat_root/packages/libxkbcommon/" ln -snf "${DEPOT_PRIMARY_DESTDIR:-$DESTDIR}" "$compat_root/packages/libxkbcommon/files" mkdir -p "$compat_root/packages/libxkbcommon-x11/" ln -snf "$(subdestdir 'libxkbcommon-x11')" "$compat_root/packages/libxkbcommon-x11/files" srcdir="$compat_root" export srcdir } depot_starbuild_setup_env() { package_name=$1 package_version='1.12.3' pkgdir=${DESTDIR:?} export package_name package_version pkgdir LANG=C LC_ALL=C export LANG LC_ALL depot_starbuild_sync_srcdir } depot_build() { depot_starbuild_setup_env 'libxkbcommon' # Add your commands here meson setup build -Dprefix=/usr --buildtype=release --libdir="/usr/lib" ninja -C build # Add your commands here } depot_install() { depot_starbuild_setup_env 'libxkbcommon' mesoni -C build } depot_install_libxkbcommon_x11() { depot_starbuild_setup_env 'libxkbcommon-x11' starmove usr/lib/*x11* starmove usr/lib/pkgconfig/*x11* starmove usr/include/xkbcommon/*x11* starmove usr/share/man/man1/*x11* }