]>
Commit | Line | Data |
---|---|---|
af8cca05 | 1 | # |
d72d4bff | 2 | # Conditional build: |
11194419 JB |
3 | %bcond_without gnutls # gnutls crypto provider |
4 | %bcond_with openssl # openssl crypto provider | |
d72d4bff JB |
5 | %bcond_without static_libs # static library build |
6 | # | |
5fbb175e | 7 | Summary: Command-line tools and library for transforming PDF files |
d72d4bff | 8 | Summary(pl.UTF-8): Narzędzia linii poleceń i biblioteka do przekształcania plików PDF |
5fbb175e | 9 | Name: qpdf |
e0214c91 | 10 | Version: 11.5.0 |
dcb21556 | 11 | Release: 1 |
5fbb175e | 12 | # MIT: e.g. libqpdf/sha2.c |
d72d4bff | 13 | License: Artistic v2.0, some parts MIT |
5fbb175e | 14 | Group: Applications/Publishing |
0ed2cf64 | 15 | Source0: https://downloads.sourceforge.net/qpdf/%{name}-%{version}.tar.gz |
e0214c91 | 16 | # Source0-md5: d916ac26b7f30a5cf3827c708c455ec9 |
0ed2cf64 | 17 | URL: https://qpdf.sourceforge.net/ |
e0214c91 | 18 | BuildRequires: cmake |
11194419 JB |
19 | # sha256sum |
20 | BuildRequires: coreutils >= 6.3 | |
21 | %{?with_gnutls:BuildRequires: gnutls-devel} | |
bb49b9d2 | 22 | BuildRequires: libjpeg-devel |
cb14333a | 23 | BuildRequires: libstdc++-devel >= 6:5 |
11194419 | 24 | BuildRequires: libtool >= 2:2 |
d72d4bff | 25 | BuildRequires: make >= 3.81 |
11194419 | 26 | %{?with_openssl:BuildRequires: openssl-devel >= 1.1.0} |
d72d4bff JB |
27 | BuildRequires: perl-Digest-MD5 |
28 | BuildRequires: perl-base | |
11194419 | 29 | BuildRequires: pkgconfig |
5fbb175e | 30 | BuildRequires: zlib-devel |
d72d4bff | 31 | Requires: %{name}-libs = %{version}-%{release} |
5fbb175e JR |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
35 | QPDF is a command-line program that does structural, | |
36 | content-preserving transformations on PDF files. It could have been | |
37 | called something like pdf-to-pdf. It includes support for merging and | |
38 | splitting PDFs and to manipulate the list of pages in a PDF file. It | |
39 | is not a PDF viewer or a program capable of converting PDF into other | |
40 | formats. | |
41 | ||
d72d4bff JB |
42 | %description -l pl.UTF-8 |
43 | QPDF to działający z linii poleceń program wykonujący strukturalne, | |
44 | zachowujące treść przekształcenia plików PDF. Można by go nazwać czymś | |
45 | w rodzaju pdf-to-pdf. Zawiera obsługę łączenia i dzielenia PDF-ów oraz | |
46 | operacji na liście stron w pliku PDF. Nie jest to przeglądarka plików | |
47 | PDF ani konwerter PDF-ów do innych formatów. | |
48 | ||
5fbb175e JR |
49 | %package libs |
50 | Summary: QPDF library for transforming PDF files | |
d72d4bff | 51 | Summary(pl.UTF-8): Biblioteka QPDF do przekształcania plików PDF |
5fbb175e JR |
52 | Group: Libraries |
53 | ||
54 | %description libs | |
55 | QPDF is a C++ library that inspect and manipulate the structure of PDF | |
56 | files. It can encrypt and linearize files, expose the internals of a | |
57 | PDF file, and do many other operations useful to PDF developers. | |
58 | ||
d72d4bff JB |
59 | %description libs -l pl.UTF-8 |
60 | QPDF to biblioteka C++ analizująca i operująca na strukturze plików | |
61 | PDF. Potrafi szyfrować i linearyzować pliki, udostępniać wnętrzności | |
62 | plików PDF oraz wykonywać inne operacje przydatne programistom PDF. | |
63 | ||
5fbb175e JR |
64 | %package devel |
65 | Summary: Development files for QPDF library | |
d72d4bff | 66 | Summary(pl.UTF-8): Pliki programistyczne biblioteki QPDF |
5fbb175e | 67 | Group: Development/Libraries |
d72d4bff | 68 | Requires: %{name}-libs = %{version}-%{release} |
15e40da7 | 69 | Requires: libjpeg-devel |
cb14333a | 70 | Requires: libstdc++-devel >= 6:5 |
d72d4bff | 71 | Requires: zlib-devel |
5fbb175e JR |
72 | |
73 | %description devel | |
d72d4bff JB |
74 | Header files necessary for developing programs using the QPDF library. |
75 | ||
76 | %description devel -l pl.UTF-8 | |
77 | Pliki nagłówkowe niezbędne do tworzenia programów wykorzystujących | |
78 | bibliotekę QPDF. | |
79 | ||
80 | %package static | |
81 | Summary: Static QPDF library | |
82 | Summary(pl.UTF-8): Statyczna biblioteka QPDF | |
83 | Group: Development/Libraries | |
84 | Requires: %{name}-devel = %{version}-%{release} | |
85 | ||
86 | %description static | |
87 | Static QPDF library. | |
88 | ||
89 | %description static -l pl.UTF-8 | |
90 | Statyczna biblioteka QPDF. | |
5fbb175e JR |
91 | |
92 | %prep | |
93 | %setup -q | |
94 | ||
5fbb175e | 95 | %build |
e0214c91 KM |
96 | mkdir build |
97 | cd build | |
98 | %cmake \ | |
99 | -DUSE_IMPLICIT_CRYPTO=OFF \ | |
100 | -DREQUIRE_CRYPTO_NATIVE=ON \ | |
101 | %{!?with_static_libs:-DBUILD_STATIC_LIBS=OFF} \ | |
102 | %{?with_gnutls:-DREQUIRE_CRYPTO_GNUTLS=ON} \ | |
103 | %{?with_openssl:-DREQUIRE_CRYPTO_OPENSSL=ON} \ | |
104 | -DSHOW_FAILED_TEST_OUTPUT=ON \ | |
105 | -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name}-%{version} \ | |
106 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
107 | .. | |
5fbb175e | 108 | |
d72d4bff JB |
109 | # SHELL= is workaround for some build failures |
110 | %{__make} \ | |
111 | SHELL=/bin/sh | |
5fbb175e JR |
112 | |
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
116 | ||
e0214c91 | 117 | cd build |
5fbb175e JR |
118 | %{__make} install \ |
119 | SHELL=/bin/sh \ | |
120 | DESTDIR=$RPM_BUILD_ROOT | |
e0214c91 | 121 | cd .. |
5fbb175e JR |
122 | cp -a examples/*.c* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
123 | ||
5fbb175e JR |
124 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
125 | ||
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
d72d4bff JB |
129 | %post libs -p /sbin/ldconfig |
130 | %postun libs -p /sbin/ldconfig | |
5fbb175e JR |
131 | |
132 | %files | |
133 | %defattr(644,root,root,755) | |
e0214c91 | 134 | %doc ChangeLog README.md TODO.md |
5fbb175e JR |
135 | %attr(755,root,root) %{_bindir}/fix-qdf |
136 | %attr(755,root,root) %{_bindir}/qpdf | |
137 | %attr(755,root,root) %{_bindir}/zlib-flate | |
d72d4bff JB |
138 | %{_mandir}/man1/fix-qdf.1* |
139 | %{_mandir}/man1/qpdf.1* | |
140 | %{_mandir}/man1/zlib-flate.1* | |
5fbb175e JR |
141 | |
142 | %files libs | |
143 | %defattr(644,root,root,755) | |
affc3966 | 144 | %attr(755,root,root) %{_libdir}/libqpdf.so.*.*.* |
e0214c91 | 145 | %attr(755,root,root) %ghost %{_libdir}/libqpdf.so.29 |
5fbb175e JR |
146 | |
147 | %files devel | |
148 | %defattr(644,root,root,755) | |
affc3966 | 149 | %attr(755,root,root) %{_libdir}/libqpdf.so |
d72d4bff | 150 | %{_includedir}/qpdf |
5fbb175e JR |
151 | %{_pkgconfigdir}/libqpdf.pc |
152 | %{_examplesdir}/%{name}-%{version} | |
e0214c91 KM |
153 | %{_libdir}/cmake/qpdf/libqpdfTargets-relwithdebinfo.cmake |
154 | %{_libdir}/cmake/qpdf/libqpdfTargets.cmake | |
155 | %{_libdir}/cmake/qpdf/qpdfConfig.cmake | |
156 | %{_libdir}/cmake/qpdf/qpdfConfigVersion.cmake | |
d72d4bff JB |
157 | |
158 | %if %{with static_libs} | |
159 | %files static | |
160 | %defattr(644,root,root,755) | |
161 | %{_libdir}/libqpdf.a | |
162 | %endif |