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