Package atril-gtk: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
%define glib2_version 1.0
%define _libexecdir %_prefix/libexec
%define apiversion 1.5.0
%define _name atril

%def_disable introspection
%def_disable libs_subpackage
%def_disable dbus

# atril _itself_ uses webkit with it
# (via libatrilview.so.*)
%def_disable epub

Name:           %_name-gtk
Version:        1.27.0
Release:        alt2
Summary:        Document viewer

License:        GPLv2+ and GFDL-1.1+
Group:          Publishing
URL:            https://github.com/mate-desktop/atril
Vcs:            git://github.com/mate-desktop/mate-document-viewer.git
Source0:        %name-%version.tar
Source1:        smclient.tar
Source2:        alt_ru.po
Patch:          %_name-%version-%release.patch

BuildRequires:  libgtk+3-devel
BuildRequires:  glib2-devel
BuildRequires:  libgio-devel
BuildRequires:  libpoppler-glib-devel
BuildRequires:  libXt-devel
BuildRequires:  libtiffxx-devel libtiff-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libspectre-devel
BuildRequires:  gettext
BuildRequires:  desktop-file-utils
BuildRequires:  libtool
BuildRequires:  t1lib-devel
BuildRequires:  xml-utils
BuildRequires:  yelp-tools
BuildRequires:  gtk-doc
BuildRequires:  gcc-c++
%{?_enable_introspection:BuildRequires:  gobject-introspection-devel}
%{?_enable_epub:BuildRequires: libwebkit2gtk-devel}

BuildRequires:  mate-common
BuildRequires:  libcairo-devel
BuildRequires:  libcairo-gobject-devel
BuildRequires:  libgail3-devel
BuildRequires:  libxml2-devel
BuildRequires:  libX11-devel
BuildRequires:  zlib-devel
BuildRequires:  libSM-devel
BuildRequires:  libICE-devel
BuildRequires:  libgxps-devel
BuildRequires:  libsynctex-devel

# for the caja properties page
#BuildRequires: mate-file-manager-devel
# for the dvi backend
BuildRequires: libkpathsea-devel
# for the djvu backend
BuildRequires: libdjvu-devel

%if_enabled libs_subpackage
Requires: lib%{name} = %{version}-%{release}
%else
Provides: lib%{name} = %{version}-%{release}
Obsoletes: lib%{name} < %{version}-%{release}
Conflicts: mate-document-viewer-libs

