contrib/fedora: use meson to build by default from build_clean.sh
This commit is contained in:
@@ -21,7 +21,8 @@ usage() {
|
|||||||
echo " -g|--git: create tarball from current git HEAD (skips make dist)"
|
echo " -g|--git: create tarball from current git HEAD (skips make dist)"
|
||||||
echo " -Q|--quick: only create the distribution tarball, without running checks"
|
echo " -Q|--quick: only create the distribution tarball, without running checks"
|
||||||
echo " -N|--no-dist: skip creating the source tarball if you already did \`make dist\`"
|
echo " -N|--no-dist: skip creating the source tarball if you already did \`make dist\`"
|
||||||
echo " -m|--meson: use meson to create the source tarball"
|
echo " -m|--meson: (default) use meson to create the source tarball"
|
||||||
|
echo " -A|--autotools: use autotools to create the source tarball"
|
||||||
echo " -w|--with \$OPTION: pass --with \$OPTION to rpmbuild. For example --with debug"
|
echo " -w|--with \$OPTION: pass --with \$OPTION to rpmbuild. For example --with debug"
|
||||||
echo " -W|--without \$OPTION: pass --without \$OPTION to rpmbuild. For example --without debug"
|
echo " -W|--without \$OPTION: pass --without \$OPTION to rpmbuild. For example --without debug"
|
||||||
echo " -s|--snapshot TEXT: use TEXT as the snapshot version for the new package (overwrites \$NM_BUILD_SNAPSHOT environment)"
|
echo " -s|--snapshot TEXT: use TEXT as the snapshot version for the new package (overwrites \$NM_BUILD_SNAPSHOT environment)"
|
||||||
@@ -99,8 +100,12 @@ while [[ $# -gt 0 ]]; do
|
|||||||
SOURCE_FROM_GIT=1
|
SOURCE_FROM_GIT=1
|
||||||
;;
|
;;
|
||||||
-m|--meson)
|
-m|--meson)
|
||||||
|
[ "$USE_AUTOTOOLS" = 1 ] && die "conflicting argument: $A when building with autotools is requested";
|
||||||
USE_MESON=1
|
USE_MESON=1
|
||||||
WITH_LIST=("${WITH_LIST[@]}" "--with" "meson")
|
;;
|
||||||
|
-A|--autotools)
|
||||||
|
[ "$USE_MESON" = 1 ] && die "conflicting argument: $A when building with meson is explicitly requested";
|
||||||
|
USE_AUTOTOOLS=1
|
||||||
;;
|
;;
|
||||||
-Q|--quick)
|
-Q|--quick)
|
||||||
QUICK=1
|
QUICK=1
|
||||||
@@ -198,7 +203,7 @@ get_version_meson() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [[ $NO_DIST != 1 ]]; then
|
if [[ $NO_DIST != 1 ]]; then
|
||||||
if [[ $USE_MESON = 1 ]]; then
|
if [[ $USE_AUTOTOOLS != 1 ]]; then
|
||||||
meson setup "$GITDIR/build" \
|
meson setup "$GITDIR/build" \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--bindir=/usr/bin \
|
--bindir=/usr/bin \
|
||||||
@@ -281,6 +286,10 @@ if [[ "$ADD_WITH_TEST" == 1 ]]; then
|
|||||||
WITH_LIST=("${WITH_LIST[@]}" "--with" "test")
|
WITH_LIST=("${WITH_LIST[@]}" "--with" "test")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$USE_AUTOTOOLS" != 1 ]]; then
|
||||||
|
WITH_LIST=("${WITH_LIST[@]}" "--with" "meson")
|
||||||
|
fi
|
||||||
|
|
||||||
export SOURCE_FROM_GIT
|
export SOURCE_FROM_GIT
|
||||||
export BUILDTYPE
|
export BUILDTYPE
|
||||||
export NM_RPMBUILD_ARGS="${WITH_LIST[@]}"
|
export NM_RPMBUILD_ARGS="${WITH_LIST[@]}"
|
||||||
|
Reference in New Issue
Block a user