%global modname narcissus.hub
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
Name: python-narcissus-hub
Version: 0.9.0.1
Release: 1%{?dist}
Summary: Hub components for Narcissus, realtime log visualization
Group: Development/Libraries
License: AGPLv3+
URL: http://pypi.python.org/pypi/narcissus.hub
Source0: http://pypi.python.org/packages/source/n/%{modname}/%{modname}-%{version}.tar.gz
Patch0: python-narcissus-hub-geolitecity-location.patch
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-moksha-hub
BuildRequires: python-pygeoip
BuildRequires: python-geojson
Requires: python-setuptools
Requires: python-moksha-hub
Requires: python-pygeoip
Requires: python-geojson
%description
This package contains the "hub" components for narcissus. Narcissus is a web
application that visualizes web server hits as they happen in real time.
Features:
* IP addresses converted to latitude/longitude, then streamed via
WebSockets to `polymaps `_.
* Realtime graphs of what countries are downloading what content with `d3
`_.
* `Ømq (zeromq) `_ on the backend.
* **Fast**. No polling.
You can see a demo running live at http://narcissus.rc.rit.edu
It is visualizing the logs of http://mirror.rit.edu
%prep
%setup -q -n %{modname}-%{version}
%patch0 -p2
# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info
%build
%{__python2} setup.py build
%install
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
%{__mkdir} -p %{buildroot}%{_sysconfdir}/moksha/
cp development.ini %{buildroot}%{_sysconfdir}/moksha/production.ini.example-narcissus
%check
%{__python2} setup.py test
%files
%doc README.rst LICENSE
%{python2_sitelib}/narcissus/hub/
%{python2_sitelib}/%{modname}-%{version}*
%{_sysconfdir}/moksha/production.ini.example-narcissus
%changelog
* Tue Jan 21 2014 Ralph Bean - 0.9.0.1-1
- Initial package for Fedora