%add_findprov_skiplist %_libdir/*
%filter_from_requires /^\(debug\(64\)\?(\)\?libatril\(document\|view\)\.so\.[[:digit:]]/d
%endif

Conflicts: mate-document-viewer

%define _unpackaged_files_terminate_build 1

%description
Atril is simple multi-page document viewer. It can display and print
Portable Document Format (PDF), PostScript (PS) and Encapsulated
PostScript (EPS) files. When supported by the document format, atril
allows searching for text, copying text to the clipboard, hypertext
navigation, table-of-contents bookmarks and editing of forms.

Support for other document formats such as DVI and DJVU can be added by
installing additional backends.

(version without MATE-specific)

%package -n lib%name
Summary: Libraries for the atril document viewer
Group: System/Libraries
Conflicts: mate-document-viewer-libs

%description -n lib%name
This package contains shared libraries needed for atril


%package -n lib%name-devel
Summary: Support for developing backends for the atril document viewer
Group: Development/C
Requires: lib%name = %{version}-%{release}
Conflicts: mate-document-viewer-devel

%description -n lib%name-devel
This package contains libraries and header files needed for atril
backend development.


%package dvi
Summary: Atril backend for dvi files
Group: Publishing
Requires: %name = %{version}-%{release}
# For /usr/bin/mktexpk  at least
Requires: texlive
Conflicts: mate-document-viewer-devel

%description dvi
This package contains a backend to let atril display dvi files.


%package djvu
Summary: Atril backend for djvu files
Group: Publishing
Requires: %name = %{version}-%{release}
Conflicts: mate-document-viewer-djvu

%description djvu
This package contains a backend to let atril display djvu files.

%package pixbuf
Summary: Atril backend for graphics files
Group: Publishing
Requires: %name = %{version}-%{release}
Conflicts: mate-document-viewer-pixbuf

%description pixbuf
This package contains a backend to let atril display graphics files.

%package xps
Summary: Atril backend for xps files
Group: Publishing
Requires: %name = %{version}-%{release}
Conflicts: mate-document-viewer-xps

%description xps
This package contains a backend to let atril display xps files.

%package epub
Summary: Atril backend for ePub documents
Group: Publishing
Requires: %name = %{version}-%{release}
Conflicts: mate-document-viewer-djvu

%description epub
This package contains a backend to let atril display ePub documents.

%prep
%setup
%patch -p1
tar xf %SOURCE1 -C cut-n-paste/
# Merge our own and upstream Russian translations
msgcat --use-first -o merged_ru.po %SOURCE2 po/ru.po
mv -f merged_ru.po po/ru.po

%build
NOCONFIGURE=1 ./autogen.sh
%configure \
	--disable-static \
	--enable-comics \
	--enable-dvi=yes \
	--enable-djvu=yes \
	--enable-t1lib=yes \
	--enable-pixbuf=yes \
	--enable-xps=yes \
	%{subst_enable epub} \
	%{subst_enable introspection} \
	--without-keyring \
	--disable-caja \
	%{subst_enable dbus} \
	--disable-tests \
	--disable-gtk-doc

%make_build V=1 LIBTOOL=/usr/bin/libtool

%install
%makeinstall_std

%find_lang %_name

mkdir -p %buildroot%{_datadir}/applications
/bin/rm -rf %buildroot/var/scrollkeeper
# Get rid of static libs and .la files.
rm -f %buildroot%{_libdir}/atril/3/backends/*.la
rm -f %buildroot%{_libdir}/atril/3/backends/*.a
rm -f %buildroot%{_libdir}/*.la
rm -f %buildroot%{_libdir}/*.a

# don't ship icon caches
rm -f %buildroot%{_datadir}/icons/hicolor/icon-theme.cache

# Python3 module dogtail needed for tests
#check
#make check

%files -f %_name.lang
%{_bindir}/*
%{_datadir}/atril/
%_desktopdir/%_name.desktop
%{_datadir}/icons/hicolor/*/apps/atril.*
%{_mandir}/man1/atril*.1.*
%if_enabled dbus
%{_libexecdir}/atrild
%{_datadir}/dbus-1/services/org.mate.atril.Daemon.service
%endif
%{_datadir}/glib-2.0/schemas/org.mate.Atril.gschema.xml
%{_datadir}/thumbnailers/atril.thumbnailer
%{_datadir}/help/*/*

# don't package appdata file:
# for atril-gtk there should be changed description at least
%exclude %_datadir/metainfo/atril.appdata.xml

%if_enabled libs_subpackage
%files -n lib%name
%endif
%doc README.md COPYING NEWS AUTHORS
%{_libdir}/libatrilview.so.*
%{_libdir}/libatrildocument.so.*
%dir %{_libdir}/atril
%dir %{_libdir}/atril/3
%dir %{_libdir}/atril/3/backends
%{_libdir}/atril/3/backends/libpdfdocument.so
%{_libdir}/atril/3/backends/pdfdocument.atril-backend
%{_libdir}/atril/3/backends/libpsdocument.so
%{_libdir}/atril/3/backends/psdocument.atril-backend
%{_libdir}/atril/3/backends/libtiffdocument.so
%{_libdir}/atril/3/backends/tiffdocument.atril-backend
%{_libdir}/atril/3/backends/libcomicsdocument.so
%{_libdir}/atril/3/backends/comicsdocument.atril-backend
%if_enabled introspection
%{_libdir}/girepository-1.0/AtrilDocument-*.typelib
%{_libdir}/girepository-1.0/AtrilView-*.typelib
%endif

%if_enabled libs_subpackage
%files -n lib%name-devel
%dir %{_includedir}/atril
%{_includedir}/atril/%apiversion
%{_libdir}/libatrilview.so
%{_libdir}/libatrildocument.so
%{_libdir}/pkgconfig/atril-view-*.pc
%{_libdir}/pkgconfig/atril-document-*.pc
%if_enabled introspection
%{_datadir}/gir-1.0/AtrilDocument-*.gir
%{_datadir}/gir-1.0/AtrilView-*.gir
%endif
%else
%exclude %_includedir/atril/
%exclude %_libdir/pkgconfig/atril-*.pc
%exclude %_libdir/libatril*.so
%endif

%files dvi
%{_libdir}/atril/3/backends/libdvidocument.so*
%{_libdir}/atril/3/backends/dvidocument.atril-backend

%files djvu
%{_libdir}/atril/3/backends/libdjvudocument.so
%{_libdir}/atril/3/backends/djvudocument.atril-backend

%files xps
%{_libdir}/atril/3/backends/libxpsdocument.so*
%{_libdir}/atril/3/backends/xpsdocument.atril-backend

%files pixbuf
%{_libdir}/atril/3/backends/libpixbufdocument.so*
%{_libdir}/atril/3/backends/pixbufdocument.atril-backend

%if_enabled epub
%files epub
%{_libdir}/atril/3/backends/libepubdocument.so*
%{_libdir}/atril/3/backends/epubdocument.atril-backend
%endif

%changelog
* Fri Sep 29 2023 Mikhail Efremov <sem@altlinux.org> 1.27.0-alt2
- Use our own Russian translation.

* Fri Aug 25 2023 Mikhail Efremov <sem@altlinux.org> 1.27.0-alt1
- Dropped obsoleted configure options.
- Added libegg from mate-submodules.
- Updated to 1.27.0.

* Tue Feb 11 2020 Mikhail Efremov <sem@altlinux.org> 1.24.0-alt1
- Updated to 1.24.0.

* Wed Jan 22 2020 Mikhail Efremov <sem@altlinux.org> 1.23.2-alt1
- BR: Dropped intltool.
- BR: Added libsynctex-devel.
- Used Russian translation from upstream.
- Updated to 1.23.2.

* Mon Jan 13 2020 Mikhail Efremov <sem@altlinux.org> 1.23.1-alt2
- dvi: Require texlive (closes: #37704).
- Update Russian translation (thx Olesya Gerasimenko).
- Fix license.

* Fri Aug 23 2019 Mikhail Efremov <sem@altlinux.org> 1.23.1-alt1
- Updated to 1.23.1.

* Wed May 15 2019 Mikhail Efremov <sem@altlinux.org> 1.22.1-alt1
- Updated to 1.22.1.

* Mon Mar 04 2019 Mikhail Efremov <sem@altlinux.org> 1.22.0-alt1
- Updated to 1.22.0.

* Fri Nov 16 2018 Mikhail Efremov <sem@altlinux.org> 1.21.1-alt1
- Updated url.
- Updated to 1.21.1.

* Thu Sep 06 2018 Mikhail Efremov <sem@altlinux.org> 1.21.0-alt1
- Patch from upstream:
  + libview: fix build without epub.
- Updated to 1.21.0.

* Mon Apr 09 2018 Sergey Bolshakov <sbolshakov@altlinux.ru> 1.16.1-alt2
- fix parallel build

* Sat Feb 10 2018 Igor Vlasenko <viy@altlinux.ru> 1.16.1-alt1.1
- NMU: rebuild with texlive 2016

* Thu Nov 10 2016 Mikhail Efremov <sem@altlinux.org> 1.16.1-alt1
- Updated to 1.16.1.

* Tue Sep 20 2016 Mikhail Efremov <sem@altlinux.org> 1.16.0-alt1
- Updated to 1.16.0.

* Tue May 24 2016 Mikhail Efremov <sem@altlinux.org> 1.14.1-alt1
- Updated to 1.14.1.

* Mon Apr 11 2016 Mikhail Efremov <sem@altlinux.org> 1.14.0-alt1
- Updated to 1.14.0.

* Fri Dec 18 2015 Mikhail Efremov <sem@altlinux.org> 1.12.2-alt1
- Updated to 1.12.2.

* Fri Nov 06 2015 Mikhail Efremov <sem@altlinux.org> 1.12.0-alt1
- Patch from upstream:
  + dvi: fix crash due to regression.
- Updated to 1.12.0.

* Wed Oct 28 2015 Mikhail Efremov <sem@altlinux.org> 1.11.0-alt1
- Disabled DBUS support.
- Drop mate-icon-theme-devel from BR.
- Drop obsoleted patches.
- Updated to 1.11.0.

* Tue Jun 16 2015 Mikhail Efremov <sem@altlinux.org> 1.10.0-alt1
- Don't use MateAboutDialog.
- Update "Drop lockdown functionality" patch.
- Drop obsoleted patches.
- Updated to 1.10.0.

* Mon Nov 10 2014 Mikhail Efremov <sem@altlinux.org> 1.8.1-alt1
- Updated to 1.8.1.

* Wed Mar 12 2014 Mikhail Efremov <sem@altlinux.org> 1.8.0-alt1
- Don't package atril libs as separate subpackage.
- Updated to 1.8.0.

* Tue Feb 25 2014 Mikhail Efremov <sem@altlinux.org> 1.7.90-alt1.git20140225
- Upstream git snapshot (master branch).

* Mon Aug 12 2013 Mikhail Efremov <sem@altlinux.org> 1.6.1-alt1
- Fix descriptions.
- Updated to 1.6.1.

* Tue May 28 2013 Mikhail Efremov <sem@altlinux.org> 1.6.0-alt2
- Fix path to the documentation page.
- Drop lockdown functionality.
- Build without MATE-specific.
- Rename to atril-gtk.

* Mon Apr 15 2013 Dmitry V. Levin (QA) <qa_ldv@altlinux.org> 1.6.0-alt1_0.qa1
- NMU: rebuilt with libarchive.so.13.

* Tue Apr 09 2013 Igor Vlasenko <viy@altlinux.ru> 1.6.0-alt1_0
- new version

* Tue Mar 05 2013 Igor Vlasenko <viy@altlinux.ru> 1.5.0-alt3_0
- added Req: mate-desktop (closes: 28634)

* Fri Feb 22 2013 Igor Vlasenko <viy@altlinux.ru> 1.5.0-alt2_0
dropped obsolete mate-conf BR:

* Sun Feb 03 2013 Igor Vlasenko <viy@altlinux.ru> 1.5.0-alt1_0
- new version

* Tue Nov 20 2012 Igor Vlasenko <viy@altlinux.ru> 1.4.0-alt2_1.1.1
- fixed build

* Wed Oct 24 2012 Anton V. Boyarshinov <boyarsh@altlinux.ru> 1.4.0-alt2_1.1
- Build for Sisyphus

* Wed Oct 17 2012 Igor Vlasenko <viy@altlinux.ru> 1.4.0-alt2_1
- adapted alt patches

* Mon Aug 06 2012 Igor Vlasenko <viy@altlinux.ru> 1.4.0-alt1_1
- 20120801 mate snapshot