Blob Blame 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.6
Release:            10%{?dist}
Summary:            Pubsubhubbub app that rebroadcasts GH events over fedmsg

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:      python2-setuptools
BuildRequires:      python2-pyramid
BuildRequires:      python2-transaction
BuildRequires:      python2-pyramid-tm
BuildRequires:      python2-pyramid-mako
BuildRequires:      python2-zope-sqlalchemy
BuildRequires:      python2-weberror
BuildRequires:      python2-velruse
BuildRequires:      python2-tw2-core
BuildRequires:      fedmsg

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

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

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

# There is a temporary exception granted for this.
# See https://bugzilla.redhat.com/show_bug.cgi?id=1078327
Provides:           bundled(bootstrap)
Provides:           bundled(jquery)

%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
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.6-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Mar 01 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.6-8
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 0.3.6-1
- new version

* Fri Feb 13 2015 Ralph Bean <rbean@redhat.com> - 0.3.5-1
- new version

* Mon Feb 02 2015 Ralph Bean <rbean@redhat.com> - 0.3.4-1
- new version

* Fri Nov 14 2014 Ralph Bean <rbean@redhat.com> - 0.3.3-2
- Try again at fixing rhel conditionals.

* Fri Nov 14 2014 Ralph Bean <rbean@redhat.com> - 0.3.3-1
- Latest upstream with various bugfixes.

* Thu Nov 13 2014 Ralph Bean <rbean@redhat.com> - 0.3.1-3
- Fix rhel conditionals.

* Tue Jul 01 2014 Ralph Bean <rbean@redhat.com> - 0.3.1-2
- Note bundling in BuildRequires.

* 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