496d958
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
cvsdist 50f04da
a57c80d
# Keep this value in sync with the definition in openssl.spec.
a57c80d
%define multilib_arches %{ix86} ia64 ppc ppc64 s390 s390x x86_64
a57c80d
496d958
Summary: Support for using OpenSSL in python scripts
cvsdist 50f04da
Name: m2crypto
83ec2ba
Version: 0.18.2
adeb065
Release: 3
79c3b0b
Source0: http://wiki.osafoundation.org/pub/Projects/MeTooCrypto/m2crypto-%{version}.tar.gz
7f963cc
Patch0: m2crypto-0.18-timeouts.patch
bfe6dc0
Patch1: m2crypto-0.18-proxy.patch
bfe6dc0
License: MIT
cvsdist 50f04da
Group: System Environment/Libraries
496d958
URL: http://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto
496d958
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
496d958
BuildRequires: openssl-devel, python-devel
83ec2ba
BuildRequires: perl, pkgconfig, swig
bb7c1fb
Requires: python
cvsdist 50f04da
cvsdist 50f04da
%description
cvsdist 50f04da
This package allows you to call OpenSSL functions from python scripts.
cvsdist 50f04da
cvsdist 50f04da
%prep
02058aa
%setup -q
269144a
%patch0 -p1
bfe6dc0
%patch1 -p0
79c3b0b
79c3b0b
# Red Hat opensslconf.h #includes an architecture-specific file, but SWIG
79c3b0b
# doesn't follow the #include.
79c3b0b
79c3b0b
# Determine which arch opensslconf.h is going to try to #include.
79c3b0b
basearch=%{_arch}
79c3b0b
%ifarch %{ix86}
79c3b0b
basearch=i386
79c3b0b
%endif
a57c80d
%ifarch %{multilib_arches}
79c3b0b
sed -i -e "s/opensslconf/opensslconf-${basearch}/" SWIG/_ec.i
a57c80d
%endif
cvsdist 76d4e75
cvsdist 76d4e75
%build
66d846d
CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS
cvsdist 76d4e75
if pkg-config openssl ; then
cvsdist 76d4e75
	CFLAGS="$CFLAGS `pkg-config --cflags openssl`" ; export CFLAGS
cvsdist 76d4e75
	LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" ; export LDFLAGS
cvsdist 76d4e75
fi
cvsdist 76d4e75
d3babca
# -cpperraswarn is necessary for including opensslconf-${basearch} directly
496d958
SWIG_FEATURES=-cpperraswarn python setup.py build
cvsdist 50f04da
cvsdist 50f04da
%install
cvsdist 76d4e75
rm -rf $RPM_BUILD_ROOT
cvsdist 76d4e75
66d846d
CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS
cvsdist 76d4e75
if pkg-config openssl ; then
cvsdist 76d4e75
	CFLAGS="$CFLAGS `pkg-config --cflags openssl`" ; export CFLAGS
cvsdist 76d4e75
	LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" ; export LDFLAGS
cvsdist 76d4e75
fi
cvsdist 76d4e75
496d958
python setup.py install --root=$RPM_BUILD_ROOT
cvsdist 50f04da
b26e3f2
for i in medusa medusa054; do
b26e3f2
	sed -i -e '1s,#! /usr/local/bin/python,#! /usr/bin/python,' \
b26e3f2
		demo/$i/http_server.py
b26e3f2
done
b26e3f2
b26e3f2
# Windows-only
b26e3f2
rm demo/Zope/starts.bat
b26e3f2
cvsdist 50f04da
%clean
496d958
rm -rf $RPM_BUILD_ROOT
cvsdist 50f04da
cvsdist 50f04da
%files
cvsdist 50f04da
%defattr(-,root,root)
79c3b0b
%doc CHANGES LICENCE README demo tests
496d958
%{python_sitearch}/M2Crypto
adeb065
%{python_sitearch}/M2Crypto-*.egg-info
cvsdist 50f04da
cvsdist 76d4e75
%changelog
adeb065
* Fri Jan 11 2008 Miloslav Trmač <mitr@redhat.com> - 0.18.2-3
adeb065
- Ship Python egg information
adeb065
c75e699
* Tue Dec  4 2007 Miloslav Trmač <mitr@redhat.com> - 0.18.2-2
c75e699
- Rebuild with openssl-0.9.8g
c75e699
83ec2ba
* Fri Oct 26 2007 Miloslav Trmač <mitr@redhat.com> - 0.18.2-1
83ec2ba
- Update to m2crypto-0.18.2
83ec2ba
- Remove BuildRequires: unzip
83ec2ba
bfe6dc0
* Sun Sep 23 2007 Miloslav Trmač <mitr@redhat.com> - 0.18-2
bfe6dc0
- Add missing Host: header to CONNECT requests (patch by Karl Grindley)
bfe6dc0
  Resolves: #239034
