Пакет poppler5: 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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
%define popIF_ver_gt() %if "%(rpmvercmp '%1' '%2')" > "0"
%define popIF_ver_gteq() %if "%(rpmvercmp '%1' '%2')" >= "0"
%define popIF_ver_lt() %if "%(rpmvercmp '%2' '%1')" > "0"
%define popIF_ver_lteq() %if "%(rpmvercmp '%2' '%1')" >= "0"
%undefine __libtoolize


%def_disable static
%def_enable qt4
%def_enable qt3
%def_enable xpdfheaders

%define rname poppler
%define somajor 5
%define somajor_qt 2
%define somajor_qt4 3
%define somajor_glib 4
%define major 0
%define minor 12
%define bugfix 4
Name: %rname%somajor
Version: %major.%minor.%bugfix
Release: alt0.M50P.3

Group: Publishing
Summary: PDF rendering library
License: GPL
Url: http://poppler.freedesktop.org/
Packager: Sergey V Turchin <zerg at altlinux dot org>


Source: %rname-%version.tar
Source1: version-script.poppler
Source2: version-script.glib
Source3: version-script.qt4
Source4: version-script.qt
#Patch1: poppler-0.8.0-alt-glib-ldflags.patch
#Patch2: poppler-0.8.0-alt-cxxflags.patch
#Patch3: poppler-0.8.0-alt-install-xpdf-headers.patch
Patch4: poppler-0.12.1-alt-qt.patch
Patch5: version-script.poppler.patch
Patch6: version-script.glib.patch
Patch7: version-script.qt4.patch
Patch8: version-script.qt.patch
# RH
Patch10: poppler-ObjStream.patch
# security
Patch100: poppler-CVE-2010-3702.patch
Patch101: poppler-CVE-2010-3703.patch
Patch102: poppler-CVE-2010-3704.patch

BuildRequires(pre): libqt3-devel libqt4-devel rpm-utils
BuildRequires: fontconfig-devel freetype2-devel gcc-c++ glib2-devel liblcms-devel
%if_enabled qt3
BuildRequires: glibc-devel-static
%endif
BuildRequires: xorg-x11-devel libatk-devel libcairo-devel libgtk+2-devel
BuildRequires: libjpeg-devel libpango-devel libstdc++-devel pkg-config zlib-devel

%description
Poppler is a fork of the xpdf PDF viewer developed by Derek Noonburg
of Glyph and Cog, LLC.  The purpose of forking xpdf is twofold.
First, we want to provide PDF rendering functionality as a shared
library, to centralize the maintenence effort.  Today a number of
applications incorporate the xpdf code base, and whenever a security
issue is discovered, all these applications exchange patches and put
out new releases.  In turn, all distributions must package and release
new version of these xpdf based viewers.  It's safe to say that
there's a lot of duplicated effort with the current situaion.  Even if
poppler in the short term introduces yet another xpdf derived code
base to the world, we hope that over time these applications will
adopt poppler.  After all, we only need one application to use poppler
to break even.


%package -n lib%{name}
Summary: PDF rendering library
Group: System/Libraries
Requires: poppler-data
%description -n lib%{name}
Poppler is a fork of the xpdf PDF viewer developed by Derek Noonburg
of Glyph and Cog, LLC.  The purpose of forking xpdf is twofold.
First, we want to provide PDF rendering functionality as a shared
library, to centralize the maintenence effort.  Today a number of
applications incorporate the xpdf code base, and whenever a security
issue is discovered, all these applications exchange patches and put
out new releases.  In turn, all distributions must package and release
new version of these xpdf based viewers.  It's safe to say that
there's a lot of duplicated effort with the current situaion.  Even if
poppler in the short term introduces yet another xpdf derived code
base to the world, we hope that over time these applications will
adopt poppler.  After all, we only need one application to use poppler
to break even.

