aboutsummaryrefslogtreecommitdiff
path: root/util.sh
blob: 96f06c2319ad530bf218d404901bcc59c7f15be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"