mirror of
https://github.com/cockpit-project/cockpit.git
synced 2026-11-03 21:49:50 -09:00
Replace full LGPL/GPL/MIT/BSD license header with SPDX-License-Identifier in all source files. This is more concise and makes the license information machine readable. Keep the full text of ISC for src/common/cockpitbase64.[hc], it's small enough and only used in this pair of files. Also keep the CC-BY-SA paragraph in pkg/storaged/icons/gnome-icons.jsx as explained in the previous commit. See https://reuse.software/spec-2.0/#2-include-a-copyright-notice-and-license-in-each-file https://issues.redhat.com/browse/COCKPIT-1742
61 lines
1.1 KiB
Bash
Executable file
61 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Copyright (C) 2015 Red Hat, Inc.
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
|
|
set -euf
|
|
|
|
base=$(cd "$(dirname "$0")/../"; pwd -P)
|
|
|
|
usage()
|
|
{
|
|
echo "usage: make-rpms [--quick] [--verbose] [tarball]"
|
|
}
|
|
|
|
quiet="--quiet"
|
|
check=""
|
|
|
|
args=$(getopt -o "h,q,v" -l "help,quick,verbose" -- "$@")
|
|
eval set -- "$args"
|
|
while [ $# -gt 0 ]; do
|
|
case $1 in
|
|
-v|--verbose)
|
|
quiet=""
|
|
;;
|
|
-q|--quick)
|
|
check="--nocheck"
|
|
;;
|
|
-h|--help)
|
|
usage
|
|
exit 0
|
|
;;
|
|
--)
|
|
shift
|
|
break
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
if [ $# -gt 1 ]; then
|
|
usage
|
|
exit 2
|
|
fi
|
|
|
|
if [ -z "${1-}" ]; then
|
|
# we specify the main tarball that contains the spec file;
|
|
# the others (-node) have to be next to it in the same directory
|
|
source="$("$base/tools/make-dist" | head -n1)"
|
|
else
|
|
source="$1"
|
|
fi
|
|
|
|
tmpdir=$(mktemp -d "$PWD/rpm-build.XXXXXX")
|
|
rpmbuild $check $quiet \
|
|
--define "_topdir $tmpdir" \
|
|
--define "_rpmdir $tmpdir/output" \
|
|
-tb "$source"
|
|
|
|
find "$tmpdir/output" -name '*.rpm' -printf '%f\n' -exec mv {} . \;
|
|
rm -r "$tmpdir"
|