%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %global logdir %_var/log/%name %global username orbited Name: orbited Summary: A browser(javascript)->tcp bridge Version: 0.7.10 Release: 5%{?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 Patch2: %{name}-setup.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, python-simplejson Requires: python-daemon 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 %patch2 -p0 -b .setup %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} %{__mkdir} -p %{buildroot}/%logdir %{__install} -d -m0755 %{buildroot}/var/run/%{name} %{__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 orbited %preun if [ $1 -eq 0 ]; then /sbin/service orbited stop >/dev/null 2>&1 /sbin/chkconfig --del orbited fi %files %defattr(-,root,root,-) %{_bindir}/orbited %{python_sitelib}/orbited/ %{python_sitelib}/orbited*.egg-info/ %{_initrddir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}.cfg %attr(0730,root,%username) %dir %logdir %ghost %attr(755, %username, %username) /var/run/%{name} %changelog * Tue Dec 14 2010 Luke Macken <lmacken@redhat.com> - 0.7.10-5 - Setup and configure an appropriate logging directory (#575622) - Init script improvements (#575619) - Have our daemon patch run earlier in the code path to prevent orbited from spinning on closed file descriptors (#575618). - Update our daemon patch to have it write out pid files * Wed Mar 24 2010 Luke Macken <lmacken@redhat.com> - 0.7.10-4 - Fix the scriptlets * Tue Jan 05 2010 Luke Macken <lmacken@redhat.com> - 0.7.10-3 - Patch our setup.py to remove demjson from our requirements - Add simplejson to our requires - Require python-daemon * Fri Nov 13 2009 Luke Macken <lmacken@redhat.com> - 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 <lmacken@redhat.com> - 0.7.10-1 - Update to 0.7.10 - Apply a patch to add a --daemon argument * Sat Aug 08 2009 Luke Macken <lmacken@redhat.com> - 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 <tcallawa@redhat.com> - 0.7.9-1 - update to 0.7.9 * Sat Mar 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.2-1 - Initial package for Fedora