Blob Blame History Raw
%global modname tahrir

Name:             python-tahrir
Version:          0.9.2
Release:          3%{?dist}
Summary:          A pyramid app for issuing your own Open Badges

Group:            Development/Languages
License:          AGPLv3+
URL:              http://pypi.python.org/pypi/%{modname}
Source0:          http://pypi.python.org/packages/source/t/tahrir/%{modname}-%{version}.tar.gz

BuildArch:        noarch

BuildRequires:    python2-devel
BuildRequires:    python2-setuptools

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

%global _description\
tahrir is a Pyramid app for issuing your own Open Badges.\
\
https://wiki.mozilla.org/Badges

%description %_description

%package -n python2-tahrir
Summary: %summary
Requires:         python2-pyramid
Requires:         python2-pyramid-mako
Requires:         python2-webhelpers
Requires:         python2-tahrir-api >= 0.7.0
Requires:         python2-transaction
Requires:         python2-pyramid-tm
Requires:         python2-zope-sqlalchemy
Requires:         python2-weberror
Requires:         python2-velruse
Requires:         python2-anykeystore
Requires:         python2-qrcode
Requires:         python2-dogpile-cache
Requires:         python2-docutils
Requires:         python2-dateutil
Requires:         python2-moksha-wsgi
Requires:         python2-openid
Requires:         python2-rdflib
Requires:         python2-paste-script
Requires:         fedmsg
Requires:         httpd
Requires:         python2-mod_wsgi
%if 0%{?rhel} && 0%{?rhel} <= 6
Requires:         python-sqlalchemy0.7
%else
Requires:         python2-sqlalchemy >= 0.7
%endif
%{?python_provide:%python_provide python2-tahrir}

%description -n python2-tahrir %_description

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

# Make sure that epel/rhel picks up the correct version of sqlalchemy
%{__awk} 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"sqlalchemy>=0.7\"]; import pkg_resources"}1' setup.py > setup.py.tmp
%{__mv} setup.py.tmp setup.py

# Remove upstream egg-info so that it gets rebuilt.
rm -rf *.egg*

%build
%{__python} setup.py build

sed -i 's/%%(here)s/\/var\/lib\/tahrir/' apache/%{modname}.ini

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

%{__mkdir_p} %{buildroot}/%{_datadir}/%{modname}
%{__mkdir_p} %{buildroot}/%{_sysconfdir}/%{modname}
%{__mkdir_p} %{buildroot}/%{_sysconfdir}/httpd/conf.d
%{__mkdir_p} %{buildroot}/%{_var}/lib/%{modname}

%{__install}        apache/%{modname}.wsgi %{buildroot}%{_datadir}/%{modname}/%{modname}.wsgi
%{__install} -m 640 apache/%{modname}.ini  %{buildroot}%{_sysconfdir}/%{modname}/
%{__install} -m 644 apache/%{modname}.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/%{modname}.conf
%{__install} -m 644 -d tahrir/static %{buildroot}%{_datadir}/%{modname}/static
%{__install} -m 644 -d fedora-sitedocs/ %{buildroot}%{_datadir}/%{modname}/sitedocs

%pre
%{_sbindir}/groupadd -r %{modname} &>/dev/null || :
%{_sbindir}/useradd  -r -s /sbin/nologin -d %{_datadir}/%{modname} -M \
            -c 'Tahrir Server' -g %{modname} %{modname} &>/dev/null || :

%files -n python2-tahrir
%doc README.rst LICENSE CHANGELOG.rst

%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}*

%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{modname}.conf
%dir %{_sysconfdir}/%{modname}/
%attr(-,%{modname},root) %{_datadir}/%{modname}
%attr(-,%{modname},root) %config(noreplace) %{_sysconfdir}/%{modname}/%{modname}.ini
%attr(-,%{modname},root) %config(noreplace) %{_var}/lib/%{modname}

%changelog
* Fri Mar 23 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.9.2-3
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Nov 21 2017 Sayan Chowdhury <sayanchowdhury@fedoraproject.org> - 0.9.2-1
- Update to 0.9.2

* Tue Aug 29 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.9.1-4
- Python 2 binary package renamed to python2-tahrir
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Tue Aug 22 2017 Kevin Fenzi <kevin@scrye.com> - 0.9.1-3
- Dependency is on python2-webhelpers now.

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sun Apr 23 2017 Kevin Fenzi <kevin@scrye.com> - 0.9.1-1
- Update to 0.9.1. Fixes bug #1441444

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Sep 28 2016 Sayan Chowdhury <sayanchowdhury@fedoraproject.org> - 0.9.0-1
- Release 0.9.0

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

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

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

