diff --git a/.gitignore b/.gitignore index e69de29..91b8619 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/fmn-1.1.0.tar.gz diff --git a/python-fmn.spec b/python-fmn.spec new file mode 100644 index 0000000..c47a75c --- /dev/null +++ b/python-fmn.spec @@ -0,0 +1,147 @@ +%global srcname fmn + +# python-sqlalchemy_schemadisplay is not yet in Fedora +# https://bugzilla.redhat.com/show_bug.cgi?id=1409929 +%global with_docs 0 + +Name: python-%{srcname} +Version: 1.1.0 +Release: 1%{?dist} +Summary: A system for generic fedmsg-driven notifications for end users + +License: LGPLv2+ +URL: https://github.com/fedora-infra/%{srcname} +Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +%description +fmn is a family of systems to manage end-user notifications triggered by +fedmsg, the FEDerated MESsage bus. fmn provides a single place for all +applications using fedmsg to notify users of events. Notifications can be +delivered by email, IRC, and server-sent events. Users can configure their +notifications for all the applications they use in one place. + +%package -n python2-%{srcname} +Summary: %{summary} +Requires: fedmsg +Requires: python-arrow +Requires: python-beautifulsoup4 +Requires: python-bleach +Requires: python-docutils +Requires: python-dogpile-cache +Requires: python-fedmsg-meta-fedora-infrastructure +Requires: python-markupsafe +Requires: python-moksha-hub +Requires: python-pika +Requires: python-fedora +Requires: python-redis +Requires: python-requests +Requires: python-six +Requires: python-sqlalchemy >= 0.8 +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +BuildRequires: fedmsg +BuildRequires: python-arrow +BuildRequires: python-beautifulsoup4 +BuildRequires: python-bleach +BuildRequires: python-devel +BuildRequires: python-docutils +BuildRequires: python-dogpile-cache +BuildRequires: python-fedmsg-meta-fedora-infrastructure +BuildRequires: python-fedora +BuildRequires: python-flake8 +BuildRequires: python-html5lib +BuildRequires: python-markupsafe +BuildRequires: python-moksha-hub +BuildRequires: python-mock +BuildRequires: python-pika +BuildRequires: python-redis +BuildRequires: python-requests +BuildRequires: python-setuptools +BuildRequires: python-six +BuildRequires: python-sqlalchemy >= 0.8 +BuildRequires: python2-devel +BuildRequires: systemd +%{?python_provide:%python_provide python2-%{srcname}} + +Provides: python-fmn-rules = %{version}-%{release} +Obsoletes: python-fmn-rules < 0.9.1-2%{?dist} +Provides: python-fmn-lib = %{version}-%{release} +Obsoletes: python-fmn-lib < 0.8.2-3%{?dist} +Provides: python-fmn-consumer = %{version}-%{release} +Obsoletes: python-fmn-consumer < 1.0.3-2%{?dist} + +%description -n python2-%{srcname} +fmn is a family of systems to manage end-user notifications triggered by +fedmsg, the FEDerated MESsage bus. fmn provides a single place for all +applications using fedmsg to notify users of events. Notifications can be +delivered by email, IRC, and server-sent events. Users can configure their +notifications for all the applications they use in one place. + + +%if 0%{?with_docs} > 0 +%package doc +Summary: HTML documentation for python-fmn +BuildRequires: make +BuildRequires: python2-sphinx +BuildRequires: python2-sqlalchemy_schemadisplay + +%description -n python-%{srcname}-doc +HTML documentation for python-fmn. +%endif + + +%prep +%autosetup -n %{srcname}-%{version} + + +%build +%py2_build + +%if 0%{?with_docs} > 0 +pushd docs +PYTHONPATH=$(dirname $(pwd)) make html +popd +%endif + + +%install +%py2_install + + +install -d %{buildroot}%{_bindir} +install -d %{buildroot}%{_unitdir} +install -d %{buildroot}%{_datadir}/%{srcname} +install -pm644 alembic.ini %{buildroot}/%{_datadir}/%{srcname}/alembic.ini +install -pm644 systemd/* %{buildroot}/%{_unitdir}/ +cp -a alembic %{buildroot}/%{_datadir}/%{srcname}/ + + +%check +PYTHONPATH=$(pwd) python -m unittest discover + + +%files -n python2-%{srcname} +%license COPYING COPYING.LESSER +%doc README.rst CHANGELOG.rst +%{python2_sitelib}/* +%{_datadir}/%{srcname} +%{_bindir}/fmn-createdb +%{_unitdir}/* + + +%if 0%{?with_docs} > 0 +%files doc +%license COPYING COPYING.LESSER +%doc README.rst CHANGELOG.rst docs/_build/html/ +%endif + + +%changelog +* Fri Jan 20 2017 Jeremy Cline - 1.1.0-1 +- Update to latest upstream +- Address package review comments + +* Thu Jan 05 2017 Jeremy Cline - 1.0.0-1 +- Initial package. diff --git a/sources b/sources index e69de29..72ca86d 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (fmn-1.1.0.tar.gz) = e39b8e16b9c1ec54027f16f98ac53126e7d52bd399ef548cb84ecc96e57978a5b7cecb5b31371236993767f97e09c00b9fad8476b2654becd0a29c6314d5bab6