%package -n %rname
Group: Publishing
Summary: PDF rendering library utils
Requires: lib%name = %version-%release
Provides: xpdf-utils = 3.02-alt6
Obsoletes: xpdf-utils <= 3.02-alt5
Conflicts: xpdf-reader <= 3.02-alt5
Conflicts: pdftohtml
%description -n %rname
Poppler is a fork of the xpdf PDF viewer developed by Derek Noonburg
of Glyph and Cog, LLC.  The purpose of forking xpdf is twofold.
First, we want to provide PDF rendering functionality as a shared
library, to centralize the maintenence effort.  Today a number of
applications incorporate the xpdf code base, and whenever a security
issue is discovered, all these applications exchange patches and put
out new releases.  In turn, all distributions must package and release
new version of these xpdf based viewers.  It's safe to say that
there's a lot of duplicated effort with the current situaion.  Even if
poppler in the short term introduces yet another xpdf derived code
base to the world, we hope that over time these applications will
adopt poppler.  After all, we only need one application to use poppler
to break even.

%package -n lib%{rname}%{somajor_qt}-qt
Summary: Qt3 frontend library for %name
Group: System/Libraries
Requires: lib%name = %version-%release
Requires: libqt3 >= %{get_version libqt3}
Provides: lib%rname-qt = %version-%release
Obsoletes: lib%rname-qt < %version-%release
%popIF_ver_gteq "%major.%minor" "0.10"
Provides: libpoppler08-qt = %version-%release
Obsoletes: libpoppler08-qt < %version-%release
%if "%somajor_qt" != "4"
Provides: libpoppler4-qt = %version-%release
Obsoletes: libpoppler4-qt < %version-%release
%endif
%endif
%description -n lib%{rname}%{somajor_qt}-qt
Qt3 frontend library for %name

%package -n lib%{rname}%{somajor_qt4}-qt4
Summary: Qt4 frontend library for %name
Group: System/Libraries
Requires: lib%name = %version-%release
Requires: libqt4-core >= %{get_version libqt4-core}
%popIF_ver_gteq "%major.%minor" "0.10"
Provides: libpoppler08-qt4 = %version-%release
Obsoletes: libpoppler08-qt4 < %version-%release
%if "%somajor_qt4" != "4"
Provides: libpoppler4-qt4 = %version-%release
Obsoletes: libpoppler4-qt4 < %version-%release
%endif
%endif
%description -n lib%{rname}%{somajor_qt4}-qt4
Qt4 frontend library for %name

%package -n lib%{rname}%{somajor_glib}-glib
Summary: Glib frontend library for %name
Group: System/Libraries
Requires: lib%name = %version-%release
%description -n lib%{rname}%{somajor_glib}-glib
Glib frontend library for %name

%package -n lib%rname-devel
Summary: Development files for %name
Group: Development/C
Provides: lib%name-devel = %version-%release
Obsoletes: lib%name-devel < %version-%release
Requires: lib%name = %version-%release
%description -n lib%rname-devel
Libraries, include files, etc you can use to develop poppler applications

%package -n lib%rname-glib-devel
Summary: Development files for %name-glib
Group: Development/GNOME and GTK+
Requires: lib%rname%somajor_glib-glib = %version-%release
Requires: lib%rname-devel = %version-%release
%description -n lib%rname-glib-devel
Libraries, include files, etc you can use to develop
poppler applications with Glib/Gtk+

%package -n lib%rname-qt-devel
Summary: Development files for %name-qt
Group: Development/KDE and QT
Requires: lib%rname%somajor_qt-qt = %version-%release
Requires: lib%rname-devel = %version-%release
%description -n lib%rname-qt-devel
Libraries, include files, etc you can use to develop
poppler applications with Qt3

%package -n lib%rname-qt4-devel
Summary: Development files for %name-qt4
Group: Development/KDE and QT
Requires: lib%rname%somajor_qt4-qt4 = %version-%release
Requires: lib%rname-devel = %version-%release
%description -n lib%rname-qt4-devel
Libraries, include files, etc you can use to develop
poppler applications with Qt4

