2021-02-11 09:50:14 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
prepare_build_env() {
|
|
|
|
rpmdev-setuptree
|
|
|
|
copy_spec_and_tar_with_binaries
|
|
|
|
}
|
|
|
|
|
|
|
|
copy_spec_and_tar_with_binaries() {
|
2022-03-26 20:49:18 +01:00
|
|
|
cp /tmp/kasmvncserver.spec ~/rpmbuild/SPECS/
|
2021-02-11 09:50:14 +01:00
|
|
|
cp /src/builder/build/kasmvnc.${os}_${os_codename}.tar.gz \
|
|
|
|
~/rpmbuild/SOURCES/
|
|
|
|
}
|
|
|
|
|
|
|
|
copy_rpm_to_build_dir() {
|
|
|
|
cd /src/builder && \
|
|
|
|
mkdir -p "$os_dir" && cp ~/rpmbuild/RPMS/*/*.rpm ${os_dir}
|
|
|
|
}
|
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
2022-03-26 20:49:18 +01:00
|
|
|
if [ -z ${KASMVNC_BUILD_OS_CODENAME+x} ]; then
|
|
|
|
os=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
|
|
|
|
os_codename=$(lsb_release -cs | tr '[:upper:]' '[:lower:]')
|
|
|
|
else
|
|
|
|
os=${KASMVNC_BUILD_OS}
|
|
|
|
os_codename=${KASMVNC_BUILD_OS_CODENAME}
|
|
|
|
fi
|
2021-02-11 09:50:14 +01:00
|
|
|
os_dir="build/${os}_${os_codename}"
|
|
|
|
|
|
|
|
prepare_build_env
|
|
|
|
rpmbuild -ba ~/rpmbuild/SPECS/kasmvncserver.spec
|
|
|
|
copy_rpm_to_build_dir
|
2021-02-12 11:07:03 +01:00
|
|
|
rpmlint "$os_dir"/*.rpm || true
|