summaryrefslogtreecommitdiffstats
path: root/redhat/kdegraphics/trinity-kdegraphics-3.5.13.spec
blob: dcf5497299581e273216edcdcd03ecbd44da02b5 (plain)
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
# Default version for this component
%if "%{?version}" == ""
%define version 3.5.13
%endif
%define release 4

# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
%define _variant .opt
%define _docdir %{_prefix}/share/doc
%endif

# TDE 3.5.13 specific building variables
BuildRequires: cmake >= 2.8
%define tde_docdir %{_docdir}/kde
%define tde_includedir %{_includedir}/kde
%define tde_libdir %{_libdir}/trinity

# KDEGRAPHICS components
%if 0%{?fedora}
%define with_ksvg 1
%endif


Name:		trinity-kdegraphics
Version:	%{?version}
Release:	%{?release}%{?dist}%{_variant}
License:	GPL
Summary:    K Desktop Environment - Graphics Applications

Group:      Applications/Multimedia
Prefix:		%{_prefix}

Vendor:		Trinity Project
Packager:	Francois Andriot <[email protected]>
URL:		http://www.trinitydesktop.org/

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Source0:	kdegraphics-%{version}.tar.gz

# TDE 3.5.13
## RHEL / Fedora specific patches
# [kdegraphics/ksnapshot] Missing -lXext in LDFLAGS (required for Fedora 15)
Patch0:		kdegraphics-3.5.13-ksnapshot_ldflags.patch
# [kdegraphics/kpovmodeler] CMAKE does not detect GL/glu.h (on RHEL5)
Patch1:		kdegraphics-3.5.13-kpovmodeler_check_glu.patch
# [kdegraphics/kfile-plugins/dependencies/poppler-tqt] Compile 'poppler-tqt' only if HAVE_POPPLER_016
Patch2:		kdegraphics-3.5.13-disable_poppler.patch
# [kdegraphics/kpdf/xpdf] Disable 'mkstemps' support for RHEL5
Patch3:		kdegraphics-3.5.13-xpdf_disable_mkstemps.patch
# [kdegraphics/kpovmodeler] CMAKE missing GLU_LIBRARIES
Patch4:		kdegraphics-3.5.13-kpovmodeler_missing_gl_ldflags.patch
# [kdegraphics] Fix compilation with GCC 4.7
Patch5:		kdegraphics-3.5.13-fix_gcc47_compilation.patch

BuildRequires: tqtinterface-devel
BuildRequires: trinity-kdelibs-devel
BuildRequires: trinity-kdebase-devel
BuildRequires: gettext
BuildRequires: libmng-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libungif-devel
BuildRequires: automake libtool
BuildRequires: gphoto2-devel
BuildRequires: sane-backends-devel
BuildRequires: libusb-devel
BuildRequires: t1lib-devel
BuildRequires: libdrm-devel

# kgamma
BuildRequires: libXxf86vm-devel
#kfile-plugin
BuildRequires: OpenEXR-devel
# kpdf
BuildRequires: freetype-devel
BuildRequires: poppler-devel
BuildRequires: poppler-qt-devel >= 0.12
BuildRequires: libpaper-devel
# ksvg
%if 0%{?with_ksvg}
BuildRequires: fontconfig-devel
BuildRequires: lcms-devel
BuildRequires: libart_lgpl-devel
BuildRequires: libXmu-devel
%endif

# kpovmodeler
BuildRequires: libGL-devel libGLU-devel libXi-devel

# kuickshow
BuildRequires: imlib-devel

BuildRequires: fribidi-devel

Requires: tqtinterface
Requires: trinity-arts
Requires: trinity-kdelibs
Requires: ghostscript
Requires: %{name}-libs = %{version}-%{release}

%if "%{_prefix}" == "/usr"
Provides: kdegraphics3 = %{version}-%{release}
Conflicts: kdegraphics
%endif

%description
Graphics applications for the K Desktop Environment, including
* kamera (digital camera support)
* kcoloredit (palette editor and color chooser)
* kdvi (displays TeX .dvi files)
* kghostview (displays postscript files)
* kiconedit (icon editor)
* kooka (scanner application)
* kpdf (displays PDF files)
* kruler (screen ruler and color measurement tool)
* ksnapshot (screen capture utility)
* kview (image viewer for GIF, JPEG, TIFF, etc.)

%package devel
Summary: Development files for %{name} 
Provides: kdegraphics3-devel = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Group: Development/Libraries
%description devel
%{summary}.

