%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           pyPdf
Version:        1.13
Release:        2%{?_dist_release}
Summary:        PDF toolkit
Summary(ja):    PDF ツールキット

Group:          Development/Languages
License:        BSD
URL:            http://pybrary.net/pyPdf/
Source0:        http://pybrary.net/pyPdf/%{name}-%{version}.tar.gz
#Patch0:         01_backspace_parsed.dpatch

BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildArch:      noarch
BuildRequires:  python-devel

%description
A Pure-Python library built as a PDF toolkit. It is capable of:
 * extracting document information (title, author, ...),
 * splitting documents page by page,
 * merging documents page by page,
 * cropping pages,
 * merging multiple pages into a single page,
 * encrypting and decrypting PDF files.

%prep
%setup -q
#%patch0 -p1


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README CHANGELOG
%{python_sitelib}/pyPdf*


%changelog
* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.13-2
- rebuild with python-2.7.2

* Sat Feb 12 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.13-1
- new upstream release
- dropt Patch0 to merge upstream

* Tue May 25 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.12-2
- added Pacth0 from Debian to fix incorrect backspace parse

* Thu Feb 11 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.12-1
- initial build for VineSeed

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.12-2
- Rebuild for Python 2.6

* Mon Sep 15 2008 Felix Schwarz <felix.schwarz@oss.schwarz.eu> 1.12-1
- update to 1.12

* Sun Jun 15 2008 Felix Schwarz <felix.schwarz@oss.schwarz.eu> 1.11-1
- update to 1.11

* Tue Apr 01 2008 Felix Schwarz <felix.schwarz@oss.schwarz.eu> 1.10-4
- added CHANGELOG to doc, more specific file list

* Thu Mar 27 2008 Felix Schwarz <felix.schwarz@oss.schwarz.eu> 1.10-3
- removed unnecessary python_sitearch macro declaration

* Tue Mar 25 2008 Felix Schwarz <felix.schwarz@oss.schwarz.eu> 1.10-2
- fixed spec file naming and license tag

* Tue Mar 25 2008 Felix Schwarz <felix.schwarz@oss.schwarz.eu> 1.10-1
- Initial spec file creation