%package -n lib%rname-devel-static
Summary: Static libraries for libpoppler
Group: Development/Other
Provides: lib%name-devel-static = %version-%release
Obsoletes: lib%name-devel-static < %version-%release
Requires: lib%rname-devel = %version-%release
%description -n lib%rname-devel-static
This package contains development libraries required for packaging
statically linked libpoppler-based software


%prep
%setup -q -n %rname-%version
install -m 0644 %SOURCE1 poppler/
install -m 0644 %SOURCE2 glib/
install -m 0644 %SOURCE3 qt4/src/
install -m 0644 %SOURCE4 qt/
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch10 -p2
%patch100 -p1
%patch101 -p1
%patch102 -p1
#autoreconf -fisv
aclocal --force -I m4
automake
autoconf --force

%build
export QT3DIR=%_qt3dir QT4DIR=%_qt4dir
%configure \
    --disable-rpath \
    %{subst_enable static} \
    --enable-shared \
    --enable-compile-warnings=yes \
    --disable-abiword-output \
%if_enabled xpdfheaders
    --enable-xpdf-headers \
%endif
    --enable-zlib \
%if_disabled qt3
    --disable-poppler-qt \
%endif
%if_disabled qt4
    --disable-poppler-qt4 \
%endif
    --enable-compile-warnings=yes

%make_build


%install
%makeinstall


