%define name pdftk %define version 1.41 %define distro RedHat %define gcj_version $(gcj --version | head -n 1 | awk '{print $3}') Summary: Pdftk stand for Pdf Tool Kit Name: %{name} Version: %{version} Release: 1%{?dist} Source0: %{name}-%{version}.tar.bz2 License: GPL Group: Publishing Url: http://www.accesspdf.com/pdftk/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: libgcj-devel BuildRequires: gcc-java > 3 %description Pdftk is a simple tool for doing everyday things with PDF documents. Keep one in the top drawer of your desktop and use it to: - Merge PDF Documents - Split PDF Pages into a New Document - Decrypt Input as Necessary (Password Required) - Encrypt Output as Desired - Fill PDF Forms with FDF Data and/or Flatten Forms - Apply a Background Watermark - Report on PDF Metrics, including Metadata and Bookmarks - Update PDF Metadata - Attach Files to PDF Pages or the PDF Document - Unpack PDF Attachments - Burst a PDF Document into Single Pages - Uncompress and Re-Compress Page Streams - Repair Corrupted PDF (Where Possible) %prep %setup -q %build cd pdftk export CXXFLAGS=$RPM_OPT_FLAGS # Work around for a buggy gcj configuration on the cluster: export CLASSPATH=./ make -f Makefile.%{distro} %install rm -rf $RPM_BUILD_ROOT %__install -d -m 755 $RPM_BUILD_ROOT%{_bindir} %__install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1 %__perl -pi -e "s/\r\n/\n/" pdftk.1.txt %__install -m755 pdftk/pdftk -D $RPM_BUILD_ROOT%{_bindir}/pdftk %__bzip2 debian/pdftk.1 %__install -m755 debian/pdftk.1.bz2 -D $RPM_BUILD_ROOT%{_mandir}/man1/pdftk.1.bz2 %clean %__rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc pdftk.1.html pdftk.1.txt %{_mandir}/man1/pdftk.1* %{_bindir}/pdftk %changelog * Mon Jul 28 2008 Daniel Fiser 1.41-1.fc6 - recompiled for Fedora Core 6 - some RPM tags added or changed * Fri Dec 21 2007 Olivier Blin 1.41-3mdv2008.1 + Revision: 136654 - restore BuildRoot + Thierry Vignaud - kill re-definition of %%buildroot on Pixel's request * Sun Sep 09 2007 Pascal Terjan 1.41-3mdv2008.0 + Revision: 83393 - and make it buildable too - Make the package submitable - rebuild - rebuild * Tue Dec 19 2006 Lev Givon 1.41-1mdv2007.0 + Revision: 100300 - Import pdftk