From f6424e26d45de9c599f3b4ce860ca4ad812a1bee Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 13 Feb 2021 14:40:29 +0100 Subject: Add basic userland writeup Signed-off-by: David Oberhollenzer --- util.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 util.sh (limited to 'util.sh') diff --git a/util.sh b/util.sh new file mode 100644 index 0000000..96f06c2 --- /dev/null +++ b/util.sh @@ -0,0 +1,24 @@ +run_configure() { + "$srcdir/configure" --host="$TARGET" --prefix="" --sbindir=/bin \ + --includedir=/usr/include --datarootdir=/usr/share\ + --libexecdir=/lib/libexec --disable-static \ + --enable-shared $@ +} + +auto_build() { + local pkgname="$1" + shift + + mkdir -p "$BUILDROOT/build/$pkgname" + cd "$BUILDROOT/build/$pkgname" + srcdir="$BUILDROOT/src/$pkgname" + + run_configure $@ + make -j `nproc` + make DESTDIR="$SYSROOT" install + cd "$BUILDROOT" +} + +export PKG_CONFIG_SYSROOT_DIR="$SYSROOT" +export PKG_CONFIG_LIBDIR="$SYSROOT/lib/pkgconfig" +export PKG_CONFIG_PATH="$SYSROOT/lib/pkgconfig" -- cgit v1.2.3