%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from %distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %global modname m2ext # The pkgconfig bit in this spec file was taken from m2crypto.spec # https://apps.fedoraproject.org/packages/m2crypto/sources/spec/ Name: python-m2ext Version: 0.1 Release: 4%{?dist} Summary: M2Crypto Extensions Group: Development/Languages License: BSD URL: http://pypi.python.org/pypi/%{modname} Source0: http://pypi.python.org/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: openssl-devel BuildRequires: swig BuildRequires: pkgconfig BuildRequires: m2crypto Requires: m2crypto %filter_provides_in %{python_sitearch}/%{modname}/_m2ext.so %filter_setup %description This package contains some extended functions which are not (yet) available in M2Crypto http://chandlerproject.org/Projects/MeTooCrypto> trunk. %prep %setup -q -n %{modname}-%{version} %build CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS if pkg-config openssl ; then CFLAGS="$CFLAGS `pkg-config --cflags openssl`" ; export CFLAGS LDFLAGS="$LDFLAGS`pkg-config --libs-only-L openssl`" ; export LDFLAGS fi %{__python} setup.py build %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} chmod 755 %{buildroot}/%{python_sitearch}/%{modname}/_m2ext.so %files %doc README.rst LICENSE %{python_sitearch}/%{modname} %{python_sitearch}/%{modname}-%{version}* %changelog * Sun Aug 04 2013 Fedora Release Engineering - 0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed Jun 20 2012 Ralph Bean - 0.1-1 - initial package for Fedora