1 |
%define build_dvi 1 |
2 |
|
3 |
%define major 4 |
4 |
%define major_evdocument 4 |
5 |
%define major_evview 3 |
6 |
%define api 3.0 |
7 |
%define gir_major 3.0 |
8 |
|
9 |
%define devname %mklibname -d %{name} |
10 |
%define libname_evdocument %mklibname evdocument 3 %{major_evdocument} |
11 |
%define libname_evview %mklibname evview 3 %{major_evview} |
12 |
%define girname %mklibname %{name}-gir %{gir_major} |
13 |
|
14 |
%define backendsname %mklibname %{name}-backends %{major} |
15 |
|
16 |
%define url_ver %{lua: ver = rpm.expand("%{version}"); majmin, count1 = string.gsub(ver, "^([0123456789]+%.[0123456789]+).*", "%1", 1); if count1 == 0 then print(ver); return; end; maj, count2 = string.gsub(majmin, "^([0123456789]+).*", "%1", 1); if count2 == 0 then print(majmin) elseif tonumber(majmin) < 40 then print(majmin) else print(maj) end} |
17 |
|
18 |
%global libarchive_version 3.6.0 |
19 |
%global poppler_version 22.05.0 |
20 |
|
21 |
%global tarball_version %%(echo %{version} | tr '~' '.') |
22 |
|
23 |
Summary: GNOME Document viewer |
24 |
Name: evince |
25 |
Version: 46.0 |
26 |
Release: %mkrel 1 |
27 |
License: GPLv2+ |
28 |
Group: Graphical desktop/GNOME |
29 |
URL: https://www.gnome.org/ |
30 |
Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{tarball_version}.tar.xz |
31 |
BuildRequires: pkgconfig(appstream-glib) |
32 |
BuildRequires: pkgconfig(cairo) >= 1.10.0 |
33 |
BuildRequires: pkgconfig(cairo-pdf) |
34 |
BuildRequires: pkgconfig(cairo-ps) |
35 |
BuildRequires: pkgconfig(ddjvuapi) >= 3.5.17 |
36 |
BuildRequires: pkgconfig(gail-3.0) >= 3.8.0 |
37 |
BuildRequires: pkgconfig(gio-2.0) >= 2.36.0 |
38 |
BuildRequires: pkgconfig(adwaita-icon-theme) >= 2.17.1 |
39 |
BuildRequires: pkgconfig(dbus-1) |
40 |
BuildRequires: pkgconfig(gnome-keyring-1) >= 2.22.0 |
41 |
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.6 |
42 |
BuildRequires: pkgconfig(gsettings-desktop-schemas) |
43 |
BuildRequires: pkgconfig(gthread-2.0) |
44 |
BuildRequires: pkgconfig(gtk+-3.0) >= 3.8.0 |
45 |
BuildRequires: pkgconfig(gtk+-unix-print-3.0) >= 3.0.2 |
46 |
BuildRequires: pkgconfig(gtk+-x11-3.0) |
47 |
BuildRequires: pkgconfig(ice) |
48 |
BuildRequires: pkgconfig(libgxps) >= 0.2.0 |
49 |
%if 0 |
50 |
BuildRequires: pkgconfig(libnautilus-extension) >= 2.91.4 |
51 |
%endif |
52 |
BuildRequires: pkgconfig(libspectre) >= 0.2.0 |
53 |
BuildRequires: pkgconfig(libxml-2.0) >= 2.5.0 |
54 |
BuildRequires: pkgconfig(libarchive) >= %{libarchive_version} |
55 |
BuildRequires: pkgconfig(libhandy-1) |
56 |
BuildRequires: pkgconfig(poppler-glib) >= %{poppler_version} |
57 |
BuildRequires: pkgconfig(sm) >= 1.0.0 |
58 |
BuildRequires: pkgconfig(x11) |
59 |
BuildRequires: pkgconfig(libsecret-1) >= 0.5 |
60 |
BuildRequires: pkgconfig(libtiff-4) |
61 |
BuildRequires: pkgconfig(gspell-1) |
62 |
BuildRequires: pkgconfig(gstreamer-1.0) |
63 |
BuildRequires: pkgconfig(gstreamer-base-1.0) |
64 |
BuildRequires: pkgconfig(gstreamer-video-1.0) |
65 |
BuildRequires: pkgconfig(gnome-desktop-3.0) |
66 |
BuildRequires: pkgconfig(gdk-pixbuf-2.0) |
67 |
BuildRequires: pkgconfig(synctex) >= 1.19 |
68 |
BuildRequires: ghostscript |
69 |
BuildRequires: itstool |
70 |
BuildRequires: gnome-doc-utils |
71 |
BuildRequires: gi-docgen |
72 |
BuildRequires: meson |
73 |
BuildRequires: yelp-tools |
74 |
BuildRequires: gettext-devel |
75 |
Requires: ghostscript |
76 |
Requires: ghostscript-module-X |
77 |
Requires: gsettings-desktop-schemas |
78 |
Requires: shared-mime-info |
79 |
|
80 |
%description |
81 |
Evince is the GNOME Document viewer. It supports PDF, PostScript and |
82 |
other formats. |
83 |
|
84 |
To view .dvi files as produced by TeX in evince, install the %{name}-dvi |
85 |
package. |
86 |
|
87 |
%package -n %backendsname |
88 |
Summary: Common backends files for %name |
89 |
Group: Graphical desktop/GNOME |
90 |
Conflicts: evince < 3.37.3-2 |
91 |
|
92 |
%description -n %backendsname |
93 |
This package contains the common backends. |
94 |
|
95 |
%if %build_dvi |
96 |
%package dvi |
97 |
Summary: TeX DVI document support for evince |
98 |
Group: Graphical desktop/GNOME |
99 |
BuildRequires: pkgconfig(kpathsea) |
100 |
#gw just like xdvi, needed for rendering the fonts |
101 |
Requires: texlive |
102 |
Requires: texlive-texmf |
103 |
Requires: %{name} = %{version}-%{release} |
104 |
Conflicts: evince < 3.37.3-2 |
105 |
|
106 |
%description dvi |
107 |
This package adds support for displaying .dvi files to evince. These files are |
108 |
produced by TeX, often using a macro package like LaTeX. |
109 |
%endif |
110 |
|
111 |
%package -n %{libname_evdocument} |
112 |
Group: System/Libraries |
113 |
Summary: GNOME Document viewer library |
114 |
Obsoletes: %{mklibname %{name} 3} < 3.3.92 |
115 |
Requires: %backendsname = %{version}-%{release} |
116 |
|
117 |
%description -n %{libname_evdocument} |
118 |
This is the GNOME Document viewer library, the shared parts of evince. |
119 |
|
120 |
%package -n %{libname_evview} |
121 |
Group: System/Libraries |
122 |
Summary: GNOME Document viewer library |
123 |
Requires: %backendsname = %{version}-%{release} |
124 |
|
125 |
%description -n %{libname_evview} |
126 |
This is the GNOME Document viewer library, the shared parts of evince. |
127 |
|
128 |
%package -n %{devname} |
129 |
Group: Development/C |
130 |
Summary: GNOME Document viewer library |
131 |
Requires: %{libname_evdocument} = %{version}-%{release} |
132 |
Requires: %{libname_evview} = %{version}-%{release} |
133 |
Requires: %{girname} = %{version}-%{release} |
134 |
Provides: lib%{name}-devel = %{version}-%{release} |
135 |
Provides: %{name}-devel = %{version}-%{release} |
136 |
|
137 |
%description -n %{devname} |
138 |
This is the GNOME Document viewer library, the shared parts of evince. |
139 |
|
140 |
%package -n %{girname} |
141 |
Summary: GObject Introspection interface description for %{name} |
142 |
Group: System/Libraries |
143 |
Requires: %{libname_evdocument} = %{version}-%{release} |
144 |
Requires: %{libname_evview} = %{version}-%{release} |
145 |
|
146 |
%description -n %{girname} |
147 |
GObject Introspection interface description for %{name}. |
148 |
|
149 |
%prep |
150 |
%autosetup -p1 -n %{name}-%{tarball_version} |
151 |
|
152 |
%build |
153 |
%meson \ |
154 |
-Dtiff=enabled \ |
155 |
-Ddjvu=enabled \ |
156 |
-Dcomics=enabled \ |
157 |
-Dnautilus=false \ |
158 |
-Dps=enabled \ |
159 |
%if %build_dvi |
160 |
-Ddvi=enabled \ |
161 |
%endif |
162 |
-Dgtk_doc=true \ |
163 |
-Dintrospection=true \ |
164 |
-Dmultimedia=enabled |
165 |
|
166 |
%meson_build |
167 |
|
168 |
%install |
169 |
%meson_install |
170 |
|
171 |
%find_lang %{name} --with-gnome |
172 |
|
173 |
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-pdfdocument.metainfo.xml |
174 |
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-psdocument.metainfo.xml |
175 |
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-tiffdocument.metainfo.xml |
176 |
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-comicsdocument.metainfo.xml |
177 |
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-xpsdocument.metainfo.xml |
178 |
|
179 |
%files -f %name.lang |
180 |
%doc NEWS AUTHORS TODO README.md |
181 |
%{_bindir}/* |
182 |
%{_datadir}/evince |
183 |
%{_datadir}/applications/* |
184 |
%{_iconsdir}/hicolor/*/apps/org.gnome.Evinc* |
185 |
%{_datadir}/glib-2.0/schemas/org.gnome.Evince.gschema.xml |
186 |
%{_mandir}/man1/evince*.1* |
187 |
%if 0 |
188 |
%{_libdir}/nautilus/extensions-3.0/libevince*so* |
189 |
%endif |
190 |
%{_libexecdir}/evinced |
191 |
%{_datadir}/dbus-1/services/org.gnome.evince.Daemon.service |
192 |
%{_datadir}/thumbnailers/evince.thumbnailer |
193 |
%{_metainfodir}/org.gnome.Evince.metainfo.xml |
194 |
%{_userunitdir}/org.gnome.Evince.service |
195 |
|
196 |
%files -n %backendsname |
197 |
%dir %{_libdir}/evince/%{major}/ |
198 |
%dir %{_libdir}/evince/%{major}/backends |
199 |
%{_libdir}/evince/%{major}/backends/libcomicsdocument.so |
200 |
%{_libdir}/evince/%{major}/backends/comicsdocument.evince-backend |
201 |
|
202 |
%{_libdir}/evince/%{major}/backends/libdjvudocument.so |
203 |
%{_libdir}/evince/%{major}/backends/djvudocument.evince-backend |
204 |
%{_datadir}/metainfo/evince-djvudocument.metainfo.xml |
205 |
|
206 |
%{_libdir}/evince/%{major}/backends/libpdfdocument.so |
207 |
%{_libdir}/evince/%{major}/backends/pdfdocument.evince-backend |
208 |
|
209 |
%{_libdir}/evince/%{major}/backends/libtiffdocument.so |
210 |
%{_libdir}/evince/%{major}/backends/tiffdocument.evince-backend |
211 |
|
212 |
%{_libdir}/evince/%{major}/backends/libxpsdocument.so |
213 |
%{_libdir}/evince/%{major}/backends/libpsdocument.so |
214 |
%{_libdir}/evince/%{major}/backends/xpsdocument.evince-backend |
215 |
|
216 |
%{_libdir}/evince/%{major}/backends/libpsdocument.so |
217 |
%{_libdir}/evince/%{major}/backends/psdocument.evince-backend |
218 |
|
219 |
%if %build_dvi |
220 |
%files dvi |
221 |
%{_libdir}/evince/%{major}/backends/libdvidocument.so |
222 |
%{_libdir}/evince/%{major}/backends/dvidocument.evince-backend |
223 |
%{_datadir}/metainfo/evince-dvidocument.metainfo.xml |
224 |
%endif |
225 |
|
226 |
%files -n %{libname_evdocument} |
227 |
%{_libdir}/libevdocument3.so.%{major_evdocument}{,.*} |
228 |
|
229 |
%files -n %{libname_evview} |
230 |
%{_libdir}/libevview3.so.%{major_evview}{,.*} |
231 |
|
232 |
%files -n %{girname} |
233 |
%{_libdir}/girepository-1.0/EvinceDocument-%{gir_major}.typelib |
234 |
%{_libdir}/girepository-1.0/EvinceView-%{gir_major}.typelib |
235 |
|
236 |
%files -n %{devname} |
237 |
%doc MAINTAINERS |
238 |
#{_datadir}/doc/evince-libs |
239 |
%{_datadir}/doc/libevview |
240 |
%{_datadir}/doc/libevdocument |
241 |
%{_libdir}/libevdocument3.so |
242 |
%{_libdir}/libevview3.so |
243 |
%{_libdir}/pkgconfig/evince*pc |
244 |
%{_includedir}/evince* |
245 |
%{_datadir}/gir-1.0/EvinceDocument-%{gir_major}.gir |
246 |
%{_datadir}/gir-1.0/EvinceView-%{gir_major}.gir |