## FIXME: move more stuff to -extras
%package extras
Summary: Extra applications from %{name} 
Group: Applications/Multimedia
Requires: %{name}-libs = %{version}-%{release}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%description extras
%{summary}, including:
* kfax
* kfaxview
* kpovmodler

%package libs
Summary: %{name} runtime libraries
Group:   System Environment/Libraries
Requires: trinity-kdelibs >= %{version}
# include to be paranoid, installing libs-only is still mostly untested -- Rex
Requires: %{name} = %{version}-%{release}
%description libs
%{summary}.



%prep
%setup -q -n kdegraphics
%patch0 -p1
%patch1 -p1
%patch2 -p1
%if 0%{?rhel} && 0%{?rhel} <= 5
%patch3 -p1
%endif
%patch4 -p1
%patch5 -p1 -b .gcc47

%build
unset QTDIR || : ; . /etc/profile.d/qt.sh
export PATH="%{_bindir}:${PATH}"
export PKG_CONFIG_PATH="%{_libdir}/pkgconfig"
export CMAKE_INCLUDE_PATH="%{_includedir}:%{_includedir}/tqt"
export LD_LIBRARY_PATH="%{_libdir}"

%__mkdir build
cd build
%cmake \
  -DWITH_T1LIB=ON \
  -DWITH_LIBPAPER=ON \
  -DWITH_TIFF=ON \
  -DWITH_OPENEXR=ON \
  -DWITH_PDF=ON \
  -DWITH_PDF=ON \
  -DBUILD_ALL=ON \
  ..

%__make %{?_smp_mflags}

%install
export PATH="%{_bindir}:${PATH}"
%__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot} -C build

# locale's
%find_lang %{name} || touch %{name}.lang
HTML_DIR=$(kde-config --expandvars --install html)
if [ -d %{buildroot}$HTML_DIR ]; then
for lang_dir in %{buildroot}$HTML_DIR/* ; do
  if [ -d $lang_dir ]; then
    lang=$(basename $lang_dir)
    echo "%lang($lang) $HTML_DIR/$lang/*" >> %{name}.lang
    # replace absolute symlinks with relative ones
    pushd $lang_dir
      for i in *; do
        [ -d $i -a -L $i/common ] && ln -nsf ../common $i/common
      done
    popd
  fi
done
fi

# rpmdocs
for dir in k* ; do
  for file in AUTHORS ChangeLog README TODO ; do
    if test -s "$dir/$file" ; then
       install -p -m644 -D "$dir/$file" "rpmdocs/$dir/$file"
       echo "%doc rpmdocs/$dir/" >> %{name}.lang
    fi
  done
done

# unpackaged files
# omit kpovmodeler-devel files (for now) -- Rex
rm -f %{buildroot}/libkpovmodeler.so


%clean
%__rm -rf %{buildroot}


%post
for f in crystalsvg hicolor ; do
  touch --no-create %{_datadir}/icons/${f} 2> /dev/null ||:
  gtk-update-icon-cache -q %{_datadir}/icons/${f} 2> /dev/null ||:
done
update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :

%postun
for f in crystalsvg hicolor ; do
  touch --no-create %{_datadir}/icons/${f} 2> /dev/null ||:
  gtk-update-icon-cache -q %{_datadir}/icons/${f} 2> /dev/null ||:
done
update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%post extras
/sbin/ldconfig ||:
for f in crystalsvg hicolor ; do
  touch --no-create %{_datadir}/icons/${f} 2> /dev/null ||:
  gtk-update-icon-cache -q %{_datadir}/icons/${f} 2> /dev/null ||:
done
update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :

%postun extras
/sbin/ldconfig ||:
for f in crystalsvg hicolor ; do
  touch --no-create %{_datadir}/icons/${f} 2> /dev/null ||:
  gtk-update-icon-cache -q %{_datadir}/icons/${f} 2> /dev/null ||:
done
update-desktop-database %{_datadir}/applications > /dev/null 2>&1 || :


%files extras
%defattr(-,root,root,-)

# kfax
%doc rpmdocs/kfax/
%{_bindir}/kfax
%{_datadir}/applications/kde/kfax.desktop
%{_datadir}/apps/kfax/
%{_datadir}/icons/hicolor/??x??/apps/kfax.png
%{_datadir}/icons/hicolor/scalable/apps/kfax.svgz

# kfaxview
%{_bindir}/kfaxview
%{_libdir}/libkfaximage.so
%{_libdir}/libkfaximage.la
%{tde_libdir}/kfaxviewpart.*
%{_datadir}/applications/kde/kfaxview.desktop
%{_datadir}/apps/kfaxview/
%{_datadir}/icons/hicolor/??x??/apps/kfaxview.png
%{_datadir}/icons/hicolor/scalable/apps/kfaxview.svgz
%{_datadir}/services/kfaxmultipage.desktop
%{_datadir}/services/kfaxmultipage_tiff.desktop

# kpovmodeler
%doc rpmdocs/kpovmodeler/
%doc %{tde_docdir}/HTML/en/kpovmodeler/
%{_bindir}/kpovmodeler
%{_libdir}/libkpovmodeler.so.*
%{_libdir}/libkpovmodeler.la
%{tde_libdir}/libkpovmodelerpart.*
%{_datadir}/applications/kde/kpovmodeler.desktop
%{_datadir}/apps/kpovmodeler/
%{_datadir}/icons/crystalsvg/*/mimetypes/kpovmodeler_doc.*
%{_datadir}/icons/hicolor/*/apps/kpovmodeler.*

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%doc rpmdocs/*

# kfax
%exclude %{_bindir}/kfax
%exclude %{_datadir}/applications/kde/kfax.desktop
%exclude %{_datadir}/apps/kfax/
%exclude %{_datadir}/icons/hicolor/*/apps/kfax.*