bfe6dc0
- Fix License:
bfe6dc0
7f963cc
* Wed Aug  1 2007 Miloslav Trmač <mitr@redhat.com> - 0.18-1
7f963cc
- Update to m2crypto-0.18
7f963cc
a57c80d
* Wed Jul 11 2007 Miloslav Trmač <mitr@redhat.com> - 0.17-3
a57c80d
- Try to fix build on Alpha
a57c80d
  Resolves: #246828
a57c80d
2a9f58b
* Fri Apr 27 2007 Miloslav Trmac <mitr@redhat.com> - 0.17-2
2a9f58b
- Make m2xmlrpclib work with Python 2.5
2a9f58b
  Resolves: #237902
2a9f58b
af9de46
* Wed Jan 17 2007 Miloslav Trmac <mitr@redhat.com> - 0.17-1
af9de46
- Update to m2crypto-0.17
af9de46
- Update for Python 2.5
af9de46
218f0d1
* Thu Dec  7 2006 Miloslav Trmac <mitr@redhat.com> - 0.16-8
218f0d1
- Rebuild with updated build tools to avoid DT_TEXTREL on s390x
218f0d1
  Resolves: #218578
218f0d1
e4ccfbb
* Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 0.16-7
e4ccfbb
- rebuild against python 2.5
e4ccfbb
a6a4df8
* Mon Oct 23 2006 Miloslav Trmac <mitr@redhat.com> - 0.16-6
a6a4df8
- Add support for SSL socket timeouts (based on a patch by James Bowes
a6a4df8
  <jbowes@redhat.com>)
a6a4df8
  Resolves: #219966
a6a4df8
269144a
* Fri Oct 20 2006 Miloslav Trmac <mitr@redhat.com> - 0.16-5
269144a
- Backport the urllib2 wrapper (code by James Bowes <jbowes@redhat.com>)
73cd691
  Resolves: #210956
73cd691
- Add proxy support for https using CONNECT (original patch by James Bowes
73cd691
  <jbowes@redhat.com>)
73cd691
  Resolves: #210963
