SPEC file for websockify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached is my first stab at a Spec file for Websockify. One thing I noticed is that It builds as a x86_64 arch on my machine, and should be a noarch.

I am building from the git hash 19a9730 but would really like to have a version number to build with. We could do what Openstack is doing, and use a date based number. I guess that would make this something like 20120510, But I would rather get a checkpointed release number. I'll let Martin make the call.

Ideally, the source files would come out of a tarball just named: websockify as opposed to kKanaka-websockify.zip. but I wanted to use the ones created by git. It would be cleaner if there were a websockify-0.1.0.tar.gz on a permanent URL that we could use in the spec file as well, where the internal directory was named websockify and not kanaka-websockify, but we can live with it as is. That seems to be the github default.

The end state is to remove all of the non-noVNC specific files in the noVNC spec file, and to instead import websockify from here.


II'm thinking right now that the noVNC spec file is then going to produce two RPMS: python-noVNC-server and noVNC-common. python-noVNC-server will require noVNC-common and python-websockify. If we want to deploy noVNC-common as part of an Apache HTTPD related scheme in the future, or someone wants it for JBoss, they won't have top pull in any of the Python code.


# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Name:           python-websockify
Version:        19a9730
Release:        1%{?dist}
Summary:        WSGI based adapter for the Websockets protocol

License:        LGPL-3
URL:            https://github.com/kanaka/websockify
Source0:        kanaka-websockify-%{version}.zip

BuildRequires:  python-devel

%description


%prep
%setup -q -c
mv kanaka-websockify-%{version}/* .


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
mkdir --parents %{python_sitelib}/
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

 
%files
%doc
# This should be in sitelib %{python_sitelib}/*
/usr/lib/python2.7/site-packages/*
/usr/bin/websockify



%changelog
* Thu May 10 2012 Adam Young <ayoung@xxxxxxxxxx> - 1
- Initial RPM release.
_______________________________________________
cloud mailing list
cloud@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/cloud

[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Big List of Linux Books]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

  Powered by Linux