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: https://downloads.sourceforge.net/qpdf/%{name}-%{version}.tar.gz
14 # Source0-md5: 440c70e3a5177087e5ac51b58371c043
15 URL: https://qpdf.sourceforge.net/
16 BuildRequires: gnutls-devel
17 BuildRequires: libjpeg-devel
18 BuildRequires: libstdc++-devel >= 6:5
19 BuildRequires: make >= 3.81
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: libjpeg-devel
62 Requires: libstdc++-devel >= 6:5
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.
89 --docdir=%{_docdir}/%{name}-%{version} \
90 %{!?with_static_libs:--disable-static} \
91 --enable-show-failed-test-output \
92 --with-default-crypto=gnutls
94 # SHELL= is workaround for some build failures
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
104 DESTDIR=$RPM_BUILD_ROOT
106 cp -a examples/*.c* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
108 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libqpdf.la
109 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
112 rm -rf $RPM_BUILD_ROOT
114 %post libs -p /sbin/ldconfig
115 %postun libs -p /sbin/ldconfig
118 %defattr(644,root,root,755)
119 %doc ChangeLog README.md TODO
120 %attr(755,root,root) %{_bindir}/fix-qdf
121 %attr(755,root,root) %{_bindir}/qpdf
122 %attr(755,root,root) %{_bindir}/zlib-flate
123 %{_mandir}/man1/fix-qdf.1*
124 %{_mandir}/man1/qpdf.1*
125 %{_mandir}/man1/zlib-flate.1*
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{_libdir}/libqpdf.so.*.*.*
130 %attr(755,root,root) %ghost %{_libdir}/libqpdf.so.28
133 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_libdir}/libqpdf.so
136 %{_pkgconfigdir}/libqpdf.pc
137 %{_examplesdir}/%{name}-%{version}
139 %if %{with static_libs}
141 %defattr(644,root,root,755)