]> git.pld-linux.org Git - packages/xpdf.git/blame - xpdf.spec
- build with Qt5 by default
[packages/xpdf.git] / xpdf.spec
CommitLineData
5310ccb1 1#
9f60ed39 2# Conditional build:
cf80ddef 3%bcond_with protections # protections against fair use (printing and copying)
95ffe38a 4%bcond_without qt5 # Qt5 instead of Qt4
2c9d921c 5%bcond_without x # X-based browser
ca5bcee6 6
93abf3eb 7Summary: Portable Document Format (PDF) file viewer
1b4a9f52
ER
8Summary(es.UTF-8): Visualizador de archivos PDF
9Summary(ja.UTF-8): X Window System での PDF ファイルヴューア
10Summary(pl.UTF-8): Przeglądarka plików w formacie PDF
11Summary(pt_BR.UTF-8): Visualizador de arquivos PDF
12Summary(ru.UTF-8): Программа для просмотра PDF файлов
13Summary(uk.UTF-8): Програма для перегляду PDF файлів
93abf3eb 14Name: xpdf
5310ccb1 15Version: 4.01.01
95ffe38a 16Release: 2
835ba18b 17License: GPL v2+
ca5bcee6 18Group: Applications/Publishing
5310ccb1
JB
19#Source0Download: http://www.xpdfreader.com/download.html
20Source0: https://xpdfreader-dl.s3.amazonaws.com/%{name}-%{version}.tar.gz
21# Source0-md5: 2c07a8c4381eb368be6f3f2149cc0ed1
e9d3e07b 22Source1: %{name}.desktop
8ddb316c 23Source2: %{name}.png
48e7efba 24Source3: %{name}rc
9f60ed39 25Patch0: %{name}-remove_protections.patch
631d479b 26Patch1: %{name}-fontdirs.patch
42344761 27Patch2: dynamic_private.patch
5310ccb1
JB
28Patch3: %{name}-qt4.patch
29Patch4: %{name}-link.patch
e24bfd15
TP
30URL: http://www.xpdfreader.com/
31BuildRequires: cmake >= 2.8.8
5310ccb1 32%{?with_x:BuildRequires: cups-devel}
09366f62 33BuildRequires: freetype-devel >= 2.1.0
4148fe2b 34BuildRequires: libpaper-devel
74204cd0 35BuildRequires: libpng-devel
0491d001 36BuildRequires: libstdc++-devel
5310ccb1
JB
37BuildRequires: rpmbuild(macros) >= 1.605
38BuildRequires: zlib-devel
39%if %{with x}
40%if %{with qt5}
41BuildRequires: Qt5Core-devel >= 5
42BuildRequires: Qt5Network-devel >= 5
43BuildRequires: Qt5PrintSupport-devel >= 5
44BuildRequires: Qt5Widgets-devel >= 5
45BuildRequires: qt5-qmake >= 5
46%else
47BuildRequires: QtCore-devel >= 4
48BuildRequires: QtGui-devel >= 4
49BuildRequires: QtNetwork-devel >= 4
50BuildRequires: qt4-qmake >= 4
51%endif
52%endif
53Requires: %{name}-common = %{version}-%{release}
ca5bcee6 54Requires: desktop-file-utils
c6c887d4 55Suggests: ghostscript-fonts-std
2785b9fe 56BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
a366f0ee 57
ca5bcee6 58%define specflags_ia32 -fomit-frame-pointer
a9870f41 59
a366f0ee 60%description
88e104c8 61Xpdf is an X Window System based viewer for Portable Document Format
62(PDF) files. PDF files are sometimes called Acrobat files, after Adobe
63Acrobat (Adobe's PDF viewer). Xpdf is a small and efficient program
64which uses standard X fonts.
a0874d43 65%{!?with_protections:This version ignores protections for both: printing and copying.}
a366f0ee 66
f8408aae 67%description -l es.UTF-8
7886ec95 68Xpdf es un visor de archivos PDF (Portable Document Format). (Estos
69son algunas veces llamados de archivos 'Acrobat', nombre del software
f8408aae
JR
70PDF del Adobe. Xpdf fue proyectado para ser pequeño y eficiente. Usa
71fuentes padrón X.
7886ec95 72
f8408aae
JR
73%description -l ja.UTF-8
74xpdf は Portable Document Format (PDF) ファイルの X Window System
75上での ヴューアです。PDF ファイルは Adobe Acrobat (Adobe の PDF
76ヴューア) にちなんで、 時々 Acrobat ファイルと呼ばれます。xpdf
77は小さく、標準的な X のフォントを 使う効果的なプログラムです。 PDF
78ファイルのヴューアが必要ならば、xpdf
79パッケージをインストールしましょう。
8ddb316c 80
f8408aae
JR
81%description -l pl.UTF-8
82Xpdf jest przeglądarką plików zapisanych w formacie PDF (Portable
83Document Format). Xpdf jest zaprojektowany tak, by być małym i
84wydajnym programem. Używa fontów z zasobów X Window.
85%{!?with_protections:Ta wersja ignoruje blokady zarówno drukowania jak i kopiowania.}
93abf3eb 86
f8408aae
JR
87%description -l pt_BR.UTF-8
88Xpdf é um visualizador de arquivos PDF (Portable Document Format).
89(Estes são algumas vezes chamados de arquivos 'Acrobat', nome do
7886ec95 90software PDF da Adobe. Xpdf foi projetado para ser pequeno e
f8408aae 91eficiente. Ele usa fontes padrão X.
7886ec95 92
f8408aae
JR
93%description -l ru.UTF-8
94Xpdf - это программа для просмотра файлов в формате Portable Document
95Format (PDF). Она быстрая и эффективная и использует стандартные
96шрифты X Window.
7750d49b 97
f8408aae
JR
98%description -l uk.UTF-8
99Xpdf - це програма для перегляду файлів в форматі Portable Document
100Format (PDF). Вона швидка й ефективна та використовує стандартні
101шрифти X Window.
7750d49b 102
835ba18b
TP
103%package common
104Summary: Common xpdf files
105Summary(pl.UTF-8): Wspólne pliki xpdf
106Group: Applications/Publishing
107
108%description common
109Private libraries used by xpdf GUI and CLI tools and xpdfrc file.
110
5310ccb1
JB
111%description common -l pl.UTF-8
112Prywatne biblioteki używane przez graficzny interfejs xpdf oraz
113narzędzia linii poleceń, wraz z plikiem xpdfrc.
114
f54ed77d 115%package tools
116Summary: Set of tools for viewing information and converting PDF files
1b4a9f52 117Summary(pl.UTF-8): Zestaw narzędzi do wyświetlania informacji i konwertowania plików PDF
f54ed77d 118Group: Applications/Publishing
2672519c 119Provides: pdftops
5310ccb1 120Requires: %{name}-common = %{version}-%{release}
2672519c 121Obsoletes: pdftohtml-pdftops
f54ed77d 122
123%description tools
124Set of utilities for displaying information about PDF-files (pdfinfo,
125pdffonts, pdfimages) and converting them (pdftopbm, pdftops,
126pdftotext).
127
f8408aae
JR
128%description tools -l pl.UTF-8
129Zestaw programów do wyświetlania informacji o plikach PDF (pdfinfo,
130pdffonts, pdfimages) i konwertowania ich do innych formatów (pdftopbm,
f54ed77d 131pdftops, pdftotext).
132
93abf3eb 133%prep
c34454c1 134%setup -q
a0874d43 135%{!?with_protections:%patch0 -p1}
09366f62 136%patch1 -p1
42344761 137%patch2 -p1
5310ccb1
JB
138%patch3 -p1
139%patch4 -p1
93abf3eb 140
141%build
5310ccb1
JB
142install -d build
143cd build
144%cmake .. \
e24bfd15 145 -DA4_PAPER=ON \
5310ccb1
JB
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}" \
e24bfd15 150 -DOPI_SUPPORT=ON \
c34454c1 151 -DSPLASH_CMYK=ON \
5310ccb1 152 -DSYSTEM_XPDFRC="%{_sysconfdir}/xpdfrc" \
c34454c1 153 -DXPDFWIDGET_PRINTING=ON \
308001e1 154
deb92fef 155%{__make}
93abf3eb 156
157%install
158rm -rf $RPM_BUILD_ROOT
5310ccb1 159install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_desktopdir},%{_pixmapsdir},{%{_datadir},%{_libdir}}/%{name}}
e24bfd15 160
5310ccb1 161%{__make} -C build install \
09366f62 162 DESTDIR=$RPM_BUILD_ROOT
93abf3eb 163
5310ccb1 164install build/{fofi/libfofi,goo/libgoo,splash/libsplash}.so $RPM_BUILD_ROOT%{_libdir}/%{name}
42344761 165
ca5bcee6
ER
166cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
167cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
168cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
93abf3eb 169
93abf3eb 170%clean
171rm -rf $RPM_BUILD_ROOT
172
7b55ada9 173%post
ca5bcee6 174%update_desktop_database
7b55ada9 175
176%postun
ca5bcee6 177%update_desktop_database
7b55ada9 178
2c9d921c 179%if %{with x}
93abf3eb 180%files
181%defattr(644,root,root,755)
f54ed77d 182%attr(755,root,root) %{_bindir}/xpdf
5310ccb1
JB
183%{_desktopdir}/xpdf.desktop
184%{_pixmapsdir}/xpdf.png
f54ed77d 185%{_mandir}/man1/xpdf.1*
2c9d921c 186%endif
f54ed77d 187
835ba18b 188%files common
5310ccb1 189%defattr(644,root,root,755)
835ba18b 190%doc ANNOUNCE CHANGES README
5310ccb1
JB
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
835ba18b
TP
196%{_datadir}/xpdf
197%{_mandir}/man5/xpdfrc.5*
198
f54ed77d 199%files tools
200%defattr(644,root,root,755)
cf80ddef
JB
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
74204cd0
JB
205%attr(755,root,root) %{_bindir}/pdftohtml
206%attr(755,root,root) %{_bindir}/pdftopng
cf80ddef
JB
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*
74204cd0
JB
214%{_mandir}/man1/pdftohtml.1*
215%{_mandir}/man1/pdftopng.1*
cf80ddef
JB
216%{_mandir}/man1/pdftoppm.1*
217%{_mandir}/man1/pdftops.1*
218%{_mandir}/man1/pdftotext.1*
This page took 0.165012 seconds and 4 git commands to generate.