Пакет ghostscript: 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
%define gsver	8.63
%define dot_version 8.63
%define ijsver	0.35

Name: ghostscript
Version: %gsver
Release: alt0.M41.4

%define esp_name esp-ghostscript
%define gnu_name gnu-ghostscript

URL: http://www.ghostscript.com
License: GPL
Summary: PostScript interpreter and renderer, most printer drivers
Group: Publishing

Source:	 http://mirror3.cs.wisc.edu/pub/mirrors/ghost/GPL/current/%name.tar
Patch1: ghostscript-rh-fPIC.patch
Patch2: ghostscript-rh-scripts.patch
Patch3: espgs-alt-visibility.patch
Patch4: ghostscript-alt-ijs-version.patch

Patch100: ghostscript-8.63-CVE-2009-0583,0584.patch
Patch101: ghostscript-8.63-CVE-2009-0792.patch
Patch102: ghostscript-8.63-CVE-2009-0196.patch
Patch103: ghostscript-CVE-2008-0411.patch

Packager: Stanislav Ievlev <inger@altlinux.org>

#compatibility requires
Requires: %name-classic = %gsver-%release
Provides: %esp_name = %gsver, %gnu_name = %gsver
Obsoletes: %gnu_name, %esp_name

BuildPreReq: libcairo-devel

# Automatically added by buildreq on Fri Aug 03 2007 (-bi)
BuildRequires: gcc-c++ glibc-devel-static imake libcups-devel libgtk+2-devel libjpeg-devel libgnutls-devel  libssl-devel libtiff-devel libXext-devel libXt-devel xorg-cf-files

%package -n libijs
Version: %{ijsver}_%gsver
License: MIT
Summary: Dynamic library for the IJS printer driver plug-in interface
Group: Publishing
Url: http://www.linuxprinting.org/ijs/
Provides: libespijs = %{ijsver}_%gsver, libgnuijs = %{ijsver}_%gsver
Obsoletes: libgnuijs, libespijs

%package -n libijs-devel
Version: %{ijsver}_%gsver
License: MIT
Summary: Headers and links for compiling against
Group: Development/C
Url: http://www.linuxprinting.org/ijs/
Requires: libijs = %{ijsver}_%gsver-%release
Provides: libespijs-devel = %{ijsver}_%gsver, libgnuijs-devel = %{ijsver}_%gsver
Obsoletes: libgnuijs-devel, libespijs-devel

%package module-X
Summary: PostScript interpreter and renderer (additional support for X)
Version: %gsver
Group: Publishing
PreReq: %name-rip = %gsver-%release
Provides: %esp_name-module-X = %gsver, %gnu_name-module-X = %gsver
Obsoletes: %gnu_name-module-X, %esp_name-module-X

%package utils
Summary: Additional tools for configuring printers
Version: %gsver
Group: Publishing
PreReq: %name-rip = %gsver-%release
Provides: %esp_name-utils = %gsver, %gnu_name-utils = %gsver
Obsoletes: %gnu_name-utils, %esp_name-utils

%package -n libgs
Summary: Shared library for %name
Version: %gsver
Group: Publishing
Provides: %esp_name-lib = %gsver, %gnu_name-lib = %gsver, %name-lib = %gsver
Obsoletes: %gnu_name-lib, %esp_name-lib, %name-lib

%package -n libgs-devel
Summary: Development library for %name
Version: %gsver
Group: Development/C

%package classic
Summary: classic edition of %name
Version: %gsver
Group: Publishing
PreReq: %name-common = %gsver-%release
Provides: %name-rip = %gsver-%release
Provides: %esp_name-classic = %gsver, %gnu_name-classic = %gsver
Obsoletes: %gnu_name-classic, %esp_name-classic

%package minimal
Summary: minimal edition of %name
Version: %gsver
Group: Publishing
PreReq: %name-lib = %gsver-%release, %name-common = %gsver-%release
Provides: %name-rip = %gsver-%release
Provides: %esp_name-minimal = %gsver, %gnu_name-minimal = %gsver
Obsoletes: %gnu_name-minimal, %esp_name-minimal