269144a
b26e3f2
* Tue Sep 26 2006 Miloslav Trmac <mitr@redhat.com> - 0.16-4
b26e3f2
- Drop Obsoletes: openssl-python, openssl-python was last shipped in RHL 7.1
b26e3f2
- Fix interpreter paths in demos
b26e3f2
496d958
* Sat Sep 23 2006 Miloslav Trmac <mitr@redhat.com> - 0.16-3
496d958
- Make more compliant with Fedora guidelines
496d958
- Update URL:
496d958
2b42a91
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.16-2.1
2b42a91
- rebuild
2b42a91
d3babca
* Thu Jul  6 2006 Miloslav Trmac <mitr@redhat.com> - 0.16-2
d3babca
- Fix build with rawhide swig
d3babca
79c3b0b
* Thu Jul  6 2006 Miloslav Trmac <mitr@redhat.com> - 0.16-1
79c3b0b
- Update to m2crypto-0.16
79c3b0b
da62245
* Wed Apr 19 2006 Miloslav Trmac <mitr@redhat.com> - 0.15-4
da62245
- Fix SSL.Connection.accept (#188742)
da62245
83bc62c
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.15-3.2
83bc62c
- bump again for double-long bug on ppc(64)
83bc62c
378bc98
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.15-3.1
378bc98
- rebuilt for new gcc4.1 snapshot and glibc changes
378bc98
d196d06
* Tue Jan  3 2006 Miloslav Trmac <mitr@redhat.com> - 0.15-3
d196d06
- Add BuildRequires: swig
d196d06
3197fd9
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
3197fd9
- rebuilt
3197fd9
02058aa
* Wed Nov  9 2005 Miloslav Trmac <mitr@redhat.com> - 0.15-2
02058aa
- Rebuild with newer openssl
02058aa
bb7c1fb
* Mon Aug 29 2005 Miloslav Trmac <mitr@redhat.com> - 0.15-1
bb7c1fb
- Update to m2crypto-0.15
bb7c1fb
- Drop bundled swig
bb7c1fb
9e6ff18
* Tue Jun 14 2005 Miloslav Trmac <mitr@redhat.com> - 0.13-5
9e6ff18
- Better fix for #159898, by Dan Williams
9e6ff18
b835d66
* Thu Jun  9 2005 Miloslav Trmac <mitr@redhat.com> - 0.13-4
02058aa
- Fix invalid handle_error override in SSL.SSLServer (#159898, patch by Dan
b835d66
  Williams)
b835d66
66d846d
* Tue May 31 2005 Miloslav Trmac <mitr@redhat.com> - 0.13-3
66d846d
- Fix invalid Python version comparisons in M2Crypto.httpslib (#156979)
66d846d
- Don't ship obsolete xmlrpclib.py.patch
66d846d
- Clean up the build process a bit
66d846d
528b4ac
* Wed Mar 16 2005 Nalin Dahyabhai <nalin@redhat.com> 0.13-2
528b4ac
- rebuild
528b4ac
02058aa
* Tue Nov 23 2004 Karsten Hopp <karsten@redhat.de> 0.13-1
d7aa90d
- update, remove now obsolete patches
d7aa90d
c5f89e7
* Mon Nov 22 2004 Karsten Hopp <karsten@redhat.de> 0.09-7
c5f89e7
- changed pythonver from 2.3 to 2.4
c5f89e7
cvsdist eb04a01
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
cvsdist eb04a01
- rebuilt
cvsdist eb04a01
cvsdist 323ae95
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
cvsdist 323ae95
- rebuilt
cvsdist 323ae95
cvsdist 323ae95
* Tue Feb 24 2004 Harald Hoyer <harald@redhat.com> - 0.09-5
cvsdist 323ae95
- changed pythonver from 2.2 to 2.3
cvsdist 323ae95
- patched setup.py to cope with include path
cvsdist 323ae95
cvsdist 323ae95
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
cvsdist 323ae95
- rebuilt
cvsdist 323ae95
cvsdist 165495d
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
cvsdist 165495d
- rebuilt
cvsdist 165495d
cvsdist 76d4e75
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
cvsdist 76d4e75
- rebuilt
cvsdist 50f04da
cvsdist 76d4e75
* Tue Jan 14 2003 Nalin Dahyabhai <nalin@redhat.com> 0.09-1
cvsdist 76d4e75
- Update to version 0.09
cvsdist 76d4e75
- Build using bundled copy of SWIG
cvsdist 76d4e75
- Pick up additional CFLAGS and LDFLAGS from OpenSSL's pkgconfig data, if
cvsdist 76d4e75
  there is any
cvsdist 76d4e75
- Handle const changes in new OpenSSL
cvsdist 76d4e75
- Remove unnecessary ldconfig calls in post/postun
cvsdist 76d4e75
cvsdist 76d4e75
* Thu Dec 12 2002 Elliot Lee <sopwith@redhat.com> 0.07_snap3-2
cvsdist 76d4e75
- Update to version 0.07_snap3
cvsdist 50f04da
cvsdist 76fed79
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
cvsdist 76fed79
- automated rebuild
cvsdist 76fed79
cvsdist b3332c6
* Sun May 26 2002 Tim Powers <timp@redhat.com>
cvsdist b3332c6
- automated rebuild
cvsdist b3332c6
cvsdist b3332c6
* Mon May 20 2002 Nalin Dahyabhai <nalin@redhat.com> 0.05_snap4-4
cvsdist b3332c6
- rebuild with Python 2.2
cvsdist b3332c6
cvsdist b3332c6
* Wed Apr 24 2002 Nalin Dahyabhai <nalin@redhat.com> 0.05_snap4-3
cvsdist b3332c6
- remove a stray -L at link-time which prevented linking with libssl (#59985)
cvsdist b3332c6
cvsdist b3332c6
* Thu Aug 23 2001 Nalin Dahyabhai <nalin@redhat.com> 0.05_snap4-2
cvsdist 4492860
- drop patch which isn't needed because we know swig is installed
cvsdist 4492860
cvsdist b3332c6
* Mon Apr  9 2001 Nalin Dahyabhai <nalin@redhat.com> 0.05_snap4-1
cvsdist 50f04da
- break off from openssl-python