diff --git a/python-websockify.changes b/python-websockify.changes index 63d6a6a..7ec2d44 100644 --- a/python-websockify.changes +++ b/python-websockify.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Aug 25 09:42:56 UTC 2017 - tbechtold@suse.com + +- use https for Source + +------------------------------------------------------------------- +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 diff --git a/python-websockify.spec b/python-websockify.spec index f31d5e4..8f1d1b3 100644 --- a/python-websockify.spec +++ b/python-websockify.spec @@ -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: https://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