Rpm: CentOS dfart. Rpm building isn't automated yet.

This commit is contained in:
Dmitry Maksyoma
2021-02-05 23:49:47 +13:00
parent a6512a7801
commit 90101a7e91
11 changed files with 214 additions and 12 deletions

53
centos/kasmvncserver.spec Normal file
View File

@@ -0,0 +1,53 @@
Name: kasmvncserver
Version: 0.9.1~beta
Release: 1%{?dist}
Summary: Lorem ipsum
License: GPLv2+
URL: https://github.com/kasmtech/KasmVNC
Source0: kasmvnc.centos_core.tar.gz
%description
Lorem ipsum
%prep
%install
rm -rf $RPM_BUILD_ROOT
DESTDIR=$RPM_BUILD_ROOT make -f /src/KasmVNC/debian/Makefile.to_fakebuild_tar_package install
%files
/usr/bin/*
/usr/share/man/man1
/usr/share/kasmvnc/www
%doc /usr/share/doc/kasmvncserver
%changelog
%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
;;
%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