diff --git a/pygpgme.spec b/pygpgme.spec index 967ba99..95eacf8 100644 --- a/pygpgme.spec +++ b/pygpgme.spec @@ -2,14 +2,29 @@ Name: pygpgme Version: 0.1 -Release: 9%{?dist} +Release: 10.20090121bzr54%{?dist} Summary: Python module for working with OpenPGP messages Group: Development/Languages License: LGPLv2+ URL: http://cheeseshop.python.org/pypi/pygpgme/0.1 -Source0: http://cheeseshop.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz +# pygpgme is being developed for Ubuntu and built for Ubuntu out of +# launchpad's source control. So we need to create snapshots. +# At this time, updated packages from launchpad have fixed tests and support +# for generating keys +# +# Steps to create snapshot: +# bzr branch lp:pygpgme -r54 +# cd pygpgme +# patch -p0 < ../pygpgme-examples.patch +# python setup.py sdist +# tarball is in dist/pygpgme-0.1.tar.gz +Source0: pygpgme-0.1.tar.gz +#Source0: http://cheeseshop.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz Patch0: pygpgme-0.1-py23.patch +# Patch to make generating a tarball (sdist) work. Applied prior to creating +# the Source0. +Patch100: pygpgme-examples.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: gpgme-devel @@ -31,21 +46,34 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT +chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/gpgme/_gpgme.so -# No need to ship the tests -rm -rf $RPM_BUILD_ROOT%{python_sitearch}/gpgme/tests/ - %clean rm -rf $RPM_BUILD_ROOT +### Can't enable the tests because they depend on importing a private key. +# gpg2 on which our gpgme library depends does not import private keys so this +# won't work. The issue in the real world is not so big as we don't +# manipulate private keys outside of a keyring that often. +#%check +# Use the installed gpgme because it has the built compiled module +#mv gpgme gpgme.bak +#ln -s $RPM_BUILD_ROOT%{python_sitearch}/gpgme . +#python test_all.py %files %defattr(-,root,root,-) %doc README PKG-INFO %{python_sitearch}/* +# No need to ship the tests +%exclude %{python_sitearch}/gpgme/tests/ + %changelog +* Wed Jan 21 2009 Toshio Kuratomi - 0.1-10.20090121bzr54 +- Update to upstream snapshot. + * Fri Nov 28 2008 Ignacio Vazquez-Abrams - 0.1-9 - Rebuild for Python 2.6 diff --git a/sources b/sources index ff5b43a..20a12c2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0878d866b6ee8a98a9003a81934ecee3 pygpgme-0.1.tar.gz +8e5abdf0ec34c48ad6f9a42697704917 pygpgme-0.1.tar.gz