Accepting request 518667 from home:tbechtold:branches:devel:languages:python

- convert to singlespec
- split data files into -common package

OBS-URL: https://build.opensuse.org/request/show/518667
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockify?expand=0&rev=23
This commit is contained in:
Thomas Bechtold 2017-08-25 08:22:15 +00:00 committed by Git OBS Bridge
parent 7bb68077fd
commit d598d40414
2 changed files with 47 additions and 8 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 25 07:57:23 UTC 2017 - tbechtold@suse.com
- convert to singlespec
- split data files into -common package
-------------------------------------------------------------------
Sat Jul 22 08:19:00 UTC 2017 - dmueller@suse.com

View File

@ -16,6 +16,7 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-websockify
Version: 0.8.0
Release: 0
@ -23,17 +24,23 @@ Summary: Websockify
License: LGPL-3.0 and MPL-2.0 and BSD-2-Clause and BSD-3-Clause
Group: Development/Languages/Python
Url: https://github.com/kanaka/websockify
Source: http://pypi.python.org/packages/source/w/websockify/websockify-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
Source: http://files.pythonhosted.org/packages/source/w/websockify/websockify-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildRequires: unzip
%if 0%{?suse_version}
Recommends: python-numpy
%endif
Requires: python-setuptools
Requires: python-websockify-common = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
websockify was formerly named wsproxy and was part of the
noVNC project.
@ -43,6 +50,22 @@ to normal socket traffic. Websockify accepts the WebSockets handshake,
parses it, and then begins forwarding traffic between the client and
the target in both directions.
%package -n python-websockify-common
Summary: Websockify
Group: Development/Languages/Python
Provides: %{python_module websockify-common = %{version}}
%description -n python-websockify-common
websockify was formerly named wsproxy and was part of the
noVNC project.
At the most basic level, websockify just translates WebSockets traffic
to normal socket traffic. Websockify accepts the WebSockets handshake,
parses it, and then begins forwarding traffic between the client and
the target in both directions.
This package contains common files.
%prep
%setup -q -n websockify-%{version}
# remove unwanted shebang
@ -51,16 +74,26 @@ sed -i '1 { /^#!/ d }' websockify/websocket*.py
chmod -x include/web-socket-js/web_socket.js
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_clone -a %{buildroot}%{_bindir}/websockify
%files
%post
%python_install_alternative websockify
%postun
%python_uninstall_alternative websockify
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES.txt LICENSE.txt README.md
%{_bindir}/websockify
%{_datadir}/websockify
%python_alternative %{_bindir}/websockify
%{python_sitelib}/*
%files -n python-websockify-common
%doc LICENSE.txt
%{_datadir}/websockify
%changelog