%package gtk
Summary: %name with gtk
Version: %gsver
Group: Publishing
PreReq: %name-lib = %gsver-%release, %name-common = %gsver-%release
Provides: %name-rip = %gsver-%release
Provides: %esp_name-gtk = %gsver, %gnu_name-gtk = %gsver
Obsoletes: %gnu_name-gtk, %esp_name-gtk

%package common
Summary: Common files for the %name
Version: %gsver
Group: Publishing
Requires: urw-fonts >= 1.1
Provides: %esp_name-common = %gsver, %gnu_name-common = %gsver
Obsoletes: %gnu_name-common, %esp_name-common

%package cups
Summary: CUPS specific files %name
Version: %gsver
Group: Publishing
Requires:%name = %gsver-%release 
Provides: %esp_name-cups = %gsver

%description
Ghostscript is a set of software that provides a PostScript(TM) interpreter,
a set of C procedures (the Ghostscript library, which implements the
graphics capabilities in the PostScript language) and an interpreter for
Portable Document Format (PDF) files. Ghostscript translates PostScript code
into many common, bitmapped formats, like those understood by your printer
or screen. Ghostscript is normally used to display PostScript files and to
print PostScript files to non-PostScript printers.
Most applications use PostScript for printer output.

In addition, the package contains filters which transfer the raw
bitmap of GhostScript into the protocol of some additional printer
models.

You should install ghostscript if you need to display PostScript files, or
if you have a non-PostScript printer.

%description module-X
Ghostscript is a PostScript interpreter. It can render both PostScript
and PDF compliant files to devices which include an X window, many printer
formats (including support for colour printers), and popular graphics
file formats.
This version enhances ghostscript with X windows support.

%description utils
Tools for printer maintenance: Setting default options for most laser
printers (PJL-capable printers), cartridge changing and head aligning
for inkjet winprinters.

%description -n libijs
This is the API library for programs using the IJS printer driver
plug-in interface. Printer drivers using this interface can be added
to GhostScript (6.53 or newer) without needing to rebuild
GhostScript. Application programs providing an IJS interface can make
use of IJS printer drivers directly, without needing GhostScript.

%description -n libijs-devel
This package contains the static library and the header files needed
to compile applications using this library.

%description -n libgs
Shared library for %name

%description -n libgs-devel
Development library for %name

%description classic
Classic edition of %name

%description minimal
Minimal edition of %name

%description gtk
%name with gtk

%description common
Common files for the %name

%description cups
CUPS specific files %name

%prep
%setup -q -n %name
%patch1 -p1
%patch2 -p1
%patch3 -p2
%patch4 -p1

%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1

%autoreconf

%build
export CFLAGS=-DA4
pushd ijs*
	./autogen.sh
	%configure --enable-shared
	%make
popd


./autogen.sh

%configure --enable-dynamic \
           --with-ijs \
           --with-jpeg \
           --without-jasper \
	   --with-x \
	   --with-drivers=ALL,opvp \
	   --with-fontpath=/usr/share/fonts/default:\
/usr/share/fonts/type1:\
/usr/share/fonts/type1/urw:\
/usr/share/fonts

# Set documentation dir
#perl -p -i -e 's|^(docdir=).*$|$1\$\(datadir\)/doc/%{name}-%{gsver}|' Makefile
# Fix references to X11 libraries
#%__subst "s|/usr/X11R6/lib/|%_libdir|g" Makefile src/*.mak

# Correct paths for CJK fonts
%__subst "s:/usr/share/ghostscript/:/usr/share/ghostscript/Resource/:g" lib/gs_res.ps
%__subst "s:ghostscript/Resource/fonts:ghostscript/Resource/Font:g" lib/gs_res.ps

#NO SMP
%make
%make so

%install

make install soinstall \
%{?_with_freetype:FT_BRIDGE=1} \
	prefix=$RPM_BUILD_ROOT%{_prefix} \
	mandir=$RPM_BUILD_ROOT%{_mandir} \
	datadir=$RPM_BUILD_ROOT%{_datadir} \
	gsincludedir=$RPM_BUILD_ROOT%{_includedir}/ghostscript \
	bindir=$RPM_BUILD_ROOT%{_bindir} \
	libdir=$RPM_BUILD_ROOT%{_libdir} \
	docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%gsver \
	gsdir=$RPM_BUILD_ROOT%{_datadir}/%{name} \
	gsdatadir=$RPM_BUILD_ROOT%{_datadir}/%{name}/%gsver \
	gssharedir=$RPM_BUILD_ROOT%{_libdir}/%{name}/%gsver \
	CUPSSERVERROOT=$RPM_BUILD_ROOT`cups-config --serverroot` \
	CUPSSERVERBIN=$RPM_BUILD_ROOT`cups-config --serverbin` \
	CUPSDATA=$RPM_BUILD_ROOT`cups-config --datadir`

