diff --git a/.gitignore b/.gitignore index e69de29..da20be6 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/m2ext-0.1.tar.gz diff --git a/python-m2ext.spec b/python-m2ext.spec new file mode 100644 index 0000000..dc5d36a --- /dev/null +++ b/python-m2ext.spec @@ -0,0 +1,60 @@ +%{!?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: 1%{?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 +* Wed Jun 20 2012 Ralph Bean - 0.1-1 +- initial package for Fedora diff --git a/sources b/sources index e69de29..40aae1d 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5b8e448a74a84f8047b8d0713b05bf85 m2ext-0.1.tar.gz