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