root/build-tools/build-srpms

53 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
#
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# Create src.rpm files from source, or from a downloaded tarball
# or src.rpm plus our additional patches.
#
# This program is a wrapper around build-srpms-parallel and build-srpms-serial
#
# The location of packages to be build are identified by
# <distro>_pkg_dirs[_<opt-build-type>] files located at the root of
# any git tree (e.g. istx/stx-integ/centos_pkg_dirs).
#
# The build of an individual package is driven by its build_srpm.data
# file plus a <pkg-name>.spec file or an srpm_path file.
#
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
usage () {
echo ""
echo "Usage: "
echo " Create source rpms:"
echo " build-srpms [--serial] [args]"
}
SERIAL_FLAG=0
for arg in "$@"; do
case "$1" in
--serial) SERIAL_FLAG=1 ;;
esac
done
which mock_tmpfs_umount >> /dev/null
if [ $? -ne 0 ]; then
SERIAL_FLAG=1
fi
if [ $SERIAL_FLAG -eq 1 ]; then
echo "build-srpms-serial $@"
build-srpms-serial "$@"
else
echo "build-srpms-parallel $@"
build-srpms-parallel "$@"
fi