commit d33e51a835dae0bb7aea0c9146d8a00f02cb0b90 Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:50:42 2019 +0800 Package init diff --git a/M2Crypto-0.30.1.tar.gz b/M2Crypto-0.30.1.tar.gz new file mode 100644 index 0000000..4496391 Binary files /dev/null and b/M2Crypto-0.30.1.tar.gz differ diff --git a/M2Crypto-0.30.1.tar.gz.asc b/M2Crypto-0.30.1.tar.gz.asc new file mode 100644 index 0000000..c48a3e3 --- /dev/null +++ b/M2Crypto-0.30.1.tar.gz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iEYEABECAAYFAlrmE1EACgkQ4J/vJdlkhKzYywCfV3GLZgO0v0ZOUe9y/4QXjAmg +sdoAn0p72Wwr/265N/ls32MzZiILAtQi +=suDd +-----END PGP SIGNATURE----- diff --git a/m2crypto.spec b/m2crypto.spec new file mode 100644 index 0000000..cde2926 --- /dev/null +++ b/m2crypto.spec @@ -0,0 +1,70 @@ +Name: m2crypto +Summary: A crypto and SSL toolkit for Python +Version: 0.30.1 +Release: 3 +License: MIT +URL: https://gitlab.com/m2crypto/m2crypto/ +Source0: https://files.pythonhosted.org/packages/41/50/7d85dc99b1c4f29eca83873d851ec29a8e484a66b31351e62e30be9db7d1/M2Crypto-0.30.1.tar.gz +Source1: https://files.pythonhosted.org/packages/41/50/7d85dc99b1c4f29eca83873d851ec29a8e484a66b31351e62e30be9db7d1/M2Crypto-0.30.1.tar.gz.asc + +Requires: python2-typing + +BuildRequires: openssl openssl-devel perl-interpreter pkgconfig python2-typing swig which +BuildRequires: python3-devel python3-setuptools python2-devel python2-setuptools + +%description +M2Crypto is a crypto and SSL toolkit for Python. It allows you to call OpenSSL functions from Python2 scripts. + +%package -n python3-m2crypto +Summary: A crypto and SSL toolkit for Python3 + +%description -n python3-m2crypto +python3-m2crypto is a crypto and SSL toolkit for Python3. It allows you to call OpenSSL functions from Python3 scripts. + +%prep +%autosetup -n M2Crypto-%{version} -c -p1 + +cp -a M2Crypto-%{version} M2Crypto-python3 + +%build +export CFLAGS="$RPM_OPT_FLAGS" +if pkg-config openssl ; then + export CFLAGS="$CFLAGS `pkg-config --cflags openssl`" + export LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" +fi + +cd M2Crypto-%{version} +%{__python2} setup.py build + +cd ../M2Crypto-python3 +%{__python3} setup.py build + +%install +cd M2Crypto-%{version} +%{__python2} setup.py install --root=$RPM_BUILD_ROOT + +cd ../M2Crypto-python3 +%{__python3} setup.py install --root=$RPM_BUILD_ROOT + +%check +%if 0%{?_with_check} +cd M2Crypto-%{version} +%{__python2} setup.py test + +cd ../M2Crypto-python3 +%{__python3} setup.py test +%endif + +%files +%doc M2Crypto-%{version}/{CHANGES,LICENCE,README.rst} +%{python2_sitearch}/M2Crypto +%{python2_sitearch}/M2Crypto-*.egg-info + +%files -n python3-m2crypto +%doc M2Crypto-python3/{CHANGES,LICENCE,README.rst} +%{python3_sitearch}/M2Crypto +%{python3_sitearch}/M2Crypto-*.egg-info + +%changelog +* Wed Nov 06 2019 Lijin Yang - 0.30.1-3 +- init package