| 1 | Summary: Command-line tools and library for transforming PDF files
|
|---|
| 2 | Name: qpdf
|
|---|
| 3 | Version: 6.0.0
|
|---|
| 4 | Release: 1%{?dist}
|
|---|
| 5 | # MIT: e.g. libqpdf/sha2.c
|
|---|
| 6 | License: Artistic 2.0 and MIT
|
|---|
| 7 | URL: http://qpdf.sourceforge.net/
|
|---|
| 8 | Vendor: bww bitwise works GmbH
|
|---|
| 9 | #Source0: http://downloads.sourceforge.net/sourceforge/qpdf/qpdf-%{version}.tar.gz
|
|---|
| 10 |
|
|---|
| 11 | #define svn_url e:/trees/libqpdf/trunk
|
|---|
| 12 | %define svn_url http://svn.netlabs.org/repos/ports/libqpdf/trunk
|
|---|
| 13 | %define svn_rev 1344
|
|---|
| 14 |
|
|---|
| 15 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 16 |
|
|---|
| 17 | BuildRequires: zlib-devel
|
|---|
| 18 | BuildRequires: pcre-devel
|
|---|
| 19 |
|
|---|
| 20 | # for fix-qdf and test suite
|
|---|
| 21 | BuildRequires: perl
|
|---|
| 22 | # as we disabled the testsuit in the rpm build process we don't need the below
|
|---|
| 23 | # requirement
|
|---|
| 24 | #BuildRequires: perl(Digest::MD5)
|
|---|
| 25 |
|
|---|
| 26 | # for autoreconf
|
|---|
| 27 | BuildRequires: autoconf
|
|---|
| 28 | BuildRequires: automake
|
|---|
| 29 | BuildRequires: libtool
|
|---|
| 30 |
|
|---|
| 31 | Requires: qpdf-libs = %{version}-%{release}
|
|---|
| 32 |
|
|---|
| 33 | %package libs
|
|---|
| 34 | Summary: QPDF library for transforming PDF files
|
|---|
| 35 | Group: System Environment/Libraries
|
|---|
| 36 |
|
|---|
| 37 | %package devel
|
|---|
| 38 | Summary: Development files for QPDF library
|
|---|
| 39 | Group: Development/Libraries
|
|---|
| 40 | Requires: qpdf-libs = %{version}-%{release}
|
|---|
| 41 |
|
|---|
| 42 | %package doc
|
|---|
| 43 | Summary: QPDF Manual
|
|---|
| 44 | Group: Documentation
|
|---|
| 45 | BuildArch: noarch
|
|---|
| 46 | Requires: qpdf-libs = %{version}-%{release}
|
|---|
| 47 |
|
|---|
| 48 | %description
|
|---|
| 49 | QPDF is a command-line program that does structural, content-preserving
|
|---|
| 50 | transformations on PDF files. It could have been called something
|
|---|
| 51 | like pdf-to-pdf. It includes support for merging and splitting PDFs
|
|---|
| 52 | and to manipulate the list of pages in a PDF file. It is not a PDF viewer
|
|---|
| 53 | or a program capable of converting PDF into other formats.
|
|---|
| 54 |
|
|---|
| 55 | %description libs
|
|---|
| 56 | QPDF is a C++ library that inspect and manipulate the structure of PDF files.
|
|---|
| 57 | It can encrypt and linearize files, expose the internals of a PDF file,
|
|---|
| 58 | and do many other operations useful to PDF developers.
|
|---|
| 59 |
|
|---|
| 60 | %description devel
|
|---|
| 61 | Header files and libraries necessary
|
|---|
| 62 | for developing programs using the QPDF library.
|
|---|
| 63 |
|
|---|
| 64 | %description doc
|
|---|
| 65 | QPDF Manual
|
|---|
| 66 |
|
|---|
| 67 | %debug_package
|
|---|
| 68 |
|
|---|
| 69 | %prep
|
|---|
| 70 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{?!svn_rev):0}
|
|---|
| 71 | %setup -q
|
|---|
| 72 | %else
|
|---|
| 73 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 74 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 75 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 76 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 77 | %endif
|
|---|
| 78 |
|
|---|
| 79 | sed -i -e '1s,^#!/usr/bin/env perl,#!/@unixroot/usr/bin/perl,' qpdf/fix-qdf
|
|---|
| 80 | sed -i -e '1s,^#!/usr/bin/env perl,#!/@unixroot/usr/bin/perl,' qtest/bin/qtest-driver
|
|---|
| 81 |
|
|---|
| 82 | %build
|
|---|
| 83 | # work-around check-rpaths errors
|
|---|
| 84 | export LDFLAGS='-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp'
|
|---|
| 85 | autoreconf --verbose --force --install
|
|---|
| 86 |
|
|---|
| 87 | %configure --enable-shared --disable-static\
|
|---|
| 88 | --enable-show-failed-test-output \
|
|---|
| 89 | --disable-os-secure-random --enable-insecure-random
|
|---|
| 90 |
|
|---|
| 91 | make %{?_smp_mflags}
|
|---|
| 92 |
|
|---|
| 93 | %install
|
|---|
| 94 | make install DESTDIR=%{buildroot}
|
|---|
| 95 |
|
|---|
| 96 | rm -f %{buildroot}%{_libdir}/libqpdf.la
|
|---|
| 97 |
|
|---|
| 98 | %check
|
|---|
| 99 | #make check
|
|---|
| 100 |
|
|---|
| 101 | #post libs -p /sbin/ldconfig
|
|---|
| 102 |
|
|---|
| 103 | #postun libs -p /sbin/ldconfig
|
|---|
| 104 |
|
|---|
| 105 | %files
|
|---|
| 106 | %{_bindir}/fix-qdf
|
|---|
| 107 | %{_bindir}/qpdf.exe
|
|---|
| 108 | %{_bindir}/zlib-flate.exe
|
|---|
| 109 | %{_mandir}/man1/*
|
|---|
| 110 |
|
|---|
| 111 | %files libs
|
|---|
| 112 | %doc README TODO ChangeLog Artistic-2.0
|
|---|
| 113 | %{_libdir}/qpdf*.dll
|
|---|
| 114 |
|
|---|
| 115 | %files devel
|
|---|
| 116 | %doc examples/*.cc examples/*.c
|
|---|
| 117 | %{_includedir}/*
|
|---|
| 118 | %{_libdir}/qpdf*_dll.a
|
|---|
| 119 | %{_libdir}/pkgconfig/libqpdf.pc
|
|---|
| 120 |
|
|---|
| 121 | %files doc
|
|---|
| 122 | %{_defaultdocdir}/qpdf
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 | %changelog
|
|---|
| 126 | * Fri Feb 19 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 6.0.0-1
|
|---|
| 127 | - initial version
|
|---|