source: spec/trunk/SPECS/qpdf.spec@ 1567

Last change on this file since 1567 was 675, checked in by Silvan Scherrer, 10 years ago

spec: added libpqdf

File size: 3.4 KB
Line 
1Summary: Command-line tools and library for transforming PDF files
2Name: qpdf
3Version: 6.0.0
4Release: 1%{?dist}
5# MIT: e.g. libqpdf/sha2.c
6License: Artistic 2.0 and MIT
7URL: http://qpdf.sourceforge.net/
8Vendor: 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
15Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
16
17BuildRequires: zlib-devel
18BuildRequires: pcre-devel
19
20# for fix-qdf and test suite
21BuildRequires: 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
27BuildRequires: autoconf
28BuildRequires: automake
29BuildRequires: libtool
30
31Requires: qpdf-libs = %{version}-%{release}
32
33%package libs
34Summary: QPDF library for transforming PDF files
35Group: System Environment/Libraries
36
37%package devel
38Summary: Development files for QPDF library
39Group: Development/Libraries
40Requires: qpdf-libs = %{version}-%{release}
41
42%package doc
43Summary: QPDF Manual
44Group: Documentation
45BuildArch: noarch
46Requires: qpdf-libs = %{version}-%{release}
47
48%description
49QPDF is a command-line program that does structural, content-preserving
50transformations on PDF files. It could have been called something
51like pdf-to-pdf. It includes support for merging and splitting PDFs
52and to manipulate the list of pages in a PDF file. It is not a PDF viewer
53or a program capable of converting PDF into other formats.
54
55%description libs
56QPDF is a C++ library that inspect and manipulate the structure of PDF files.
57It can encrypt and linearize files, expose the internals of a PDF file,
58and do many other operations useful to PDF developers.
59
60%description devel
61Header files and libraries necessary
62for developing programs using the QPDF library.
63
64%description doc
65QPDF 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
74svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
75rm -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
79sed -i -e '1s,^#!/usr/bin/env perl,#!/@unixroot/usr/bin/perl,' qpdf/fix-qdf
80sed -i -e '1s,^#!/usr/bin/env perl,#!/@unixroot/usr/bin/perl,' qtest/bin/qtest-driver
81
82%build
83# work-around check-rpaths errors
84export LDFLAGS='-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp'
85autoreconf --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
91make %{?_smp_mflags}
92
93%install
94make install DESTDIR=%{buildroot}
95
96rm -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
Note: See TracBrowser for help on using the repository browser.