]> git.pld-linux.org Git - packages/xpdf.git/blob - xpdf.spec
- updated to 4.01.01 (fixes CVE-2018-7173 CVE-2018-7174 CVE-2018-7175 CVE-2018-7452...
[packages/xpdf.git] / xpdf.spec
1 #
2 # Conditional build:
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
6
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 файлів
14 Name:           xpdf
15 Version:        4.01.01
16 Release:        1
17 License:        GPL v2+
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
23 Source2:        %{name}.png
24 Source3:        %{name}rc
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
39 %if %{with x}
40 %if %{with qt5}
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
46 %else
47 BuildRequires:  QtCore-devel >= 4
48 BuildRequires:  QtGui-devel >= 4
49 BuildRequires:  QtNetwork-devel >= 4
50 BuildRequires:  qt4-qmake >= 4
51 %endif
52 %endif
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)
57
58 %define         specflags_ia32   -fomit-frame-pointer
59
60 %description
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.}
66
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
71 fuentes padrón X.
72
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
78 ファイルのヴューアが必要ならば、xpdf
79 パッケージをインストールしましょう。
80
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.}
86
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.
92
93 %description -l ru.UTF-8
94 Xpdf - это программа для просмотра файлов в формате Portable Document
95 Format (PDF). Она быстрая и эффективная и использует стандартные
96 шрифты X Window.
97
98 %description -l uk.UTF-8
99 Xpdf - це програма для перегляду файлів в форматі Portable Document
100 Format (PDF). Вона швидка й ефективна та використовує стандартні
101 шрифти X Window.
102
103 %package common
104 Summary:        Common xpdf files
105 Summary(pl.UTF-8):      Wspólne pliki xpdf
106 Group:          Applications/Publishing
107
108 %description common
109 Private libraries used by xpdf GUI and CLI tools and xpdfrc file.
110
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.
114
115 %package tools
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
119 Provides:       pdftops
120 Requires:       %{name}-common = %{version}-%{release}
121 Obsoletes:      pdftohtml-pdftops
122
123 %description tools
124 Set of utilities for displaying information about PDF-files (pdfinfo,
125 pdffonts, pdfimages) and converting them (pdftopbm, pdftops,
126 pdftotext).
127
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,
131 pdftops, pdftotext).
132
133 %prep
134 %setup -q
135 %{!?with_protections:%patch0 -p1}
136 %patch1 -p1
137 %patch2 -p1
138 %patch3 -p1
139 %patch4 -p1
140
141 %build
142 install -d build
143 cd build
144 %cmake .. \
145         -DA4_PAPER=ON \
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}" \
150         -DOPI_SUPPORT=ON \
151         -DSPLASH_CMYK=ON \
152         -DSYSTEM_XPDFRC="%{_sysconfdir}/xpdfrc" \
153         -DXPDFWIDGET_PRINTING=ON \
154
155 %{__make}
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_desktopdir},%{_pixmapsdir},{%{_datadir},%{_libdir}}/%{name}}
160
161 %{__make} -C build install \
162         DESTDIR=$RPM_BUILD_ROOT
163
164 install build/{fofi/libfofi,goo/libgoo,splash/libsplash}.so $RPM_BUILD_ROOT%{_libdir}/%{name}
165
166 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
167 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
168 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %post
174 %update_desktop_database
175
176 %postun
177 %update_desktop_database
178
179 %if %{with x}
180 %files
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*
186 %endif
187
188 %files common
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
196 %{_datadir}/xpdf
197 %{_mandir}/man5/xpdfrc.5*
198
199 %files tools
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*
This page took 0.072565 seconds and 3 git commands to generate.