aboutsummaryrefslogtreecommitdiff
path: root/util.sh
diff options
context:
space:
mode:
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"