diff --git a/.gitignore b/.gitignore index e69de29..b8c23e6 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/signedjson-1.0.0.tar.gz diff --git a/python-signedjson.spec b/python-signedjson.spec new file mode 100644 index 0000000..8e2a29d --- /dev/null +++ b/python-signedjson.spec @@ -0,0 +1,95 @@ +%bcond_without check + +%global modname signedjson + +Name: python-%{modname} +Version: 1.0.0 +Release: 1%{?dist} +Summary: Sign JSON with Ed25519 signatures + +License: ASL 2.0 +URL: https://github.com/matrix-org/python-signedjson +Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz + +BuildArch: noarch + +%global _description \ +Features:\ +* More than one entity can sign the same object.\ +* Each entity can sign the object with more than one key making it easier\ + to rotate keys\ +* ED25519 can be replaced with a different algorithm.\ +* Unprotected data can be added to the object under the "unsigned" key. + +%description %{_description} + +%package -n python2-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{modname}} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +%if %{with check} +BuildRequires: python2-nose +BuildRequires: python2-canonicaljson +BuildRequires: python2-unpaddedbase64 +BuildRequires: python2-pynacl +%endif +Requires: python2-canonicaljson +Requires: python2-unpaddedbas64 +Requires: python2-pynacl + +%description -n python2-%{modname} %{_description} + +Python 2 version. + +%package -n python3-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{modname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%if %{with check} +BuildRequires: python3-nose +BuildRequires: python3-canonicaljson +BuildRequires: python3-unpaddedbase64 +BuildRequires: python3-pynacl +%endif +Requires: python3-canonicaljson +Requires: python3-unpaddedbas64 +Requires: python3-pynacl + +%description -n python3-%{modname} %{_description} + +Python 3 version. + +%prep +%autosetup + +%build +%py2_build +%py3_build + +%install +%py2_install +%py3_install + +%if %{with check} +%check +nosetests-%{python2_version} -v +nosetests-%{python3_version} -v +%endif + +%files -n python2-%{modname} +%license LICENSE +%doc README.rst +%{python2_sitelib}/%{modname}-*.egg-info/ +%{python2_sitelib}/%{modname}/ + +%files -n python3-%{modname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{modname}-*.egg-info/ +%{python3_sitelib}/%{modname}/ + +%changelog +* Mon Dec 19 2016 Igor Gnatenko - 1.0.0-1 +- Initial package diff --git a/sources b/sources index e69de29..9bab191 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (signedjson-1.0.0.tar.gz) = 6a51ca901149c653a0da4567e2487fcf737cf36ac51cc337b0af9422261ee3689a99a4fd4c7ffd0ec0c4ef0c97033d78030dd6fab80e11e86371151279d5d6c4