65b3e52d9f
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
172 lines
5.5 KiB
RPMSpec
172 lines
5.5 KiB
RPMSpec
%global srcname synapse
|
|
|
|
Name: matrix-%{srcname}
|
|
Version: 0.22.1
|
|
Release: 3%{?dist}
|
|
Summary: A Matrix reference homeserver written in Python using Twisted
|
|
License: ASL 2.0
|
|
URL: https://github.com/matrix-org/%{srcname}
|
|
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
|
|
Source1: synapse.sysconfig
|
|
# Upstream pins its version of pynacl:
|
|
# https://github.com/matrix-org/synapse/issues/1642
|
|
Patch0: 0001-Remove-the-strict-version-requirement-for-pynacl.patch
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python2-setuptools
|
|
BuildRequires: python2-sphinx
|
|
BuildRequires: python2-bcrypt
|
|
BuildRequires: python2-pyOpenSSL >= 0.14
|
|
BuildRequires: python2-bleach >= 1.4.2
|
|
BuildRequires: python-blist
|
|
BuildRequires: python2-canonicaljson >= 1.0.0
|
|
BuildRequires: python2-daemonize
|
|
BuildRequires: python2-frozendict >= 0.4
|
|
BuildRequires: python2-jinja2 >= 2.8
|
|
BuildRequires: python2-jsonschema
|
|
BuildRequires: python2-lxml
|
|
BuildRequires: python2-matrix-synapse-ldap3 >= 0.1
|
|
BuildRequires: python2-msgpack
|
|
BuildRequires: python2-netaddr >= 0.7.18
|
|
BuildRequires: python2-phonenumbers
|
|
BuildRequires: python2-pillow
|
|
BuildRequires: python2-psutil >= 2.0.0
|
|
BuildRequires: python2-pyasn1
|
|
BuildRequires: python2-pydenticon
|
|
BuildRequires: python2-pymacaroons-pynacl
|
|
BuildRequires: python2-pynacl >= 0.3.0
|
|
BuildRequires: python2-pysaml2 >= 3.0.0
|
|
BuildRequires: python2-service-identity >= 1.0.0
|
|
BuildRequires: python2-signedjson >= 1.0.0
|
|
BuildRequires: python2-systemd
|
|
BuildRequires: python2-twisted >= 16.0.0
|
|
BuildRequires: python2-ujson
|
|
BuildRequires: python2-unpaddedbase64 >= 1.1.0
|
|
BuildRequires: python2-yaml
|
|
BuildRequires: systemd
|
|
BuildRequires: python2-mock
|
|
|
|
Requires: python2-bcrypt
|
|
Requires: python2-pyOpenSSL >= 0.14
|
|
Requires: python2-bleach >= 1.4.2
|
|
Requires: python-blist
|
|
Requires: python2-canonicaljson >= 1.0.0
|
|
Requires: python2-daemonize
|
|
Requires: python2-frozendict >= 0.4
|
|
Requires: python2-jinja2 >= 2.8
|
|
Requires: python2-jsonschema
|
|
Requires: python2-lxml
|
|
Requires: python2-matrix-synapse-ldap3 >= 0.1
|
|
Requires: python2-msgpack
|
|
Requires: python2-netaddr >= 0.7.18
|
|
Requires: python2-phonenumbers
|
|
Requires: python2-pillow
|
|
Requires: python2-psutil >= 2.0.0
|
|
Requires: python2-pyasn1
|
|
Requires: python2-pydenticon
|
|
Requires: python2-pymacaroons-pynacl
|
|
Requires: python2-pynacl >= 0.3.0
|
|
Requires: python2-pysaml2 >= 3.0.0
|
|
Requires: python2-service-identity >= 1.0.0
|
|
Requires: python2-signedjson >= 1.0.0
|
|
Requires: python2-systemd
|
|
Requires: python2-twisted >= 16.0.0
|
|
Requires: python2-ujson
|
|
Requires: python2-unpaddedbase64 >= 1.1.0
|
|
Requires: python2-yaml
|
|
Requires(pre): shadow-utils
|
|
Requires: systemd
|
|
%{?systemd_requires}
|
|
|
|
%description
|
|
Matrix is an ambitious new ecosystem for open federated Instant Messaging and
|
|
VoIP. Synapse is a reference "homeserver" implementation of Matrix from the
|
|
core development team at matrix.org, written in Python/Twisted. It is intended
|
|
to showcase the concept of Matrix and let folks see the spec in the context of
|
|
a coded base and let you run your own homeserver and generally help bootstrap
|
|
the ecosystem.
|
|
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{srcname}-%{version}
|
|
|
|
# We don't support the built-in client so remove all the bundled JS.
|
|
rm -rf synapse/static
|
|
|
|
|
|
%build
|
|
%py2_build
|
|
|
|
|
|
%install
|
|
%py2_install
|
|
|
|
install -p -D -T -m 0644 contrib/systemd/log_config.yaml %{buildroot}%{_sysconfdir}/synapse/log_config.yaml
|
|
install -p -D -T -m 0644 contrib/systemd/synapse.service %{buildroot}%{_unitdir}/synapse.service
|
|
install -p -D -T -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/synapse
|
|
install -p -d -m 755 %{buildroot}/%{_sharedstatedir}/synapse
|
|
|
|
|
|
%check
|
|
PYTHONPATH=. trial tests
|
|
|
|
|
|
%pre
|
|
getent group synapse >/dev/null || groupadd -r synapse
|
|
getent passwd synapse >/dev/null || \
|
|
useradd -r -g synapse -d %{_sharedstatedir}/synapse -s /sbin/nologin \
|
|
-c "The user for the Synapse Matrix server" synapse
|
|
exit 0
|
|
|
|
%post
|
|
%systemd_post synapse.service
|
|
|
|
%preun
|
|
%systemd_preun synapse.service
|
|
|
|
%postun
|
|
%systemd_postun_with_restart synapse.service
|
|
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc *.rst
|
|
%dir %{_sysconfdir}/synapse
|
|
%config(noreplace) %{_sysconfdir}/synapse/*
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/synapse
|
|
%{python2_sitelib}/synapse/
|
|
%{python2_sitelib}/matrix_synapse*.egg-info/
|
|
%{_bindir}/*
|
|
%{_unitdir}/synapse.service
|
|
%attr(755,synapse,synapse) %dir %{_sharedstatedir}/synapse
|
|
|
|
|
|
%changelog
|
|
* Wed Aug 09 2017 Gwyn Ciesla <limburgher@gmail.com> - 0.22.1-3
|
|
- Switch to python-bcrypt, BZ 1473018.
|
|
|
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.1-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
* Mon Jul 10 2017 Jeremy Cline <jeremy@jcline.org> - 0.22.1-1
|
|
- Update to the latest upstream release
|
|
|
|
* Thu Jul 06 2017 Jeremy Cline <jeremy@jcline.org> - 0.22.0-1
|
|
- Update to the latest upstream release (#1462045)
|
|
|
|
* Fri Jun 23 2017 Jeremy Cline <jeremy@jcline.org> - 0.21.1-1
|
|
- Update to latest upstream release
|
|
|
|
* Tue May 30 2017 Jeremy Cline <jeremy@jcline.org> - 0.19.3-4
|
|
- use _sharedstatedir rather than _localstatedir
|
|
|
|
* Wed May 17 2017 Jeremy Cline <jeremy@jcline.org> - 0.19.3-3
|
|
- Remove bundled JS
|
|
- Fix some typos in the summary and description
|
|
|
|
* Tue Apr 04 2017 Jeremy Cline <jeremy@jcline.org> - 0.19.3-2
|
|
- Remove the duplicate requirement on pysaml
|
|
|
|
* Tue Mar 28 2017 Jeremy Cline <jeremy@jcline.org> - 0.19.3-1
|
|
- Initial package
|