* Fri Apr 24 2015 Ralph Bean <rbean@redhat.com> - 0.8.2-1
- new version

* Fri Apr 24 2015 Ralph Bean <rbean@redhat.com> - 0.8.1-2
- Added dep on python-pyramid-mako.

* Thu Apr 02 2015 Ralph Bean <rbean@redhat.com> - 0.8.1-1
- new version

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

* Fri Feb 13 2015 Ralph Bean <rbean@redhat.com> - 0.7.3-1
- new version
- Remove old patch.

* Mon Sep 29 2014 Ralph Bean <rbean@redhat.com> - 0.7.0-3
- Correct rhel6 conditional.

* Mon Jul 14 2014 Ralph Bean <rbean@redhat.com> - 0.7.0-2
- Patch thingiviewer to offset our badge stls.

* Mon Jul 14 2014 Ralph Bean <rbean@redhat.com> - 0.7.0-1
- Show STLs of badges in 3d.
- Support exporting badges on the sugar stack.
- Award badges via CSV files for admins.
- Show link to the reason someone was awarded a badge.

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Feb 09 2014 Ralph Bean <rbean@redhat.com> - 0.5.2-1
- Better openid handling.

* Sun Feb 09 2014 Ralph Bean <rbean@redhat.com> - 0.5.1-1
- Latest upstream.
- Added bugfix openid.
- Added flash messages when badges are awarded and in the admin panel.

* Tue Dec 17 2013 Ralph Bean <rbean@redhat.com> - 0.5.0-1
- Latest upstream with authz delegation.
- FOAF metadata included via RDFa.
- UTC timezone used everywhere.
- Enhanced view for invitations.

* Mon Nov 18 2013 Ralph Bean <rbean@redhat.com> - 0.4.5-1
- Added a heartbeat url for haproxy.

* Mon Nov 18 2013 Ralph Bean <rbean@redhat.com> - 0.4.4-1
- Latest upstream
- Optimized json leaderboard.
- Fixed profile typeerror.
- Re-add description to the badge tooltip.
- Tweaks to the admin panel.
- New RSS feed for latest badges.
- Various css fixups.

* Fri Oct 25 2013 Ralph Bean <rbean@redhat.com> - 0.4.3-1
- Many new changes:
- Reporting system.
- User profile editing.
- Rss feed of new badges.
- Login tracking
- FOAF fixes.
- Version in footer.
- Diff users.
- Show date badge was awarded.
- Fix bad link on badge page.
- Drop old patches.

* Tue Sep 10 2013 Ralph Bean <rbean@redhat.com> - 0.4.1-3
- More patching of the leaderboard template...

* Tue Sep 10 2013 Ralph Bean <rbean@redhat.com> - 0.4.1-2
- Apply patch to fix leaderboard template.

* Tue Sep 10 2013 Ralph Bean <rbean@redhat.com> - 0.4.1-1
- Latest upstream with various optimizations.

* Wed Aug 28 2013 Ralph Bean <rbean@redhat.com> - 0.4.0-2
- Add dependency on python-webhelpers.

* Mon Aug 26 2013 Ralph Bean <rbean@redhat.com> - 0.4.0-1
- Latest upstream.
- Take advantage of enhanced tahrir-api for fedmsg and rank caching.
- Publish fedmsg messages on rank change.
- More consitent user links.
- Css fixes and style updates.
- RSS feeds per-user and per-badge.
- Temporarily revert the sqlalchemy version requirement.

* Fri Aug 16 2013 Ralph Bean <rbean@redhat.com> - 0.3.5-3
- Copy the fedora-sitedocs contents in /usr/share/

* Thu Aug 15 2013 Ralph Bean <rbean@redhat.com> - 0.3.5-2
- Add requires on python-openid as per
  https://github.com/fedora-infra/tahrir/issues/154

* Thu Aug 15 2013 Ralph Bean <rbean@redhat.com> - 0.3.5-1
- Bugfixes to the about page.
- CSS fixes to the user page.

* Thu Aug 15 2013 Ralph Bean <rbean@redhat.com> - 0.3.4-2
- Update sqlalchemy version in awk statement.

* Thu Aug 15 2013 Ralph Bean <rbean@redhat.com> - 0.3.4-1
- Modern sqlalchemy requirement.
- Social media links.
- First try at FOAF metadata on user pages.
- Added configurable FAQ and footer.
- New default avatar
- Load JS and images over https when appropriate.
- Fix some fatal errors on the leaderboard json api.

