File pdftk.spec of Package pdftk

#
# spec file for package pdftk (Version 1.41)
#
# Copyright (c) 2008 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:           pdftk
Summary:        The PDF Toolkit
Version:        1.41
Release:        102
License:        GPL v2 or later
Url:            http://www.pdfhacks.com/pdftk/
Source0:        %{name}-%{version}.tar.bz2
Patch0:         Makefiles.patch
Patch1:         remove-postscript.patch
Patch2:         pdftk-no_gnu_local.patch
Patch3:         bug-427046_pdftk.cc.patch
Group:          Productivity/Publishing/PDF
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  dos2unix gcc-c++ gcc-java
#%if %suse_version > 1100
#BuildRequires:  dos2unix gcc-c++ java2-devel-packages java-1_5_0-sun-devel
## java-1_6_0-sun-devel
#%else
#BuildRequires:  dos2unix gcc-c++ gcc-java
#%endif

%description
Pdftk is a command line tool for manipulating PDF documents. Use it to
merge PDF files, split PDF pages into a new document, decrypt input as
necessary (password required) or encrypt output as desired. It allows
you as well to fill PDF forms with FDF data, flatten forms, apply a
background watermark, repair a corrupted PDF (where possible), and much
more.



Authors:
--------
    Sid Steward

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3 -p1

%build
%{suse_update_config -fl}
unset CLASSPATH && cd pdftk && make -f Makefile.RedHat && cd -
dos2unix pdftk.1.notes

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
install -m 0755 pdftk/pdftk $RPM_BUILD_ROOT/%{_bindir}/pdftk
install -m 0644 debian/pdftk.1 $RPM_BUILD_ROOT/%{_mandir}/man1/pdftk.1
gzip $RPM_BUILD_ROOT/%{_mandir}/man1/pdftk.1

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc pdftk.1.html  pdftk.1.notes  pdftk.1.txt
%{_bindir}/*
%{_mandir}/man1/*

%changelog
* Tue Oct 28 2008 ro@suse.de
- fix patch to apply (directory depth)
* Sun Oct 26 2008 bwalle@suse.de
- Add another JvInitClass() to last patch.
* Mon Oct 13 2008 toms@suse.de
- Integrated patch bnc#427046 from Bernhard Walle. Thanks, Bernhard!
* Mon Jan 14 2008 ro@suse.de
- took some of the current debian patch to make it build
* Tue Aug 21 2007 toms@suse.de
- Removed java_libs/com/lowagie/text/pdf/HyphenationAuto.java
  due to licensing issues
* Fri Aug 17 2007 toms@suse.de
- Removed pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/
  due to licensing issues
* Fri Aug 03 2007 bwalle@suse.de
- update to 1.41 (#294793)
  o changes from 1.40 to 1.41
  · Fixed a bug that corrupted output PDF xref tables.
  · Fixed a bug that prevented XFDF form data from being passed
  to pdftk via stdin.
  o changes from 1.12 to 1.40
  · Added the stamp operation
  · Added the page rotating patch
  · Added the generate_fdf patch
  · The fill_form operation can now take XFDF data as well as FDF
  data.
  · Added the drop_xfa option
  · Added the keep_first_id and keep_final_id options
  · Upgraded the iText library
  · Added the -O2 optimizing switch to Makefile
  · Fixed a bug that caused pdftk to create bloated PDFs when
  input PDF pages had links on their pages.
  · Added License-Adobe.txt to the fonts folder
- fix line endings in pdftk.1.notes (rpmlint)
* Wed Jun 27 2007 rguenther@suse.de
- remove libgcj requires
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Nov 02 2005 dmueller@suse.de
- don't build as root
* Mon Aug 22 2005 skh@suse.de
- Fix build.
* Wed Jan 26 2005 ke@suse.de
- New package proposed by Thomas Schraitle; version 1.12.
openSUSE Build Service is sponsored by