]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without qt5 # Qt 5 instead of Qt 4 | |
4 | # | |
5 | Summary: DjVu viewer based on Qt 4+ | |
6 | Summary(hu.UTF-8): DjVu nézegető Qt 4+ alapon | |
7 | Summary(pl.UTF-8): Przeglądarka DjVu oparta na Qt 4+ | |
8 | Name: djview4 | |
9 | Version: 4.12 | |
10 | Release: 1 | |
11 | License: GPL v2+ | |
12 | Group: X11/Applications/Graphics | |
13 | Source0: https://downloads.sourceforge.net/djvu/djview-%{version}.tar.gz | |
14 | # Source0-md5: a91328d0fc949a97931511dcd983236b | |
15 | Patch0: %{name}-opt.patch | |
16 | Patch2: %{name}-link.patch | |
17 | URL: https://djvu.sourceforge.net/ | |
18 | BuildRequires: autoconf >= 2.67 | |
19 | BuildRequires: automake >= 1.6 | |
20 | BuildRequires: djvulibre-devel >= 3.5.19 | |
21 | # rsvg tool | |
22 | BuildRequires: librsvg | |
23 | BuildRequires: libstdc++-devel | |
24 | BuildRequires: libtiff-devel | |
25 | BuildRequires: libtool >= 2:2.0 | |
26 | BuildRequires: pkgconfig | |
27 | BuildRequires: rpmbuild(macros) >= 1.596 | |
28 | BuildRequires: xorg-lib-libX11-devel | |
29 | %if %{with qt5} | |
30 | BuildRequires: Qt5Core-devel >= 5 | |
31 | BuildRequires: Qt5Gui-devel >= 5 | |
32 | BuildRequires: Qt5Network-devel >= 5 | |
33 | BuildRequires: Qt5OpenGL-devel >= 5 | |
34 | BuildRequires: Qt5PrintSupport-devel >= 5 | |
35 | BuildRequires: Qt5Widgets-devel >= 5 | |
36 | BuildRequires: qt5-build >= 5 | |
37 | BuildRequires: qt5-linguist >= 5 | |
38 | BuildRequires: qt5-qmake >= 5 | |
39 | %else | |
40 | BuildRequires: QtCore-devel >= 4.4 | |
41 | BuildRequires: QtGui-devel >= 4.4 | |
42 | BuildRequires: QtNetwork-devel >= 4.4 | |
43 | BuildRequires: QtOpenGL-devel >= 4.4 | |
44 | BuildRequires: qt4-build >= 4.4 | |
45 | BuildRequires: qt4-linguist >= 4.4 | |
46 | BuildRequires: qt4-qmake >= 4.4 | |
47 | %endif | |
48 | Requires(post,postun): desktop-file-utils | |
49 | Requires(post,postun): gtk-update-icon-cache | |
50 | %if %{without qt5} | |
51 | Requires: QtGui >= 4.4 | |
52 | Requires: QtNetwork >= 4.4 | |
53 | Requires: QtOpenGL >= 4.4 | |
54 | %endif | |
55 | Requires: djvulibre >= 3.5.19 | |
56 | Requires: hicolor-icon-theme | |
57 | Obsoletes: djview < 3.3 | |
58 | Obsoletes: djvulibre-djview < 3.5.25 | |
59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
60 | ||
61 | %description | |
62 | DjView4 is a viewer and browser plugin for DjVu documents, based on | |
63 | the DjVuLibre-3.5 library and the Qt 4+ toolkit. | |
64 | ||
65 | %description -l hu.UTF-8 | |
66 | DjView4 egy nézegető és böngésző plugin DjVu dokumentumokhoz, a | |
67 | DjVuLibre-3.5 könyvtárra és a Qt 4+ készletre épülve. | |
68 | ||
69 | %description -l pl.UTF-8 | |
70 | DjView4 to przeglądarka i wtyczka dla przeglądarek do oglądania | |
71 | dokumentów DjVu, oparta na bibliotece DjVuLibre-3.5 i toolkicie Qt 4+. | |
72 | ||
73 | %package -n browser-plugin-%{name} | |
74 | Summary: DjView4 browser plugin | |
75 | Summary(hu.UTF-8): DjView4 böngésző plugin | |
76 | Summary(pl.UTF-8): Wtyczka DjView4 do przegląderek WWW | |
77 | Group: X11/Libraries | |
78 | Requires: %{name} = %{version}-%{release} | |
79 | Requires: browser-plugins >= 2.0 | |
80 | Requires: browser-plugins(%{_target_base_arch}) | |
81 | # for migrate purposes (greedy poldek upgrade) | |
82 | Provides: browser-plugin-djvulibre | |
83 | Provides: mozilla-plugin-djvulibre | |
84 | Provides: netscape-plugin-djvulibre | |
85 | Obsoletes: browser-plugin-djvulibre < 3.5.25 | |
86 | Obsoletes: djview-netscape < 3.3 | |
87 | Obsoletes: mozilla-plugin-djvulibre < 3.5.25 | |
88 | Obsoletes: netscape-plugin-djvulibre < 3.5.25 | |
89 | ||
90 | %description -n browser-plugin-%{name} | |
91 | DjView4 plugin for Mozilla and Mozilla-based browsers. | |
92 | ||
93 | %description -n browser-plugin-%{name} -l hu.UTF-8 | |
94 | DjView4 plugin Mozilla és Mozilla-alapú böngészőkhöz. | |
95 | ||
96 | %description -n browser-plugin-%{name} -l pl.UTF-8 | |
97 | Wtyczka DjView4 do przeglądarek zgodnych z Mozillą. | |
98 | ||
99 | %prep | |
100 | %setup -q | |
101 | %patch0 -p1 | |
102 | %patch2 -p1 | |
103 | ||
104 | %build | |
105 | %{__libtoolize} | |
106 | %{__aclocal} -I config | |
107 | %{__autoconf} | |
108 | %{__autoheader} | |
109 | %{__automake} | |
110 | %if %{with qt5} | |
111 | export QTDIR=%{_libdir}/qt5 | |
112 | %else | |
113 | export QTDIR=%{_libdir}/qt4 | |
114 | %endif | |
115 | %configure \ | |
116 | --disable-silent-rules | |
117 | # --enable-npdjvu - new experimental plugin? | |
118 | ||
119 | %{__make} \ | |
120 | V=1 | |
121 | ||
122 | %install | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | install -d $RPM_BUILD_ROOT%{_browserpluginsdir} | |
125 | ||
126 | %{__make} install \ | |
127 | DESTDIR=$RPM_BUILD_ROOT \ | |
128 | pluginsdir=%{_browserpluginsdir} | |
129 | ||
130 | %{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/nsdejavu.la | |
131 | ||
132 | %clean | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %post | |
136 | %update_desktop_database_post | |
137 | %update_icon_cache hicolor | |
138 | ||
139 | %postun | |
140 | %update_desktop_database_postun | |
141 | %update_icon_cache hicolor | |
142 | ||
143 | %post -n browser-plugin-%{name} | |
144 | %update_browser_plugins | |
145 | ||
146 | %postun -n browser-plugin-%{name} | |
147 | if [ "$1" = "0" ]; then | |
148 | %update_browser_plugins | |
149 | fi | |
150 | ||
151 | %files | |
152 | %defattr(644,root,root,755) | |
153 | %doc COPYRIGHT NEWS README | |
154 | %attr(755,root,root) %{_bindir}/djview | |
155 | %{_mandir}/man1/djview.1* | |
156 | %dir %{_datadir}/djvu/djview4 | |
157 | %lang(cs) %{_datadir}/djvu/djview4/djview_cs.qm | |
158 | %lang(de) %{_datadir}/djvu/djview4/djview_de.qm | |
159 | %lang(es) %{_datadir}/djvu/djview4/djview_es.qm | |
160 | %lang(fr) %{_datadir}/djvu/djview4/djview_fr.qm | |
161 | %lang(ru) %{_datadir}/djvu/djview4/djview_ru.qm | |
162 | %lang(uk) %{_datadir}/djvu/djview4/djview_uk.qm | |
163 | %lang(zh_CN) %{_datadir}/djvu/djview4/djview_zh_cn.qm | |
164 | %lang(zh_TW) %{_datadir}/djvu/djview4/djview_zh_tw.qm | |
165 | %{_desktopdir}/djvulibre-djview4.desktop | |
166 | %{_iconsdir}/hicolor/*x*/mimetypes/djvulibre-djview4.png | |
167 | %{_iconsdir}/hicolor/scalable/mimetypes/djvulibre-djview4.svgz | |
168 | ||
169 | %files -n browser-plugin-%{name} | |
170 | %defattr(644,root,root,755) | |
171 | %attr(755,root,root) %{_browserpluginsdir}/nsdejavu.so | |
172 | %{_mandir}/man1/nsdejavu.1* |