%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: pdfposter
Version: 0.4.6
Release: 1%{?dist}
Summary: Scale and tile PDF images/pages to print on multiple pages
Group: Applications/Engineering
License: GPLv3+
URL: http://pdfposter.origo.ethz.ch/
Source0: http://download.origo.ethz.ch/%{name}/966/pdftools.%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python
BuildRequires: python-setuptools-devel
Requires: pyPdf
%description
Pdfposter can be used to create a large poster by building it from multple
pages and/or printing it on large media. It expects as input a PDF file,
normally printing on a single page. The output is again a PDF file, maybe
containing multiple pages together building the poster. The input page
will be scaled to obtain the desired size.
%prep
%setup -q -n pdftools.%{name}-%{version}
#Remove shebang
for Files in pdftools/pdfposter/cmd.py pdftools/pdfposter/__init__.py; do
%{__sed} -i.orig -e 1d ${Files}
touch -r ${Files}.orig ${Files}
%{__rm} ${Files}.orig
done
%build
python ./setup.py build
%install
rm -rf %{buildroot}
python ./setup.py install -O1 --skip-build --root=%{buildroot}
install -Dp -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING README.txt examples/
%{_mandir}/man*/*.gz
%{_bindir}/%{name}
%{python_sitelib}/pdftools*/
#%{python_sitelib}/%{name}*.egg-info
%changelog
* Thu Apr 07 2009 Fabian Affolter <fabian@bernewireless.net> - 0.4.6-1
- Initial package for Fedora