* Tue Aug 13 2013 Ralph Bean <rbean@redhat.com> - 0.3.3-1
- Optimizations to the leaderboard.
- Bugfix to 404s for user.
- Ability to edit your profile.
- Default issuer in the badge builder.

* Sun Aug 11 2013 Ralph Bean <rbean@redhat.com> - 0.3.2-1
- Enhancements to the "explore" view.

* Sun Aug 11 2013 Ralph Bean <rbean@redhat.com> - 0.3.1-1
- Some more css and presentation facelifting.
- Make leaderboard respect opt-out
  https://github.com/fedora-infra/tahrir/pull/146
- Consistent user links
  https://github.com/fedora-infra/tahrir/pull/144
- Fix badge links
  https://github.com/fedora-infra/tahrir/pull/145
- JSON api for leaderboard
  https://github.com/fedora-infra/tahrir/pull/147
- User-specific JSON api endpoint
  https://github.com/fedora-infra/tahrir/pull/149

* Fri Aug 09 2013 Ralph Bean <rbean@redhat.com> - 0.3.0-1
- Add JSON API from Ricky Elrod.
- Some CSS fixups.

* Mon Aug 05 2013 Ralph Bean <rbean@redhat.com> - 0.2.9-1
- Limit the relative leaderboard to only 5 people instead of 10.
- Emit fedmsg messages when invitations are claimed.

* Thu Aug 01 2013 Ralph Bean <rbean@redhat.com> - 0.2.8-1
- Fix a login user-creation bug.
- Fix trailing comma on tags.
- Fix trailing slash on emails.

* Thu Aug 01 2013 Ralph Bean <rbean@redhat.com> - 0.2.7-1
- Reorganize avatars around openid identifiers for ease-of-use.

* Tue Jul 30 2013 Ralph Bean <rbean@redhat.com> - 0.2.6-1
- More facelifting.
- Ability for users to opt-out.

* Thu Jul 18 2013 Ralph Bean <rbean@redhat.com> - 0.2.5-3
- Remove version constraint on python-moksha-wsgi.  It is behaving oddly.

* Thu Jul 18 2013 Ralph Bean <rbean@redhat.com> - 0.2.5-2
- python-dateutil is singular, not plural.

* Thu Jul 18 2013 Ralph Bean <rbean@redhat.com> - 0.2.5-1
- More facelifting.
- Websocket updates for the frontpage.

* Tue Jul 16 2013 Ralph Bean <rbean@redhat.com> - 0.2.3-2
- Added requirement on python-docutils.

* Tue Jul 16 2013 Ralph Bean <rbean@redhat.com> - 0.2.3-1
- Latest upstream with more botox.

* Thu Jul 11 2013 Ralph Bean <rbean@redhat.com> - 0.2.2-2
- Added requirement for python-dogpile-cache

* Wed Jul 10 2013 Ralph Bean <rbean@redhat.com> - 0.2.2-1
- Latest upstream with more cosmetic surgery.

* Wed Jul 03 2013 Ralph Bean <rbean@redhat.com> - 0.2.1-1
- Remove old patch (shipped with upstream now).
- More facelift stuff in progress.

* Mon Jul 01 2013 Ralph Bean <rbean@redhat.com> - 0.2.0-2
- Add requirement on python-qrcode.

* Wed Jun 26 2013 Ralph Bean <rbean@redhat.com> - 0.2.0-1
- Massive facelift.

* Thu Jun 13 2013 Ralph Bean <rbean@redhat.com> - 0.1.9-3
- Conditionalize sqlalchemy forward compat package for epel6.

* Wed Mar 13 2013 Ralph Bean <rbean@redhat.com> - 0.1.9-2
- Copy static directory as a directory (typofix).

* Wed Mar 13 2013 Ralph Bean <rbean@redhat.com> - 0.1.9-1
- Latest upstream with modernized apache config.

* Mon Mar 11 2013 Ralph Bean <rbean@redhat.com> - 0.1.8-3
- Use modname macro where applicable.
- Add deps on python-velruse and python-anykeystore.
- Also added server deps on httpd and mod_wsgi.
- Install configuration alongside the code.
- Copy static files to /usr/share/

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Jul 23 2012 rossdylan <rdelinge@redhat.com> 0.1.8-1
- Versioning typo in rpm fixed
- Misc bug fixes 
- Custom 404 page
- oauth authentication, defaults to FAS
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Jun 20 2012 rossdylan <rossdylan@csh.rit.edu> 0.1.6-1
- initial package for Fedora