openmamba logo
Distribuzione GNU/Linux
distribuzione community wiki forum anomalie eventi prodotti
software   comunità wiki forum anomalie eventi prodotti
packages python-gpgme.spec
      Pagine: < 1 >  SCARICA      
Name:          python-gpgme
Version:       0.1
Release:       1mamba
Summary:       A Python module for working with OpenPGP messages
Group:         System/Libraries/Python
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           https://launchpad.net/pygpgme
# from Fedora
# 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 -r68
# cd pygpgme
# patch -p0 < ../pygpgme-examples.patch
# python setup.py sdist
# tarball is in dist/pygpgme-0.1.tar.gz

Source:        pygpgme-%{version}.tar.gz
# from Fedora
# Patch to make generating a tarball (sdist) work. Applied prior to creating
# the Source0.
Patch0:        pygpgme-examples.patch
License:       LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgpgme-devel
BuildRequires: libpython-devel
BuildRequires: python
## AUTOBUILDREQ-END
Requires:      python >= %python_version
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
PyGPGME is a Python module that lets you sign, verify, encrypt and
decrypt messages using the OpenPGP format. It is built on top of the
GNU Privacy Guard and the GPGME library.

%prep

%setup -q -n pygpgme-%{version}

for p in $(find . -name "*.py"); do
   	sed -i 's|#!python|#!%{__python}|' $p
   	sed -i 's|#! python|#!%{__python}|' $p
   	sed -i 's|#!/usr/bin/python|#!%{__python}|' $p
   	sed -i 's|#!/usr/bin/env python|#!%{__python}|' $p
   	sed -i 's|#! /usr/bin/env python|#!%{__python}|' $p
done

%build
CFLAGS="%{optflags}" %{__python} setup.py build

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install --skip-build --root %{buildroot}

chmod 0755 %{buildroot}%{python_sitearch}/gpgme/_gpgme.so

mv %{buildroot}%{python_sitearch}/gpgme/tests/ .

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{python_sitearch}/pygpgme-%{version}-py%{python_version}.egg-info
%dir %{python_sitearch}/gpgme
%{python_sitearch}/gpgme/*.py*
%{python_sitearch}/gpgme/_gpgme.so
%doc README PKG-INFO examples tests

%changelog
* Thu Aug 05 2010 gil <puntogil@...> 0.1-1mamba
- package created by autospec