Jeremy Cline 711d9cb
%global pkgname fedora-messaging
Jeremy Cline 711d9cb
%global srcname fedora_messaging
Jeremy Cline 711d9cb
%global desc \
Jeremy Cline 711d9cb
Tools and APIs to make working with AMQP in Fedora easier.
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%{?python_enable_dependency_generator}
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
Name:           %{pkgname}
Jeremy Cline 38da1a2
Version:        1.7.1
Jeremy Cline 38da1a2
Release:        1%{?dist}
Jeremy Cline 711d9cb
Summary:        Set of tools for using Fedora's messaging infrastructure
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
License:        GPLv2+
Jeremy Cline 711d9cb
URL:            https://github.com/fedora-infra/fedora-messaging
Jeremy Cline 29e2071
Source0:        %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
Jeremy Cline 711d9cb
BuildArch:      noarch
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
BuildRequires:  python3-devel
Jeremy Cline 711d9cb
BuildRequires:  python3-blinker
Jeremy Cline 711d9cb
BuildRequires:  python3-click
Jeremy Cline 711d9cb
BuildRequires:  python3-jsonschema
Jeremy Cline 711d9cb
BuildRequires:  python3-mock
Jeremy Cline 711d9cb
BuildRequires:  python3-pika
Jeremy Cline 711d9cb
BuildRequires:  python3-pyOpenSSL
Jeremy Cline 711d9cb
BuildRequires:  python3-pytest
Jeremy Cline 76d6d85
BuildRequires:  python3-toml
Jeremy Cline 711d9cb
BuildRequires:  python3-service-identity
Jeremy Cline 711d9cb
BuildRequires:  python3-six
Jeremy Cline 711d9cb
BuildRequires:  python3-sphinx
Jeremy Cline 711d9cb
BuildRequires:  python3-twisted
Jeremy Cline 711d9cb
Requires:       python3-%{pkgname} = %{version}-%{release}
Jeremy Cline 711d9cb
6522fd1
BuildRequires: systemd
65da202
Jeremy Cline 711d9cb
%description %{desc}
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%package     -n python3-%{pkgname}
Jeremy Cline 711d9cb
Summary:        %{summary}
Jeremy Cline 711d9cb
%{?python_provide:%python_provide python3-%{pkgname}}
Jeremy Cline 711d9cb
# Drop when https://github.com/fedora-infra/fedora-messaging/pull/51 is released
Jeremy Cline 711d9cb
Requires: python3-service-identity
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%description -n python3-%{pkgname} %{desc}
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%package doc
Jeremy Cline 711d9cb
Summary:        Documentation for %{pkgname}
Jeremy Cline 711d9cb
%description doc
Jeremy Cline 711d9cb
Documentation for %{pkgname}.
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%prep
Jeremy Cline 29e2071
%autosetup -n %{pkgname}-%{version}
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%build
Jeremy Cline 711d9cb
%py3_build
Jeremy Cline 711d9cb
# generate docs
Jeremy Cline 711d9cb
PYTHONPATH=${PWD} sphinx-build-3 -M html -d docs/_build/doctrees docs docs/_build/html
Jeremy Cline 711d9cb
PYTHONPATH=${PWD} sphinx-build-3 -M man -d docs/_build/doctrees docs docs/_build/man
Jeremy Cline 711d9cb
# remove the sphinx-build leftovers
Jeremy Cline 711d9cb
rm -rf docs/_build/*/.buildinfo
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%install
Jeremy Cline 711d9cb
%py3_install
Jeremy Cline 711d9cb
install -D -m 644 config.toml.example $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/config.toml
Jeremy Cline 0a7480d
install -D -m 644 configs/fedora.toml $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/fedora.toml
Jeremy Cline dc70109
install -D -m 644 configs/fedora.stg.toml $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/fedora.stg.toml
Jeremy Cline 0a7480d
install -D -m 644 configs/cacert.pem $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/cacert.pem
Jeremy Cline 0a7480d
# Yes, this is supposed to be a world-readable private key. It's for public Fedora broker access.
Jeremy Cline 0a7480d
install -D -m 644 configs/fedora-key.pem $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/fedora-key.pem
Jeremy Cline 0a7480d
install -D -m 644 configs/fedora-cert.pem $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/fedora-cert.pem
Jeremy Cline dc70109
install -D -m 644 configs/stg-cacert.pem $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/stg-cacert.pem
Jeremy Cline dc70109
install -D -m 644 configs/fedora.stg-key.pem $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/fedora.stg-key.pem
Jeremy Cline dc70109
install -D -m 644 configs/fedora.stg-cert.pem $RPM_BUILD_ROOT%{_sysconfdir}/fedora-messaging/fedora.stg-cert.pem
Jeremy Cline 711d9cb
install -D -m 644 docs/_build/man/fedora-messaging.1 $RPM_BUILD_ROOT%{_mandir}/man1/fedora-messaging.1
65da202
install -D -m 644 fm-consumer@.service $RPM_BUILD_ROOT%{_unitdir}/fm-consumer@.service
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%check
Jeremy Cline 711d9cb
export PYTHONPATH=.
Jeremy Cline 711d9cb
pytest-3 -vv
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%files
Jeremy Cline 711d9cb
%license LICENSE
Jeremy Cline 711d9cb
%doc README.rst
Jeremy Cline 711d9cb
%config(noreplace) %{_sysconfdir}/fedora-messaging/config.toml
Jeremy Cline 0a7480d
%config(noreplace) %{_sysconfdir}/fedora-messaging/fedora.toml
Jeremy Cline dc70109
%config(noreplace) %{_sysconfdir}/fedora-messaging/fedora.stg.toml
Jeremy Cline 0a7480d
%config(noreplace) %{_sysconfdir}/fedora-messaging/cacert.pem
Jeremy Cline 0a7480d
%config(noreplace) %{_sysconfdir}/fedora-messaging/fedora-key.pem
Jeremy Cline 0a7480d
%config(noreplace) %{_sysconfdir}/fedora-messaging/fedora-cert.pem
Jeremy Cline dc70109
%config(noreplace) %{_sysconfdir}/fedora-messaging/stg-cacert.pem
Jeremy Cline dc70109
%config(noreplace) %{_sysconfdir}/fedora-messaging/fedora.stg-key.pem
Jeremy Cline dc70109
%config(noreplace) %{_sysconfdir}/fedora-messaging/fedora.stg-cert.pem
Jeremy Cline 711d9cb
%{_mandir}/man1/%{name}.*
Jeremy Cline 711d9cb
%{_bindir}/%{name}
65da202
%{_unitdir}/fm-consumer@.service
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%files -n python3-%{pkgname}
Jeremy Cline 711d9cb
%license LICENSE
Jeremy Cline 711d9cb
%{python3_sitelib}/%{srcname}
Jeremy Cline 29e2071
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%files doc
Jeremy Cline 711d9cb
%license LICENSE
87bdeba
%doc README.rst docs/*.rst docs/_build/html docs/sample_schema_package
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
%changelog
Jeremy Cline 38da1a2
* Tue Jun 25 2019 Jeremy Cline <jcline@redhat.com> - 1.7.1-1
Jeremy Cline 38da1a2
- Update to v1.7.1
Jeremy Cline 38da1a2
87bdeba
* Wed Jun 19 2019 Pavel Raiskup <praiskup@redhat.com> - 1.7.0-3
87bdeba
- install sample schema documentation cited by
87bdeba
  https://fedora-messaging.readthedocs.io/en/latest/tutorial/schemas.html
87bdeba
Jeremy Cline dc70109
* Mon Jun 10 2019 Jeremy Cline <jcline@redhat.com> - 1.7.0-2
Jeremy Cline dc70109
- Include the stage config and credentials
Jeremy Cline dc70109
Jeremy Cline 2d1f495
* Tue May 21 2019 Jeremy Cline <jcline@redhat.com> - 1.7.0-1
Jeremy Cline 2d1f495
- Update to v1.7.0
Jeremy Cline 2d1f495
Jeremy Cline 24bf850
* Wed Apr 17 2019 Jeremy Cline <jcline@redhat.com> - 1.6.1-1
Jeremy Cline 24bf850
- Update to v1.6.1
Jeremy Cline 24bf850
Jeremy Cline 0a7480d
* Thu Apr 04 2019 Jeremy Cline <jcline@redhat.com> - 1.6.0-1
Jeremy Cline 0a7480d
- Update to v1.6.0
Jeremy Cline 0a7480d
65da202
* Thu Mar 07 2019 Aurelien Bompard <abompard@fedoraproject.org> - 1.5.0-2
7f2f2de
- Update to v1.5.0
65da202
- Add the Systemd service template file.
65da202
Jeremy Cline 1a2509a
* Thu Jan 24 2019 Jeremy Cline <jeremy@jcline.org> - 1.3.0-1
Jeremy Cline 1a2509a
- Update to v1.3.0
Jeremy Cline 1a2509a
Jeremy Cline 73a2813
* Mon Jan 21 2019 Jeremy Cline <jeremy@jcline.org> - 1.2.0-1
Jeremy Cline 73a2813
- Update to v1.2.0
Jeremy Cline 73a2813
Jeremy Cline 64aefa8
* Thu Nov 15 2018 Jeremy Cline <jeremy@jcline.org> - 1.1.0-1
Jeremy Cline 64aefa8
- Update to v1.1.0
Jeremy Cline 64aefa8
Jeremy Cline d8cf09a
* Wed Oct 10 2018 Jeremy Cline <jeremy@jcline.org> - 1.0.1-1
Jeremy Cline d8cf09a
- Update to v1.0.1
Jeremy Cline d8cf09a
Jeremy Cline 856eb51
* Wed Oct 10 2018 Jeremy Cline <jeremy@jcline.org> - 1.0.0-1
Jeremy Cline 856eb51
- Update to v1.0.0
Jeremy Cline 856eb51
Jeremy Cline 711d9cb
* Fri Sep 07 2018 Jeremy Cline <jeremy@jcline.org> - 1.0.0-0.2b1
Jeremy Cline 711d9cb
- Move dependency generator macro to top of file
Jeremy Cline 711d9cb
- Depend on version + release for the library
Jeremy Cline 711d9cb
- Add python_provide macro
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
* Wed Aug 29 2018 Jeremy Cline <jeremy@jcline.org> - 1.0.0-0.1b1
Jeremy Cline 711d9cb
- Update to 1.0.0b1
Jeremy Cline 711d9cb
- Drop Python 2 package for Rawhide
Jeremy Cline 711d9cb
Jeremy Cline 711d9cb
* Wed Aug 15 2018 Aurelien Bompard <abompard@fedoraproject.org> - 1.0.0-0.1.a1
Jeremy Cline 711d9cb
- Initial package