%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: orbited Summary: A browser(javascript)->tcp bridge Version: 0.7.10 Release: 2%{?dist} License: MIT and BSD Group: System Environment/Daemons URL: http://www.orbited.org/ Source0: http://pypi.python.org/packages/source/o/orbited/orbited-%{version}.tar.gz Source1: urlparse.py Source2: orbited.init Patch0: %{name}-%{version}-daemon.patch Patch1: %{name}-cfg.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-setuptools, python-devel Requires: python-twisted-web, python-morbid >= 0.8.6.1 Requires: python-setuptools Requires(pre): %{_sbindir}/useradd Requires(pre): %{_sbindir}/groupadd Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service %description Orbited provides a pure JavaScript/HTML socket in the browser. It is a web router and firewall that allows you to integrate web applications with arbitrary back-end systems. You can implement any network protocol in the browser—without resorting to plugins. %prep %setup -q %patch0 -p0 -b .daemon %patch1 -p0 -b .cfg %if 0%{?rhel} >= 5 %{__cp} %{SOURCE1} orbited/ %endif %build %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root %{buildroot} %{__mkdir} -p %{buildroot}/%{_initrddir} %{__cp} %{SOURCE2} %{buildroot}/%{_initrddir}/orbited %{__mkdir} -p %{buildroot}/%{_sysconfdir} %{__cp} orbited.cfg %{buildroot}/%{_sysconfdir}/orbited.cfg %clean rm -rf %{buildroot} %pre %{_sbindir}/groupadd -r %{name} &>/dev/null || : %{_sbindir}/useradd -r -s /sbin/nologin -d %{_datadir}/%{name} -M \ -c 'Orbited' -g %{name} %{name} &>/dev/null || : %post /sbin/chkconfig --add smolt %preun if [ $1 = 0 ]; then /sbin/service smolt stop >/dev/null 2>&1 /sbin/chkconfig --del smolt fi %files %defattr(-,root,root,-) %{_bindir}/orbited %{python_sitelib}/orbited/ %{python_sitelib}/orbited*.egg-info/ %{_initrddir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}.cfg %changelog * Fri Nov 13 2009 Luke Macken - 0.7.10-2 - Add an init script - Add the default configuration file - Patch the default config to enable epoll and to disable access - Remove python-demjson requirement - Require python-setuptools * Wed Oct 07 2009 Luke Macken - 0.7.10-1 - Update to 0.7.10 - Apply a patch to add a --daemon argument * Sat Aug 08 2009 Luke Macken - 0.7.9-2 - Ship a working version of urlparse for Orbited on RHEL5 http://orbited.org/ticket/24 * Wed May 6 2009 Tom "spot" Callaway - 0.7.9-1 - update to 0.7.9 * Sat Mar 15 2008 Tom "spot" Callaway 0.3.2-1 - Initial package for Fedora