forked from sleepsonthefloor/deprecated_noVNC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoVNC.spec
80 lines (54 loc) · 1.89 KB
/
noVNC.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
%global with_doc 0
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
Name: openstack-noVNC
Epoch: 1
Version: 2011.3
Release: 0%{?dist}
Summary: OpenStack Nova VNC console service
Group: Applications/System
License: LGPL v3 with exceptions
Vendor: Grid Dynamics Consulting Services, Inc.
URL: https://github.com/openstack/noVNC
Source0: %{name}-%{version}.tar.gz
Source1: nova-novncproxy.init
Requires: numpy
%description
noVNC is a VNC client written using HTML5 (Web Sockets, Canvas) with encryption (wss://) support.
%prep
%setup -q -n %{name}-%{version}
%build
make -C utils rebind.so
%install
TARGET_DIR=%{buildroot}/usr/share/novnc
install -p -d -m 755 $TARGET_DIR $TARGET_DIR/utils %{buildroot}%{python_sitelib}
cp -a include $TARGET_DIR
install -m 644 images/favicon.ico vnc{,_auto}.html $TARGET_DIR
cp -a utils/{launch.sh,websockify,websocket.py,wsproxy.py,rebind.so} $TARGET_DIR/utils
for i in websocket.py wsproxy.py; do
ln -s /usr/share/novnc/utils/$i %{buildroot}%{python_sitelib}/$i
done
install -p -D -m 755 utils/nova-novncproxy %{buildroot}/usr/bin/nova-novncproxy
install -p -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/nova-novncproxy
%clean
rm -rf %{buildroot}
%preun
if [ $1 -eq 0 ] ; then
/sbin/service nova-novncproxy stop >/dev/null 2>&1
fi
%postun
if [ $1 -eq 1 ] ; then
/sbin/service nova-novncproxy condrestart
fi
%files
%doc LICENSE* README*
/usr/share/novnc
/usr/bin/*
%{python_sitelib}/*
%{_initrddir}/*
%changelog
* Mon Aug 01 2012 Alessio Ababilov <[email protected]>
- Repackage upstream
* Wed Sep 14 2011 Pavel Shkitin <[email protected]>
- Imported sources from upstream at commit 7873bed