File python-gdata.spec of Package python-gdata

#
# spec file for package python-gdata (Version 2.0.13)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           python-gdata
BuildRequires:  python-devel python-setuptools
License:        Apache Software License 2.0 (ASL2)
Group:          Development/Libraries/Python
Version:        2.0.13
Release:        1
Summary:        Python library to access data through Google Data APIs
Url:            http://code.google.com/p/gdata-python-client
# http://gdata-python-client.googlecode.com/files/gdata-%{version}.tar.gz
Source:         gdata-%{version}.tar.bz2
Source99:       rpmlintrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description 
The Google data Python Client Library provides a library and source
code that make it easy to access data through Google Data APIs.

%prep
%setup -q -n gdata-%{version}

# replace python shebangs with %__python
find . -type f -exec %__sed -i -r '1s|^#! *(.+)/python(.*)$|#!%__python|' {} \;
find . -type f -exec %__sed -i -r '1s|^#! */usr/bin/env +python.*$|#!%__python|' {} \;

# remove executable perms on samples
find ./samples/ -type f -exec %__chmod 0644 {} \;

%build
%__python ./setup.py build

%install
%__python ./setup.py install \
    --prefix="%{_prefix}" \
    --root="%{buildroot}" \
    --record-rpm=files.lst

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files -f files.lst
%defattr(-,root,root)
%doc README.txt RELEASE_NOTES.txt
%doc samples/

%changelog