2021-02-05 11:49:47 +01:00
|
|
|
Name: kasmvncserver
|
|
|
|
Version: 0.9.1~beta
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Lorem ipsum
|
|
|
|
|
|
|
|
License: GPLv2+
|
|
|
|
URL: https://github.com/kasmtech/KasmVNC
|
|
|
|
|
2021-02-11 09:50:14 +01:00
|
|
|
BuildRequires: rsync
|
2021-02-12 11:07:53 +01:00
|
|
|
Requires: xorg-x11-xauth, xorg-x11-xkb-utils, xkeyboard-config, xorg-x11-server-utils, openssl, perl
|
|
|
|
Conflicts: tigervnc-server
|
2021-02-11 08:43:21 +01:00
|
|
|
|
2021-02-05 11:49:47 +01:00
|
|
|
%description
|
|
|
|
|
|
|
|
Lorem ipsum
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2021-02-11 09:50:14 +01:00
|
|
|
DESTDIR=$RPM_BUILD_ROOT make -f /src/debian/Makefile.to_fakebuild_tar_package install
|
2021-02-05 11:49:47 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
/usr/bin/*
|
2021-02-12 11:07:53 +01:00
|
|
|
/usr/share/man/man1/*
|
2021-02-05 11:49:47 +01:00
|
|
|
/usr/share/kasmvnc/www
|
|
|
|
|
2021-02-12 11:07:53 +01:00
|
|
|
%license /usr/share/doc/kasmvncserver/LICENCE.TXT
|
|
|
|
%doc /usr/share/doc/kasmvncserver/README.md
|
2021-02-05 11:49:47 +01:00
|
|
|
|
|
|
|
%changelog
|
2021-02-12 11:07:53 +01:00
|
|
|
* Fri Feb 12 2021 KasmTech <info@kasmweb.com> - 0.9.1~beta-1
|
|
|
|
- Initial release of the rpm package.
|
2021-02-05 11:49:47 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
bindir=/usr/bin
|
|
|
|
mandir=/usr/share/man
|
|
|
|
commands="kasmvncserver kasmvncpasswd kasmvncconfig Xkasmvnc"
|
|
|
|
|
|
|
|
for kasm_command in $commands; do
|
|
|
|
generic_command=`echo "$kasm_command" | sed -e 's/kasm//'`;
|
|
|
|
update-alternatives --install "$bindir/$generic_command" \
|
|
|
|
"$generic_command" "$bindir/$kasm_command" 90 \
|
|
|
|
--slave "$mandir/man1/$generic_command.1.gz" "$generic_command.1.gz" \
|
|
|
|
"$mandir/man1/$kasm_command.1.gz"
|
|
|
|
done
|
2021-02-12 06:11:27 +01:00
|
|
|
|
|
|
|
kasmvnc_group="kasmvnc"
|
|
|
|
|
|
|
|
create_kasmvnc_group() {
|
|
|
|
if ! getent group "$kasmvnc_group" >/dev/null; then
|
|
|
|
groupadd --system "$kasmvnc_group"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
make_self_signed_certificate() {
|
|
|
|
local cert_file=/etc/pki/tls/private/kasmvnc.pem
|
|
|
|
[ -f "$cert_file" ] && return 0
|
|
|
|
|
|
|
|
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
|
|
|
|
-keyout "$cert_file" \
|
|
|
|
-out "$cert_file" -subj \
|
|
|
|
"/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=kasm/emailAddress=none@none.none"
|
|
|
|
chgrp "$kasmvnc_group" "$cert_file"
|
|
|
|
chmod 640 "$cert_file"
|
|
|
|
}
|
|
|
|
|
|
|
|
create_kasmvnc_group
|
|
|
|
make_self_signed_certificate
|
2021-02-05 11:49:47 +01:00
|
|
|
|
|
|
|
%postun
|
|
|
|
bindir=/usr/bin
|
|
|
|
mandir=/usr/share/man
|
|
|
|
commands="kasmvncserver kasmvncpasswd kasmvncconfig Xkasmvnc"
|
|
|
|
|
|
|
|
for kasm_command in $commands; do
|
|
|
|
generic_command=`echo "$kasm_command" | sed -e 's/kasm//'`;
|
|
|
|
update-alternatives --remove "$generic_command" "$bindir/$kasm_command"
|
|
|
|
done
|
2021-02-12 06:11:27 +01:00
|
|
|
|
|
|
|
rm -f /etc/pki/tls/private/kasmvnc.pem
|