# kfaxview
%exclude %{_bindir}/kfaxview
%exclude %{_libdir}/libkfaximage.so
%exclude %{_libdir}/libkfaximage.la
%exclude %{tde_libdir}/kfaxviewpart.*
%exclude %{_datadir}/applications/kde/kfaxview.desktop
%exclude %{_datadir}/apps/kfaxview/
%exclude %{_datadir}/icons/hicolor/*/apps/kfaxview.*
%exclude %{_datadir}/services/kfaxmultipage.desktop
%exclude %{_datadir}/services/kfaxmultipage_tiff.desktop

# kpovmodeler
%exclude %{tde_docdir}/HTML/en/kpovmodeler/
%exclude %{_bindir}/kpovmodeler
%exclude %{_libdir}/libkpovmodeler.*
%exclude %{tde_libdir}/libkpovmodelerpart.*
%exclude %{_datadir}/applications/kde/kpovmodeler.desktop
%exclude %{_datadir}/apps/kpovmodeler/
%exclude %{_datadir}/icons/crystalsvg/*/mimetypes/kpovmodeler_doc.*
%exclude %{_datadir}/icons/hicolor/*/apps/kpovmodeler.*

%{_bindir}/*
%{_datadir}/applications/kde/*.desktop
%{_datadir}/applnk/Graphics/*kruler.desktop
%{_datadir}/apps/*
%{_datadir}/icons/crystalsvg/*/*/*
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/config*/*
%{_datadir}/service*/*
%{_datadir}/mimelnk/*/*
%{_libdir}/libkdeinit_*.so
%{tde_libdir}/*

%files libs
%defattr(-,root,root,-)
%exclude %{_libdir}/libkfaximage.la
%exclude %{_libdir}/libkpovmodeler.la
%exclude %{_libdir}/libkpovmodeler.so.*
%{_libdir}/lib*.so.*
%{_libdir}/lib*.la
# Why ???
%{_libdir}/libdjvu.so

%files devel
%defattr(-,root,root,-)
%{tde_includedir}/poppler-link-qt3.h
%{tde_includedir}/poppler-page-transition.h
%{tde_includedir}/poppler-qt.h
%{_includedir}/dom/*
%{_includedir}/ksvg/*
%{_includedir}/kviewshell/*
%{_includedir}/libtext2path-0.1/*
%{_includedir}/kmultipageInterface.h
%{_datadir}/cmake/*.cmake
%{_libdir}/lib*.so
#exclude %{_libdir}/libkpovmodeler.so
%exclude %{_libdir}/libkfaximage.so
%exclude %{_libdir}/libkdeinit_*.so
%exclude %{_libdir}/libdjvu.so

%changelog
* Tue Nov 22 2011 Francois Andriot <[email protected]> - 3.5.13-4
- Rebuild with poppler 0.12 for RHEL 5
- Re-adds qt-poppler include files

* Fri Nov 04 2011 Francois Andriot <[email protected]> - 3.5.13-3
- Updates BuildRequires

* Wed Nov 02 2011 Francois Andriot <[email protected]> - 3.5.13-2
- Fix kpovmodeler compilation on RHEL 5 (patch4)

* Sun Oct 30 2011 Francois Andriot <[email protected]> - 3.5.13-1
- Initial release for RHEL 6, RHEL 5 and Fedora 15
- RHEL 5 build has some features disabled (see patches)

* Sun Sep 11 2011 Francois Andriot <[email protected]> - 3.5.13-0
- Import to GIT