3 %bcond_without static_libs # static library build
5 Summary: Command-line tools and library for transforming PDF files
6 Summary(pl.UTF-8): Narzędzia linii poleceń i biblioteka do przekształcania plików PDF
10 # MIT: e.g. libqpdf/sha2.c
11 License: Artistic v2.0, some parts MIT
12 Group: Applications/Publishing
13 Source0: http://downloads.sourceforge.net/qpdf/%{name}-%{version}.tar.gz
14 # Source0-md5: 60a66cf8cbdb3bb0d3bcf5b2f53ec06b
15 URL: http://qpdf.sourceforge.net/
16 BuildRequires: libjpeg-devel
17 BuildRequires: libstdc++-devel
18 BuildRequires: make >= 3.81
19 BuildRequires: pcre-devel
20 BuildRequires: perl-Digest-MD5
21 BuildRequires: perl-base
22 BuildRequires: zlib-devel
23 Requires: %{name}-libs = %{version}-%{release}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 QPDF is a command-line program that does structural,
28 content-preserving transformations on PDF files. It could have been
29 called something like pdf-to-pdf. It includes support for merging and
30 splitting PDFs and to manipulate the list of pages in a PDF file. It
31 is not a PDF viewer or a program capable of converting PDF into other
34 %description -l pl.UTF-8
35 QPDF to działający z linii poleceń program wykonujący strukturalne,
36 zachowujące treść przekształcenia plików PDF. Można by go nazwać czymś
37 w rodzaju pdf-to-pdf. Zawiera obsługę łączenia i dzielenia PDF-ów oraz
38 operacji na liście stron w pliku PDF. Nie jest to przeglądarka plików
39 PDF ani konwerter PDF-ów do innych formatów.
42 Summary: QPDF library for transforming PDF files
43 Summary(pl.UTF-8): Biblioteka QPDF do przekształcania plików PDF
47 QPDF is a C++ library that inspect and manipulate the structure of PDF
48 files. It can encrypt and linearize files, expose the internals of a
49 PDF file, and do many other operations useful to PDF developers.
51 %description libs -l pl.UTF-8
52 QPDF to biblioteka C++ analizująca i operująca na strukturze plików
53 PDF. Potrafi szyfrować i linearyzować pliki, udostępniać wnętrzności
54 plików PDF oraz wykonywać inne operacje przydatne programistom PDF.
57 Summary: Development files for QPDF library
58 Summary(pl.UTF-8): Pliki programistyczne biblioteki QPDF
59 Group: Development/Libraries
60 Requires: %{name}-libs = %{version}-%{release}
61 Requires: libstdc++-devel
66 Header files necessary for developing programs using the QPDF library.
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe niezbędne do tworzenia programów wykorzystujących
73 Summary: Static QPDF library
74 Summary(pl.UTF-8): Statyczna biblioteka QPDF
75 Group: Development/Libraries
76 Requires: %{name}-devel = %{version}-%{release}
81 %description static -l pl.UTF-8
82 Statyczna biblioteka QPDF.
87 %{__sed} -i -e '1s,^#!/usr/bin/env perl,#!/usr/bin/perl,' qpdf/fix-qdf
91 --docdir=%{_docdir}/%{name}-%{version} \
92 %{!?with_static_libs:--disable-static} \
93 --enable-show-failed-test-output
95 # SHELL= is workaround for some build failures
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
105 DESTDIR=$RPM_BUILD_ROOT
107 cp -a examples/*.c* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
109 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libqpdf.la
110 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
113 rm -rf $RPM_BUILD_ROOT
115 %post libs -p /sbin/ldconfig
116 %postun libs -p /sbin/ldconfig
119 %defattr(644,root,root,755)
120 %doc ChangeLog README.md TODO doc/*.{pdf,html,css}
121 %attr(755,root,root) %{_bindir}/fix-qdf
122 %attr(755,root,root) %{_bindir}/qpdf
123 %attr(755,root,root) %{_bindir}/zlib-flate
124 %{_mandir}/man1/fix-qdf.1*
125 %{_mandir}/man1/qpdf.1*
126 %{_mandir}/man1/zlib-flate.1*
129 %defattr(644,root,root,755)
130 %attr(755,root,root) %{_libdir}/libqpdf.so.*.*.*
131 %attr(755,root,root) %ghost %{_libdir}/libqpdf.so.21
134 %defattr(644,root,root,755)
135 %attr(755,root,root) %{_libdir}/libqpdf.so
137 %{_pkgconfigdir}/libqpdf.pc
138 %{_examplesdir}/%{name}-%{version}
140 %if %{with static_libs}
142 %defattr(644,root,root,755)