rpm-ostree/ci/libbuild.sh
Jonathan Lebon 3f5f749f82 libbuild.sh: pass arguments to make
Otherwise, e.g. `make check` && `make install` won't actually do
anything.

Closes: #765
Approved by: cgwalters
2017-05-05 20:23:22 +00:00

29 lines
512 B
Bash

#!/usr/bin/bash
make() {
/usr/bin/make -j $(getconf _NPROCESSORS_ONLN) "$@"
}
build() {
env NOCONFIGURE=1 ./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib64 "$@"
make
}
build_default() {
export CFLAGS='-fsanitize=undefined'
build
}
install_builddeps() {
pkg=$1
dnf -y install dnf-plugins-core
dnf install -y @buildsys-build
dnf install -y 'dnf-command(builddep)'
# builddeps+runtime deps
dnf builddep -y $pkg
dnf install -y $pkg
rpm -e $pkg
}