aboutsummaryrefslogtreecommitdiff
path: root/util.sh
diff options
context:
space:
mode:
authorDavid Oberhollenzer <goliath@infraroot.at>2021-02-13 14:40:29 +0100
committerDavid Oberhollenzer <goliath@infraroot.at>2021-04-17 23:06:25 +0200
commitf6424e26d45de9c599f3b4ce860ca4ad812a1bee (patch)
tree8f093fc29b552cc6471dc510221b89888d4ea603 /util.sh
parenta1cf19f350ef67ade57e320752af47b44c11a3fa (diff)
Add basic userland writeupHEADmaster
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Diffstat (limited to 'util.sh')
-rw-r--r--util.sh24
1 files changed, 24 insertions, 0 deletions
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"