%files -n %rname
%_bindir/*
%_man1dir/*

%files -n lib%name
%doc AUTHORS ChangeLog NEWS README* TODO
%_libdir/libpoppler.so.*

%files -n lib%{rname}%{somajor_glib}-glib
%_libdir/libpoppler-glib.so.*

%if_enabled qt3
%files -n lib%{rname}%{somajor_qt}-qt
%_libdir/libpoppler-qt.so.*
%endif

%if_enabled qt4
%files -n lib%{rname}%{somajor_qt4}-qt4
%_libdir/libpoppler-qt4.so.*
%endif

%files -n lib%rname-devel
%dir %_includedir/poppler
%_includedir/poppler/*.h
#%_includedir/poppler/Function.cc
%_includedir/poppler/fofi
%_includedir/poppler/splash/
%_includedir/poppler/goo/
%_libdir/libpoppler.so
%_pkgconfigdir/poppler.pc
%_pkgconfigdir/poppler-splash.pc
#%_datadir/gtk-doc/html/poppler

%files -n lib%rname-glib-devel
%_includedir/poppler/glib/
%_libdir/libpoppler-glib.so
%_pkgconfigdir/poppler-cairo.pc
%_pkgconfigdir/poppler-glib.pc

%if_enabled qt3
%files -n lib%rname-qt-devel
%_includedir/poppler/qt3/
%_libdir/libpoppler-qt.so
%_pkgconfigdir/poppler-qt.pc
%endif

%if_enabled qt4
%files -n lib%rname-qt4-devel
%_includedir/poppler/qt4/
%_libdir/libpoppler-qt4.so
%_pkgconfigdir/poppler-qt4.pc
%endif

%if_enabled static
%files -n lib%rname-devel-static
%_libdir/*.a
%endif

%changelog
* Fri Nov 12 2010 Andrey Cherepanov <cas@altlinux.org> 0.12.4-alt0.M50P.3
- backport to p5 branch (fixed CVE-2010-3703, CVE-2010-3702, CVE-2010-3704)

* Wed Oct 20 2010 Sergey V Turchin <zerg@altlinux.org> 0.12.4-alt0.M51.3
- fix CVE-2010-3703

* Thu Oct 14 2010 Sergey V Turchin <zerg@altlinux.org> 0.12.4-alt0.M51.2
- fix CVE-2010-3702, CVE-2010-3704

* Fri Feb 26 2010 Sergey V Turchin <zerg@altlinux.org> 0.12.4-alt0.M51.1
- built for M51

* Fri Feb 26 2010 Sergey V Turchin <zerg@altlinux.org> 0.12.4-alt1
- new version
- built with lcms
- update version scripts

* Tue Dec 29 2009 Sergey V Turchin <zerg@altlinux.org> 0.12.3-alt0.M51.1
- built for M51

* Tue Dec 29 2009 Sergey V Turchin <zerg@altlinux.org> 0.12.3-alt1
- new version

* Fri Dec 11 2009 Sergey V Turchin <zerg@altlinux.org> 0.12.2-alt0.M51.1
- built for M51

* Fri Dec 11 2009 Sergey V Turchin <zerg@altlinux.org> 0.12.2-alt1
- new version
- CVE-2009-3607

* Mon Oct 19 2009 Sergey V Turchin <zerg@altlinux.org> 0.12.1-alt1
- new version
- add linker version script for libpoppler
- security fixes:
    - CVE-2009-3608 ObjectStream integer overflow

* Mon Sep 14 2009 Sergey V Turchin <zerg@altlinux.org> 0.12.0-alt1
- new version

* Tue Jul 07 2009 Sergey V Turchin <zerg@altlinux.org> 0.10.7-alt2
- obsolete xpdf-utils

* Tue May 19 2009 Sergey V Turchin <zerg@altlinux.org> 0.10.7-alt1
- new version

* Tue Apr 21 2009 Sergey V Turchin <zerg@altlinux.org> 0.10.6-alt2
- built for sisyphus

* Mon Apr 20 2009 Vladimir Lettiev <crux@altlinux.ru> 0.10.6-alt1
- new version
- security fixes:
    - CVE-2009-0799 xpdf OOB Read
    - CVE-2009-0800 xpdf Multiple Input Validation Flaws
    - CVE-2009-1179 xpdf Integer Overflow
    - CVE-2009-1180 xpdf Invalid free()
    - CVE-2009-1181 xpdf NULL dereference DoS
    - CVE-2009-1182 xpdf MMR Decoder Buffer Overflows
    - CVE-2009-1183 xpdf MMR Infinite Loop DoS
    - CVE-2009-1187 poppler CairoOutputDev integer overflow
    - CVE-2009-1188 poppler SplashBitmap integer overflow

* Mon Mar 16 2009 Sergey V Turchin <zerg@altlinux.org> 0.10.5-alt1
- new version

* Tue Feb 17 2009 Sergey V Turchin <zerg at altlinux dot org> 0.10.4-alt3
- fix build requires

* Mon Feb 16 2009 Sergey V Turchin <zerg at altlinux dot org> 0.10.4-alt1
- new version (fixes SA:33853)

* Tue Jan 13 2009 Sergey V Turchin <zerg at altlinux dot org> 0.10.3-alt1
- new version

* Tue Dec 16 2008 Sergey V Turchin <zerg at altlinux dot org> 0.10.2-alt1
- new version
- remove deprecated macroses from specfile

* Thu Oct 16 2008 Sergey V Turchin <zerg at altlinux dot org> 0.10.0-alt3
- fix provides/obsoletes

* Tue Oct 14 2008 Sergey V Turchin <zerg at altlinux dot org> 0.10.0-alt2
- fix provides/obsoletes
- add versioning to qt4 subpackage

* Mon Oct 13 2008 Sergey V Turchin <zerg at altlinux dot org> 0.10.0-alt1
- new version

* Thu Oct 09 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.7-alt2
- don't use cmake (fix #17493)

* Thu Sep 11 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.7-alt1
- new version

* Fri Aug 22 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.6-alt1
- new version
- add conflict to pdftohtml

* Tue Jul 29 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.5-alt1
- new version
- built with zlib
- CVE-2008-2950

* Mon Jun 09 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.3-alt2
- fix conflicts to xpdf-reader

* Sat Jun 07 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.3-alt1
- new version

* Fri Apr 18 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.0-alt4
- fix to install OptionalContent.h

* Fri Apr 18 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.0-alt3
- rename devel subpackages to real names
- rebuilt with new cairo
- add patch from RH to fix a crash when no optional content groups are defined

* Tue Apr 15 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.0-alt2
- fix lib install dir on x86_64

* Tue Apr 15 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.0-alt1
- new version

* Mon Apr 14 2008 Sergey V Turchin <zerg at altlinux dot org> 0.8.0-alt1
- new version

* Tue Feb 26 2008 Sergey V Turchin <zerg at altlinux dot org> 0.6.4-alt1
- new version
- add patch from FC to make ObjStream usable

* Thu Dec 27 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6.3-alt1
- new version

* Thu Nov 08 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6.1-alt3
- add patch to fix CVE-2007-4352, CVE-2007-5392, CVE-2007-5393

* Wed Oct 17 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6.1-alt2
- fix tarball

* Fri Oct 12 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6.1-alt1
- new version

* Mon Oct 08 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6-alt6
- fix provides/obsoletes

* Mon Oct 08 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6-alt5
- replace poppler-0.5

* Wed Sep 26 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6-alt4
- include unsupported xpdf headers into devel package

* Mon Sep 24 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6-alt3
- add obsoletes instead conflicts

* Wed Sep 19 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6-alt2
- provide devel packages to override poppler-devel-0.5

* Tue Sep 04 2007 Sergey V Turchin <zerg at altlinux dot org> 0.6-alt1
- new version

* Mon Aug 06 2007 Sergey V Turchin <zerg at altlinux dot org> 0.5.4-alt6
- add patch to fix CVE-2007-3387

* Mon Jun 25 2007 Sergey V Turchin <zerg at altlinux dot org> 0.5.4-alt5
- fix %%files intersections (#11804)

* Wed Nov 01 2006 Sergey V Turchin <zerg at altlinux dot org> 0.5.4-alt4
- fix patch for cairo

* Tue Oct 31 2006 Sergey V Turchin <zerg at altlinux dot org> 0.5.4-alt3
- fix compile with cairo < 0.9

* Tue Oct 03 2006 Sergey V Turchin <zerg at altlinux dot org> 0.5.4-alt2
- fix find Qt4 on x86_64

* Mon Oct 02 2006 Sergey V Turchin <zerg at altlinux dot org> 0.5.4-alt1
- new version
- built with Qt4

* Mon Jul 17 2006 Sergey V Turchin <zerg at altlinux dot org> 0.5.3-alt1
- new version

* Mon Jun 05 2006 Sergey V Turchin <zerg at altlinux dot org> 0.5.1-alt2
- built without Qt4

* Tue May 16 2006 Sergey V Turchin <zerg at altlinux dot org> 0.5.1-alt1
- new version
- fix %%files in -devel subpackages
- built with Qt4

* Fri Mar 31 2006 Sergey V Turchin <zerg at altlinux dot org> 0.4.5-alt2
- fix lib*.so list in *-devel packages

* Tue Feb 14 2006 ALT QA Team Robot <qa-robot@altlinux.org> 0.4.5-alt1
- Updated to 0.4.5.
- Cleaned up the spec a bit.

* Wed Feb 08 2006 Sergey V Turchin <zerg at altlinux dot org> 0.4.4-alt2
- fix linking with qt
- split qt,glib,devel libraries to subpackages
- fix %%url
- fix requires
- fix build requires

* Thu Feb 02 2006 ALT QA Team Robot <qa-robot@altlinux.org> 0.4.4-alt1.1
- Rebuilt for new pkg-config dependencies.

* Wed Jan 11 2006 Andrey Semenov <mitrofan@altlinux.ru> 0.4.4-alt1
- new  version

* Tue Dec 13 2005 Andrey Semenov <mitrofan@altlinux.ru> 0.4.3-alt1
- new version

* Mon Sep 05 2005 Andrey Semenov <mitrofan@altlinux.ru> 0.4.2-alt1
- 0.4.2

* Mon Aug 29 2005 Andrey Semenov <mitrofan@altlinux.ru> 0.4.1-alt1
- new version

* Tue Jun 21 2005 Andrey Semenov <mitrofan@altlinux.ru> 0.3.3-alt1
- 0.3.3

* Mon Jun 06 2005 Andrey Semenov <mitrofan@altlinux.ru> 0.3.2-alt2
- Change package summary

* Wed May 25 2005 Andrey Semenov <mitrofan@altlinux.ru> 0.3.2-alt1
- First version of RPM