3 %bcond_with protections # protections against fair use (printing and copying)
4 %bcond_with qt5 # Qt5 instead of Qt4
5 %bcond_without x # X-based browser
7 Summary: Portable Document Format (PDF) file viewer
8 Summary(es.UTF-8): Visualizador de archivos PDF
9 Summary(ja.UTF-8): X Window System での PDF ファイルヴューア
10 Summary(pl.UTF-8): Przeglądarka plików w formacie PDF
11 Summary(pt_BR.UTF-8): Visualizador de arquivos PDF
12 Summary(ru.UTF-8): Программа для просмотра PDF файлов
13 Summary(uk.UTF-8): Програма для перегляду PDF файлів
18 Group: Applications/Publishing
19 #Source0Download: http://www.xpdfreader.com/download.html
20 Source0: https://xpdfreader-dl.s3.amazonaws.com/%{name}-%{version}.tar.gz
21 # Source0-md5: 2c07a8c4381eb368be6f3f2149cc0ed1
22 Source1: %{name}.desktop
25 Patch0: %{name}-remove_protections.patch
26 Patch1: %{name}-fontdirs.patch
27 Patch2: dynamic_private.patch
28 Patch3: %{name}-qt4.patch
29 Patch4: %{name}-link.patch
30 URL: http://www.xpdfreader.com/
31 BuildRequires: cmake >= 2.8.8
32 %{?with_x:BuildRequires: cups-devel}
33 BuildRequires: freetype-devel >= 2.1.0
34 BuildRequires: libpaper-devel
35 BuildRequires: libpng-devel
36 BuildRequires: libstdc++-devel
37 BuildRequires: rpmbuild(macros) >= 1.605
38 BuildRequires: zlib-devel
41 BuildRequires: Qt5Core-devel >= 5
42 BuildRequires: Qt5Network-devel >= 5
43 BuildRequires: Qt5PrintSupport-devel >= 5
44 BuildRequires: Qt5Widgets-devel >= 5
45 BuildRequires: qt5-qmake >= 5
47 BuildRequires: QtCore-devel >= 4
48 BuildRequires: QtGui-devel >= 4
49 BuildRequires: QtNetwork-devel >= 4
50 BuildRequires: qt4-qmake >= 4
53 Requires: %{name}-common = %{version}-%{release}
54 Requires: desktop-file-utils
55 Suggests: ghostscript-fonts-std
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 %define specflags_ia32 -fomit-frame-pointer
61 Xpdf is an X Window System based viewer for Portable Document Format
62 (PDF) files. PDF files are sometimes called Acrobat files, after Adobe
63 Acrobat (Adobe's PDF viewer). Xpdf is a small and efficient program
64 which uses standard X fonts.
65 %{!?with_protections:This version ignores protections for both: printing and copying.}
67 %description -l es.UTF-8
68 Xpdf es un visor de archivos PDF (Portable Document Format). (Estos
69 son algunas veces llamados de archivos 'Acrobat', nombre del software
70 PDF del Adobe. Xpdf fue proyectado para ser pequeño y eficiente. Usa
73 %description -l ja.UTF-8
74 xpdf は Portable Document Format (PDF) ファイルの X Window System
75 上での ヴューアです。PDF ファイルは Adobe Acrobat (Adobe の PDF
76 ヴューア) にちなんで、 時々 Acrobat ファイルと呼ばれます。xpdf
77 は小さく、標準的な X のフォントを 使う効果的なプログラムです。 PDF
81 %description -l pl.UTF-8
82 Xpdf jest przeglądarką plików zapisanych w formacie PDF (Portable
83 Document Format). Xpdf jest zaprojektowany tak, by być małym i
84 wydajnym programem. Używa fontów z zasobów X Window.
85 %{!?with_protections:Ta wersja ignoruje blokady zarówno drukowania jak i kopiowania.}
87 %description -l pt_BR.UTF-8
88 Xpdf é um visualizador de arquivos PDF (Portable Document Format).
89 (Estes são algumas vezes chamados de arquivos 'Acrobat', nome do
90 software PDF da Adobe. Xpdf foi projetado para ser pequeno e
91 eficiente. Ele usa fontes padrão X.
93 %description -l ru.UTF-8
94 Xpdf - это программа для просмотра файлов в формате Portable Document
95 Format (PDF). Она быстрая и эффективная и использует стандартные
98 %description -l uk.UTF-8
99 Xpdf - це програма для перегляду файлів в форматі Portable Document
100 Format (PDF). Вона швидка й ефективна та використовує стандартні
104 Summary: Common xpdf files
105 Summary(pl.UTF-8): Wspólne pliki xpdf
106 Group: Applications/Publishing
109 Private libraries used by xpdf GUI and CLI tools and xpdfrc file.
111 %description common -l pl.UTF-8
112 Prywatne biblioteki używane przez graficzny interfejs xpdf oraz
113 narzędzia linii poleceń, wraz z plikiem xpdfrc.
116 Summary: Set of tools for viewing information and converting PDF files
117 Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF
118 Group: Applications/Publishing
120 Requires: %{name}-common = %{version}-%{release}
121 Obsoletes: pdftohtml-pdftops
124 Set of utilities for displaying information about PDF-files (pdfinfo,
125 pdffonts, pdfimages) and converting them (pdftopbm, pdftops,
128 %description tools -l pl.UTF-8
129 Zestaw programów do wyświetlania informacji o plikach PDF (pdfinfo,
130 pdffonts, pdfimages) i konwertowania ich do innych formatów (pdftopbm,
135 %{!?with_protections:%patch0 -p1}
146 -DCMAKE_CXX_FLAGS="%{rpmcxxflags}" \
147 %{!?with_qt5:-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=1} \
148 -DCMAKE_EXE_LINKER_FLAGS="-lpaper %{rpmldflags}" \
149 -DCMAKE_INSTALL_RPATH="%{_libdir}/%{name}" \
152 -DSYSTEM_XPDFRC="%{_sysconfdir}/xpdfrc" \
153 -DXPDFWIDGET_PRINTING=ON \
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_desktopdir},%{_pixmapsdir},{%{_datadir},%{_libdir}}/%{name}}
161 %{__make} -C build install \
162 DESTDIR=$RPM_BUILD_ROOT
164 install build/{fofi/libfofi,goo/libgoo,splash/libsplash}.so $RPM_BUILD_ROOT%{_libdir}/%{name}
166 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
167 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
168 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
171 rm -rf $RPM_BUILD_ROOT
174 %update_desktop_database
177 %update_desktop_database
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_bindir}/xpdf
183 %{_desktopdir}/xpdf.desktop
184 %{_pixmapsdir}/xpdf.png
185 %{_mandir}/man1/xpdf.1*
189 %defattr(644,root,root,755)
190 %doc ANNOUNCE CHANGES README
191 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/xpdfrc
192 %dir %{_libdir}/%{name}
193 %attr(755,root,root) %{_libdir}/%{name}/libfofi.so
194 %attr(755,root,root) %{_libdir}/%{name}/libgoo.so
195 %attr(755,root,root) %{_libdir}/%{name}/libsplash.so
197 %{_mandir}/man5/xpdfrc.5*
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_bindir}/pdfdetach
202 %attr(755,root,root) %{_bindir}/pdffonts
203 %attr(755,root,root) %{_bindir}/pdfimages
204 %attr(755,root,root) %{_bindir}/pdfinfo
205 %attr(755,root,root) %{_bindir}/pdftohtml
206 %attr(755,root,root) %{_bindir}/pdftopng
207 %attr(755,root,root) %{_bindir}/pdftoppm
208 %attr(755,root,root) %{_bindir}/pdftops
209 %attr(755,root,root) %{_bindir}/pdftotext
210 %{_mandir}/man1/pdfdetach.1*
211 %{_mandir}/man1/pdffonts.1*
212 %{_mandir}/man1/pdfimages.1*
213 %{_mandir}/man1/pdfinfo.1*
214 %{_mandir}/man1/pdftohtml.1*
215 %{_mandir}/man1/pdftopng.1*
216 %{_mandir}/man1/pdftoppm.1*
217 %{_mandir}/man1/pdftops.1*
218 %{_mandir}/man1/pdftotext.1*