Blob Blame History Raw
%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:               github2fedmsg
Version:            0.3.1
Release:            1%{?dist}
Summary:            Pubsubhubbub app that rebroadcasts GH events over fedmsg

Group:              System Environment/Daemons
License:            AGPLv3+
URL:                http://pypi.python.org/pypi/github2fedmsg
Source0:            http://pypi.python.org/packages/source/g/%{name}/%{name}-%{version}.tar.gz

BuildArch:          noarch


BuildRequires:      python2-devel
BuildRequires:      python-setuptools
BuildRequires:      python-pyramid
BuildRequires:      python-transaction
BuildRequires:      python-pyramid-tm
BuildRequires:      python-pyramid-mako
BuildRequires:      python-zope-sqlalchemy
BuildRequires:      python-weberror
BuildRequires:      python-velruse
BuildRequires:      python-tw2-core
BuildRequires:      fedmsg

Requires:           python-setuptools
Requires:           python-pyramid
Requires:           python-transaction
Requires:           python-pyramid-tm
Requires:           python-pyramid-mako
Requires:           python-zope-sqlalchemy
Requires:           python-weberror
Requires:           python-velruse
Requires:           python-tw2-core
Requires:           fedmsg

%if %{?rhel}%{!?rhel:0} >= 6
BuildRequires:    python-sqlalchemy0.7
Requires:         python-sqlalchemy0.7
%else
BuildRequires:    python-sqlalchemy >= 0.7
Requires:         python-sqlalchemy >= 0.7
%endif

%if 0%{?fedora}
# Not yet branched for el6
BuildRequires:    glyphicons-halflings-fonts
Requires:         glyphicons-halflings-fonts
%endif

%description
It is a web application that monitors GitHub repositories you subscribe it to.
When new actions (commits, pull-request, tickets) are made, it broadcasts a
message on the fedmsg message bus.

It is written in Python on the Pyramid framework, and uses velruse to talk with
GitHub.  It adds a webhook callback back to itself on repositories you ask it
to monitor.  When one of those callbacks fire, github2fedmsg republishes the
message it receives to the fedmsg bus.


%prep
%setup -q -n %{name}-%{version}

# Remove bundled egg-info in case it exists
rm -rf %{name}.egg-info

%build
%{__python2} setup.py build

%install
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}

# Unbundle the glyphicons
%if 0%{?fedora}
rm -rf \
  %{buildroot}%{python2_sitelib}/github2fedmsg/static/bootstrap-3.1.1-fedora/fonts
ln -s \
  /usr/share/fonts/glyphicons-halflings \
  %{buildroot}%{python2_sitelib}/github2fedmsg/static/bootstrap-3.1.1-fedora/fonts
%endif

%files
%doc README.rst LICENSE CHANGELOG.rst
%{python2_sitelib}/%{name}/
%{python2_sitelib}/%{name}-%{version}*
%{_bindir}/initialize_github2fedmsg_db

%changelog
* Wed Jun 18 2014 Ralph Bean <rbean@redhat.com> - 0.3.1-1
- Bugfix to webhooks receipt.

* Wed Jun 18 2014 Ralph Bean <rbean@redhat.com> - 0.3.0-1
- Latest upstream.
- Replaces pubsubhubbub subscription with 'webhooks'.
- Allows for users to commit to a reduced oauth scope.

* Tue Jun 17 2014 Ralph Bean <rbean@redhat.com> - 0.2.7-1
- Latest upstream, fix links to work behind a proxy.

* Tue Jun 17 2014 Ralph Bean <rbean@redhat.com> - 0.2.6-1
- Latest upstream, includes templates.

* Mon May 12 2014 Ralph Bean <rbean@redhat.com> - 0.2.4-1
- Updates from review https://github.com/fedora-infra/github2fedmsg/pull/7
- AGPL headers.
- Fixed grammar and style in description.
- Unbundle glyphicons-halflings-fonts.
- Updated bootstrap fedora to 3.1.1.

* Wed Mar 19 2014 Ralph Bean <rbean@redhat.com> - 0.2.2-1
- Initial packaging for Fedora