#ijs
pushd ijs
    install -d $RPM_BUILD_ROOT%_includedir/ijs
    %makeinstall
    cp ijs_server_example %buildroot/usr/bin/
    chmod -x $RPM_BUILD_ROOT%_includedir/ijs/*
popd


rm -rf $RPM_BUILD_ROOT%_mandir/de

# X11.so always gets loaded, even with 'gs --help'
mkdir -p %buildroot/etc/buildreqs/packages/ignore.d
echo %name-module-X >%buildroot/etc/buildreqs/packages/ignore.d/%name-module-X

%post -n libgs -p %post_ldconfig
%postun -n libgs -p %postun_ldconfig

%post -n libijs -p %post_ldconfig
%postun -n libijs -p %postun_ldconfig

%files

%files common
%doc %_docdir/%name-%gsver
%_datadir/ghostscript
%_bindir/pdf2dsc
%_bindir/pdf2ps
%_bindir/gsnd

%files cups
%config(noreplace) %_sysconfdir/cups/*
/usr/lib/cups/filter/*
%_datadir/cups/model/*

%files classic
%_bindir/gs

%files minimal
%_bindir/gsc

%files gtk
%_bindir/gsx

%files utils
%_bindir/*
#common excludes
%exclude %_bindir/gs
%exclude %_bindir/gsc
%exclude %_bindir/gsx
%exclude %_bindir/*ijs*
%exclude %_bindir/pdf2dsc
%exclude %_bindir/pdf2ps
%exclude %_bindir/gsnd
%_man1dir/*

%files module-X
%_libdir/ghostscript
/etc/buildreqs/packages/ignore.d/%name-module-X

%files -n libgs
%_libdir/libgs.so.*

%files -n libgs-devel
%_libdir/libgs.so
%_includedir/%name

%files -n libijs
%_libdir/libijs.so.*

%files -n libijs-devel
%doc ijs/README
%_bindir/ijs-config
%_bindir/ijs_client_example
%_bindir/ijs_server_example
%_libdir/pkgconfig/*
%_libdir/libijs.so
%_includedir/ijs

%changelog
* Fri Dec 09 2011 Andriy Stepanov <stanv@altlinux.ru> 8.63-alt0.M41.4
- CVE-2008-0411

* Fri Apr 17 2009 Stanislav Ievlev <inger@altlinux.org> 8.63-alt0.M41.3
- CVE-2009-0792, CVE-2009-0196

* Fri Mar 20 2009 Stanislav Ievlev <inger@altlinux.org> 8.63-alt0.M41.2
- CVE-2009-0583, CVE-2009-0584

* Sat Feb 14 2009 Igor Vlasenko <viy@altlinux.org> 8.63-alt0.M41.1
- backport for M41 (due to frequent hangs of 8.62)

* Sat Nov 22 2008 Fr. Br. George <george@altlinux.ru> 8.63-alt1.1
- A4 definition added

* Fri Oct 03 2008 Stanislav Ievlev <inger@altlinux.org> 8.63-alt1
- 8.63

* Thu May 08 2008 Stanislav Ievlev <inger@altlinux.org> 8.62-alt1
- 8.62
- rename ghostscript-lib to libgs, add devel part

* Thu Mar 27 2008 Stanislav Ievlev <inger@altlinux.org> 8.60-alt3
- build for Sisyphus with changes from at@: spec: ghostscript-module-X11 ignore file for buildreq

* Thu Feb 28 2008 Stanislav Ievlev <inger@altlinux.org> 8.60-alt2
- CVE-2008-0411

* Thu Nov 08 2007 Stanislav Ievlev <inger@altlinux.org> 8.60-alt1
- remove deps on ghostscript-drivers

* Mon Aug 06 2007 Stanislav Ievlev <inger@altlinux.org> 8.60-alt0.3
- improve latest hack

* Mon Aug 06 2007 Stanislav Ievlev <inger@altlinux.org> 8.60-alt0.2
- fix build on i586

* Fri Aug 03 2007 Stanislav Ievlev <inger@altlinux.org> 8.60-alt0.1
- 8.60 (test build)
- disable jasper library (ghostscript can work with internal copy of library)

* Thu Jun 28 2007 Kirill A. Shutemov <kas@altlinux.ru> 8.15.4-alt1.1
- Drop BuildPreReq: kernel-headers-std

* Thu Mar 15 2007 Stanislav Ievlev <inger@altlinux.org> 8.15.4-alt1
- 8.15.4 (bugfix release)

* Thu Jan 25 2007 Stanislav Ievlev <inger@altlinux.org> 8.15.3-alt0.3
- apply 64 fix from RH (bug #177763 in bugzilla.redhat.com)

* Fri Dec 29 2006 Stanislav Ievlev <inger@altlinux.org> 8.15.3-alt0.2
- Change default visibility for the libraries (avm)

* Fri Oct 13 2006 Stanislav Ievlev <inger@altlinux.org> 8.15.3-alt0.1
- 8.15.3

* Wed May 24 2006 Stanislav Ievlev <inger@altlinux.org> 8.15.2-alt0.1
- 8.15.2

* Thu Mar 23 2006 Stanislav Ievlev <inger@altlinux.org> 8.15.1-alt0.1
- 8.15.1

* Fri May 13 2005 Stanislav Ievlev <inger@altlinux.org> 8.15.0-alt0.1
- 8.15
- all additional drivers are in separate package now

* Tue Jan 18 2005 ALT QA Team Robot <qa-robot@altlinux.org> 7.07.1-alt6.1
- Rebuilt with libstdc++.so.6.

* Thu Oct 07 2004 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt6
- turn off fontconfig patch (author of this patch RH has been discovered some strange problems)

* Wed Sep 22 2004 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt5
- driver updates

* Fri Sep 17 2004 ALT QA Team Robot <qa-robot@altlinux.org> 7.07.1-alt4.1.1
- Rebuilt with libtiff.so.4.

* Tue May 11 2004 ALT QA Team Robot <qa-robot@altlinux.org> 7.07.1-alt4.1
- Rebuilt with openssl-0.9.7d.

* Tue May 11 2004 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt4
- fix bootstrap

* Wed May 05 2004 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt3
- added ppmtomd driver
- added support for KRGB (from hpijs 1.6)
- don't build cat files (was problems with building in hasher)

* Mon Mar 15 2004 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt2
- update epsonepl driver to add support for EPL6200L

* Fri Feb 13 2004 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt1
- fix requires (urw-fonts) in common package.

* Tue Feb 10 2004 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt0.4
- rename back to ghostscript (to minor problems on update)
- added pentaxpj driver for Pentax PocketJet printers

* Thu Dec 25 2003 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt0.3
- correct fontpath (was problems with printing Japanese)
- added lexmark Z11 driver

* Tue Dec 02 2003 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt0.2
- added epsonepl driver
- Daedalus release

* Thu Nov 06 2003 Stanislav Ievlev <inger@altlinux.org> 7.07.1-alt0.1
- 7.07.1
- change font path
- fix requires module-X and drivers (added virtual providing %name-rip)
	 

* Fri May 16 2003 Stanislav Ievlev <inger@altlinux.ru> 7.05.6-alt0.8
- added pnm2ppa and pbm2ppa (old version of pnm2ppa) drivers for HP PPA WinPrinters
- fix requires (classic doesn't need lib)

* Wed May 07 2003 Stanislav Ievlev <inger@altlinux.ru> 7.05.6-alt0.7
- added CID support

* Wed Apr 30 2003 Stanislav Ievlev <inger@altlinux.ru> 7.05.6-alt0.6
- added module X11 feature
- pdf2dsc, pdf2ps moved to common like in gnu ghostscript (gv need it)
- added ml85p driver (Samsung ML-85G and QL-85G winprinters)

* Mon Apr 07 2003 Stanislav Ievlev <inger@altlinux.ru> 7.05.6-alt0.5
- Initial release