mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-01-09 15:38:14 +01:00
30 lines
655 B
Plaintext
30 lines
655 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
prepare_build_env() {
|
||
|
rpmdev-setuptree
|
||
|
copy_spec_and_tar_with_binaries
|
||
|
}
|
||
|
|
||
|
copy_spec_and_tar_with_binaries() {
|
||
|
cp /src/centos/kasmvncserver.spec ~/rpmbuild/SPECS/
|
||
|
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")/.."
|
||
|
|
||
|
os=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
|
||
|
os_codename=$(lsb_release -cs | tr '[:upper:]' '[:lower:]')
|
||
|
os_dir="build/${os}_${os_codename}"
|
||
|
|
||
|
prepare_build_env
|
||
|
rpmbuild -ba ~/rpmbuild/SPECS/kasmvncserver.spec
|
||
|
copy_rpm_to_build_dir
|