summaryrefslogtreecommitdiffstats
path: root/redhat/tdegraphics/trinity-kdegraphics-3.5.13.1.spec
blob: 2268633daee4e2872895dd92f97525964a020f66 (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
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
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?tde_prefix}" != "/usr"
%define _variant .opt
%endif

# TDE 3.5.13 specific building variables
%define tde_bindir %{tde_prefix}/bin
%define tde_datadir %{tde_prefix}/share
%define tde_docdir %{tde_datadir}/doc
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}

%define tde_tdeappdir %{tde_datadir}/applications/kde
%define tde_tdedocdir %{tde_docdir}/tde
%define tde_tdeincludedir %{tde_includedir}/tde
%define tde_tdelibdir %{tde_libdir}/trinity

%define _docdir %{tde_docdir}


Name:		trinity-tdegraphics
Version:	3.5.13.1
Release:	1%{?dist}%{_variant}
License:	GPL
Summary:    Trinity Desktop Environment - Graphics Applications

Group:      Applications/Multimedia
Prefix:		%{tde_prefix}

Vendor:		Trinity Project
Packager:	Francois Andriot <francois.andriot@free.fr>
URL:		http://www.trinitydesktop.org/

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

Source0:	kdegraphics-3.5.13.1.tar.gz

# TDE 3.5.13
## RHEL / Fedora specific patches
# [kdegraphics/kpdf/xpdf] Disable 'mkstemps' support for RHEL5
Patch3:		kdegraphics-3.5.13-xpdf_disable_mkstemps.patch
# [tdegraphics] Fix poppler include directory location
Patch9:		kdegraphics-3.5.13-fix_poppler_include_dir.patch
# [tdegraohics] Fix poppler include directory location (2)
Patch10:	kdegraphics-3.5.13.1-fix_poppler_pkgconfig.patch

# [tdegraphics] Fix build on RHEL4
Patch201:	kdegraphics-3.5.13.1-fix_rhel4_libraries.patch

BuildRequires: cmake >= 2.8
BuildRequires: trinity-tqtinterface-devel >= %{version}
BuildRequires: trinity-tdelibs-devel >= %{version}
BuildRequires: trinity-tdebase-devel >= %{version}
BuildRequires: gettext
BuildRequires: libmng-devel
%if 0%{?mdkversion} && 0%{?pclinuxos} == 0
BuildRequires: %{_lib}png15-devel
%else
BuildRequires: libpng-devel
%endif
BuildRequires: libtiff-devel
BuildRequires: automake libtool
BuildRequires: libusb-devel
BuildRequires: pcre-devel

# GIF support
%if 0%{?suse_version}
BuildRequires: giflib-devel
%else
BuildRequires: libungif-devel
%endif

# GPHOTO2 support
%if 0%{?suse_version}
BuildRequires: libgphoto2-devel
%else
BuildRequires: gphoto2-devel
%endif

# PAPER support
%if 0%{?rhel} || 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion}
%define with_paper 1
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires:	%{_lib}paper-devel
%endif
%if 0%{?rhel} || 0%{?fedora}
BuildRequires:	libpaper-devel
%endif
%endif

# T1LIB support
%if 0%{?mgaversion} || 0%{?mdkversion} || 0%{?rhel} >= 5 || 0%{?fedora} || 0%{?suse_version}
%define with_t1lib 1
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires:	%{_lib}t1lib-devel
%endif
%if 0%{?rhel} >= 5 || 0%{?fedora} || 0%{?suse_version}
BuildRequires:	t1lib-devel
%endif
%endif

%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires:	%{_lib}sane1-devel
# kuickshow
#BuildRequires:	%{_lib}imlib-devel
# kpovmodeler
BuildRequires:	%{_lib}xi-devel
# kgamma
BuildRequires:	%{_lib}xxf86vm-devel
# ksvg
BuildRequires:	%{_lib}xmu%{?mgaversion:6}-devel
# kpovmodeler
BuildRequires:	%{_lib}mesagl1-devel
BuildRequires:	%{_lib}mesaglu1-devel
%else
BuildRequires:	sane-backends-devel

# kuickshow
#BuildRequires:	imlib-devel

%if 0%{?rhel} == 4
BuildRequires:	xorg-x11-devel
%else
BuildRequires: libdrm-devel

# kpovmodeler
BuildRequires:	libXi-devel

# kgamma
BuildRequires:	libXxf86vm-devel

# ksvg
BuildRequires:	libXmu-devel
%endif

# kpovmodeler
%if 0%{?suse_version}
BuildRequires:	Mesa-libGL-devel
BuildRequires:	Mesa-libGLU-devel
%else
BuildRequires:	libGL-devel
BuildRequires:	libGLU-devel
%endif
%endif

#kfile-plugin
BuildRequires:	OpenEXR-devel

# kpdf
BuildRequires: freetype-devel

# poppler
%if 0%{?rhel} >=6 || 0%{?fedora} >= 15 || 0%{?suse_version}
BuildRequires: poppler-devel >= 0.12
#BuildRequires:	poppler-qt-devel >= 0.12
%endif
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires:	%{_lib}poppler-devel
%endif
%if 0%{?rhel} >= 4 && 0%{?rhel} <= 5
# On RHEL 5, the distro-provided poppler is too old. We built a newer one.
BuildRequires:	trinity-poppler-devel
BuildRequires:	trinity-poppler-qt3-devel >= 0.12
%endif

# ksvg
BuildRequires: fontconfig-devel
%if 0%{?suse_version}
BuildRequires: liblcms-devel
%else
BuildRequires: lcms-devel
%endif
BuildRequires: libart_lgpl-devel

# kuickshow
BuildRequires: fribidi-devel

# kamera
%if 0%{?mgaversion} || 0%{?mdkversion} || 0%{?rhel} >= 5 || 0%{?fedora} || 0%{?suse_version}
%define build_kamera 1
%endif

Obsoletes:	trinity-kdegraphics < %{version}-%{release}
Provides:	trinity-kdegraphics = %{version}-%{release}
Obsoletes:	trinity-kdegraphics-libs < %{version}-%{release}
Provides:	trinity-kdegraphics-libs = %{version}-%{release}
Obsoletes:	trinity-kdegraphics-extras < %{version}-%{release}
Provides:	trinity-kdegraphics-extras = %{version}-%{release}


%{?build_kamera:Requires: trinity-kamera = %{version}-%{release}}
Requires: trinity-kcoloredit = %{version}-%{release}
Requires: %{name}-kfile-plugins = %{version}-%{release}
Requires: trinity-kdvi = %{version}-%{release}
Requires: trinity-kfax = %{version}-%{release}
Requires: trinity-kfaxview = %{version}-%{release}
Requires: trinity-kgamma = %{version}-%{release}
Requires: trinity-kghostview = %{version}-%{release}
Requires: trinity-kiconedit = %{version}-%{release}
Requires: trinity-kmrml = %{version}-%{release}
Requires: trinity-kolourpaint = %{version}-%{release}
Requires: trinity-kooka = %{version}-%{release}
Requires: trinity-kpdf = %{version}-%{release}
Requires: trinity-kpovmodeler = %{version}-%{release}
Requires: trinity-kruler = %{version}-%{release}
Requires: trinity-ksnapshot = %{version}-%{release}
Requires: trinity-ksvg = %{version}-%{release}
Requires: trinity-kview = %{version}-%{release}
Requires: trinity-kviewshell = %{version}-%{release}
Requires: trinity-libkscan = %{version}-%{release}
Requires: %{name}-libpoppler-tqt = %{version}-%{release}

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

%files

##########

%if 0%{?build_kamera}

%package -n trinity-kamera
Summary:	Digital camera io_slave for Konqueror
Group:		Applications/Graphics

%description -n trinity-kamera
This is a digital camera io_slave for TDE which uses gphoto2 and libgpio
to allow access to your camera's pictures with the URL camera:/

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

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

%files -n trinity-kamera
%defattr(-,root,root,-)
%{tde_tdelibdir}/kcm_kamera.la
%{tde_tdelibdir}/kcm_kamera.so
%{tde_tdelibdir}/kio_kamera.la
%{tde_tdelibdir}/kio_kamera.so
%{tde_tdeappdir}/kamera.desktop
%{tde_datadir}/icons/crystalsvg/*/actions/camera_test.png
%{tde_datadir}/icons/crystalsvg/*/apps/camera.png
%{tde_datadir}/icons/crystalsvg/*/devices/camera.png
%{tde_datadir}/icons/crystalsvg/*/filesystems/camera.png
%{tde_datadir}/services/camera.protocol
%{tde_tdedocdir}/HTML/en/kamera/

%endif

##########

%package -n trinity-kcoloredit
Summary:	A color palette editor and color picker for TDE
Group:		Applications/Graphics

%description -n trinity-kcoloredit
This package contains two programs, a color palette editor and also a color
picker.

%files -n trinity-kcoloredit
%defattr(-,root,root,-)
%{tde_bindir}/kcolorchooser
%{tde_bindir}/kcoloredit
%{tde_tdeappdir}/kcolorchooser.desktop
%{tde_tdeappdir}/kcoloredit.desktop
%{tde_datadir}/apps/kcoloredit/kcoloreditui.rc
%{tde_datadir}/icons/hicolor/*/apps/kcolorchooser.png
%{tde_datadir}/icons/hicolor/*/apps/kcoloredit.png
%{tde_tdedocdir}/HTML/en/kcoloredit/

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

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

##########

%package kfile-plugins
Summary:	TDE metainfo plugins for graphic files
Group:		Environment/Libraries
 
%description kfile-plugins
This packages provides meta information for graphic files (file sizes,
tags, etc. all from within the file manager).

%files kfile-plugins
%defattr(-,root,root,-)
%{tde_tdelibdir}/gsthumbnail.la
%{tde_tdelibdir}/gsthumbnail.so
%{tde_tdelibdir}/kfile_bmp.la
%{tde_tdelibdir}/kfile_bmp.so
%{tde_tdelibdir}/kfile_dds.la
%{tde_tdelibdir}/kfile_dds.so
%{tde_tdelibdir}/kfile_dvi.la
%{tde_tdelibdir}/kfile_dvi.so
%{tde_tdelibdir}/kfile_exr.la
%{tde_tdelibdir}/kfile_exr.so
%{tde_tdelibdir}/kfile_gif.la
%{tde_tdelibdir}/kfile_gif.so
%{tde_tdelibdir}/kfile_ico.la
%{tde_tdelibdir}/kfile_ico.so
%{tde_tdelibdir}/kfile_jpeg.la
%{tde_tdelibdir}/kfile_jpeg.so
%{tde_tdelibdir}/kfile_pcx.la
%{tde_tdelibdir}/kfile_pcx.so
%{tde_tdelibdir}/kfile_pdf.la
%{tde_tdelibdir}/kfile_pdf.so
%{tde_tdelibdir}/kfile_png.la
%{tde_tdelibdir}/kfile_png.so
%{tde_tdelibdir}/kfile_pnm.la
%{tde_tdelibdir}/kfile_pnm.so
%{tde_tdelibdir}/kfile_ps.la
%{tde_tdelibdir}/kfile_ps.so
%{tde_tdelibdir}/kfile_raw.la
%{tde_tdelibdir}/kfile_raw.so
%{tde_tdelibdir}/kfile_rgb.la
%{tde_tdelibdir}/kfile_rgb.so
%{tde_tdelibdir}/kfile_tga.la
%{tde_tdelibdir}/kfile_tga.so
%{tde_tdelibdir}/kfile_tiff.la
%{tde_tdelibdir}/kfile_tiff.so
%{tde_tdelibdir}/kfile_xbm.la
%{tde_tdelibdir}/kfile_xbm.so
%{tde_tdelibdir}/kfile_xpm.la
%{tde_tdelibdir}/kfile_xpm.so
%{tde_datadir}/services/gsthumbnail.desktop
%{tde_datadir}/services/kfile_bmp.desktop
%{tde_datadir}/services/kfile_dds.desktop
%{tde_datadir}/services/kfile_dvi.desktop
%{tde_datadir}/services/kfile_exr.desktop
%{tde_datadir}/services/kfile_gif.desktop
%{tde_datadir}/services/kfile_ico.desktop
%{tde_datadir}/services/kfile_jpeg.desktop
%{tde_datadir}/services/kfile_pcx.desktop
%{tde_datadir}/services/kfile_pdf.desktop
%{tde_datadir}/services/kfile_png.desktop
%{tde_datadir}/services/kfile_pnm.desktop
%{tde_datadir}/services/kfile_ps.desktop
%{tde_datadir}/services/kfile_raw.desktop
%{tde_datadir}/services/kfile_rgb.desktop
%{tde_datadir}/services/kfile_tga.desktop
%{tde_datadir}/services/kfile_tiff.desktop
%{tde_datadir}/services/kfile_xbm.desktop
%{tde_datadir}/services/kfile_xpm.desktop

##########

%package -n trinity-kdvi
Summary:	Dvi viewer for TDE
Group:		Applications/Graphics

%description -n trinity-kdvi
This program and KPart allow the user to display *.DVI files from TeX.

%files -n trinity-kdvi
%defattr(-,root,root,-)
%{tde_bindir}/kdvi
%{tde_tdelibdir}/kdvipart.la
%{tde_tdelibdir}/kdvipart.so
%{tde_tdeappdir}/kdvi.desktop
%{tde_datadir}/apps/kdvi/
%{tde_datadir}/config.kcfg/kdvi.kcfg
%{tde_datadir}/icons/hicolor/*/apps/kdvi.png
%{tde_datadir}/icons/hicolor/scalable/apps/kdvi.svgz
%{tde_datadir}/services/kdvimultipage.desktop
%{tde_tdedocdir}/HTML/en/kdvi/

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

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

##########

%package -n trinity-kfax
Summary:	G3/G4 fax viewer for Trinity
Group:		Applications/Graphics
Requires:	libtiff

%description -n trinity-kfax
A fax viewer for Trinity, supporting the display of raw and tiffed fax images
(g3, g3-2d, g4).

%files -n trinity-kfax
%defattr(-,root,root,-)
%doc rpmdocs/kfax/
%{tde_bindir}/kfax
%{tde_tdeappdir}/kfax.desktop
%{tde_datadir}/apps/kfax/
%{tde_datadir}/icons/hicolor/??x??/apps/kfax.png
%{tde_datadir}/icons/hicolor/scalable/apps/kfax.svgz

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

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

##########

%package -n trinity-kfaxview
Summary:	G3/G4 fax viewer for Trinity using kviewshell
Group:		Applications/Graphics

%description -n trinity-kfaxview
A fax viewer for Trinity, supporting the display of raw and tiffed fax images
(g3, g3-2d, g4).

This faxviewer uses kviewshell and is intended to replace the standalone
kfax application once it reproduces all of kfax's features.

%files -n trinity-kfaxview
%defattr(-,root,root,-)
%{tde_bindir}/kfaxview
%{tde_libdir}/libkfaximage.so.*
%{tde_tdelibdir}/kfaxviewpart.*
%{tde_tdeappdir}/kfaxview.desktop
%{tde_datadir}/apps/kfaxview/
%{tde_datadir}/icons/hicolor/??x??/apps/kfaxview.png
%{tde_datadir}/icons/hicolor/scalable/apps/kfaxview.svgz
%{tde_datadir}/services/kfaxmultipage.desktop
%{tde_datadir}/services/kfaxmultipage_tiff.desktop

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

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

##########

%package -n trinity-kgamma
Summary:	Gamma correction module for the Trinity Control Center
Group:		Applications/Graphics

%description -n trinity-kgamma
KGamma is a Trinity Control Center module for gamma calibration/correction
of XFree86. With proper gamma settings, your display (websites, images,
etc.) will look the same on your monitor as on other monitors.

Homepage: http://kgamma.berlios.de/index2.php

%files -n trinity-kgamma
%defattr(-,root,root,-)
%{tde_bindir}/xf86gammacfg
%{tde_tdelibdir}/kcm_kgamma.la
%{tde_tdelibdir}/kcm_kgamma.so
%{tde_tdeappdir}/kgamma.desktop
%{tde_datadir}/apps/kgamma/
%{tde_datadir}/icons/hicolor/*/apps/kgamma.png
%{tde_tdedocdir}/HTML/en/kgamma/

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

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

##########

%package -n trinity-kghostview
Summary:	PostScript viewer for Trinity
Group:		Applications/Graphics
Requires:	ghostscript

%description -n trinity-kghostview
KGhostview is Trinity's PostScript viewer. It is a port of Tim Theisen's
Ghostview program which is used to view documents prepared in Adobe's
PostScript page description language. PostScript is the major page
description language for printing on UNIX systems, and this application is
useful to preview material intended for printing, or for reading documents
online.

%files -n trinity-kghostview
%defattr(-,root,root,-)
%{tde_bindir}/kghostview
%{tde_tdelibdir}/libkghostviewpart.la
%{tde_tdelibdir}/libkghostviewpart.so
%{tde_libdir}/libkghostviewlib.so.*
%{tde_tdeappdir}/kghostview.desktop
%{tde_datadir}/apps/kconf_update/kghostview.upd
%{tde_datadir}/apps/kconf_update/update-to-xt-names.pl
%{tde_datadir}/apps/kghostview/
%{tde_datadir}/config.kcfg/kghostview.kcfg
%{tde_datadir}/icons/hicolor/*/apps/kghostview.png
%{tde_datadir}/services/kghostview_part.desktop
%{tde_tdedocdir}/HTML/en/kghostview/

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

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

##########

%package -n trinity-kiconedit
Summary:	An icon editor for Trinity
Group:		Applications/Graphics

%description -n trinity-kiconedit
KIconedit allows you easily to create and edit icons.

%files -n trinity-kiconedit
%defattr(-,root,root,-)
%{tde_bindir}/kiconedit
%{tde_tdeappdir}/kiconedit.desktop
%{tde_datadir}/apps/kiconedit/
%{tde_datadir}/icons/hicolor/*/apps/kiconedit.png
%{tde_tdedocdir}/HTML/en/kiconedit/

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

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

##########

%package -n trinity-kmrml
Summary: 	A Konqueror plugin for searching pictures
Group:		Applications/Graphics

%description -n trinity-kmrml
MRML is short for Multimedia Retrieval Markup Language, which defines a
protocol for querying a server for images based on their content. See 
http://www.mrml.net about MRML and the GNU Image Finding Tool (GIFT), an 
MRML server.

%files -n trinity-kmrml
%defattr(-,root,root,-)
%{tde_bindir}/mrmlsearch
%{tde_tdelibdir}/kcm_kmrml.la
%{tde_tdelibdir}/kcm_kmrml.so
%{tde_tdelibdir}/kded_daemonwatcher.la
%{tde_tdelibdir}/kded_daemonwatcher.so
%{tde_tdelibdir}/kio_mrml.la
%{tde_tdelibdir}/kio_mrml.so
%{tde_tdelibdir}/libkmrmlpart.la
%{tde_tdelibdir}/libkmrmlpart.so
%{tde_tdelibdir}/mrmlsearch.la
%{tde_tdelibdir}/mrmlsearch.so
%{tde_libdir}/lib[kt]deinit_mrmlsearch.so
%{tde_tdeappdir}/kcmkmrml.desktop
%{tde_datadir}/apps/konqueror/servicemenus/mrml-servicemenu.desktop
%{tde_datadir}/mimelnk/text/mrml.desktop
%{tde_datadir}/services/kded/daemonwatcher.desktop
%{tde_datadir}/services/mrml.protocol
%{tde_datadir}/services/mrml_part.desktop

%post -n trinity-kmrml
update-desktop-database %{tde_datadir}/applications > /dev/null 2>&1 || :
/sbin/ldconfig || :

%postun -n trinity-kmrml
update-desktop-database %{tde_datadir}/applications > /dev/null 2>&1 || :
/sbin/ldconfig || :

##########

%package -n trinity-kolourpaint
Summary:	A simple paint program for Trinity
Group:		Applications/Graphics

%description -n trinity-kolourpaint
KolourPaint is a very simple paint program for Trinity. It aims to be
conceptually simple to understand; providing a level of functionality
targeted towards the average user. It's designed for daily tasks like:

* Painting - drawing diagrams and "finger painting" 
* Image Manipulation - editing screenshots and photos; applying effects 
* Icon Editing - drawing clipart and logos with transparency 

It's not an unusable and monolithic program where simple tasks like
drawing lines become near impossible. Nor is it so simple that it lacks
essential features like Undo/Redo.

Homepage: http://kolourpaint.sourceforge.net

%files -n trinity-kolourpaint
%defattr(-,root,root,-)
%{tde_bindir}/kolourpaint
%{tde_tdeappdir}/kolourpaint.desktop
%{tde_datadir}/apps/kolourpaint/
%{tde_datadir}/icons/hicolor/*/apps/kolourpaint.png
%{tde_datadir}/icons/hicolor/scalable/apps/kolourpaint.svgz
%{tde_tdedocdir}/HTML/en/kolourpaint/

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

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

##########

%package -n trinity-kooka
Summary:	Scanner program for Trinity
Group:		Applications/Graphics

%description -n trinity-kooka
Kooka is an open source GNU/Linux scan program based on SANE and
KScan library.

Kooka helps you to handle the most important scan parameters, find the
correct image file format to save and manage your scanned images. It
offers support for different OCR modules. Libkscan, a autonomous part
of Kooka, provides a scan service for easy and consistent use to all
KDE applications.

Install ocrad or gocr if you wish to enable optical character recognition
in kooka.

Homepage: http://kooka.kde.org/

%files -n trinity-kooka
%defattr(-,root,root,-)
%{tde_datadir}/config/kookarc
%{tde_bindir}/kooka
%{tde_tdeappdir}/kooka.desktop
%{tde_datadir}/apps/kooka/
%{tde_tdedocdir}/HTML/en/kooka/

%post -n trinity-kooka
update-desktop-database %{tde_datadir}/applications > /dev/null 2>&1 || :

%postun -n trinity-kooka
update-desktop-database %{tde_datadir}/applications > /dev/null 2>&1 || :

##########

%package -n trinity-kpdf
Summary:	PDF viewer for Trinity
Group:		Applications/Graphics
#Recommends: kghostview-trinity (= ${binary:Version})

%description -n trinity-kpdf
KPDF allows you to view PDF (Portable Document Format) files. This package
includes kpdfpart so you can embed in konqueror or run as a standalone
application.

%files -n trinity-kpdf
%defattr(-,root,root,-)
%{tde_bindir}/kpdf
%{tde_tdelibdir}/libkpdfpart.la
%{tde_tdelibdir}/libkpdfpart.so
%{tde_tdeappdir}/kpdf.desktop
%{tde_datadir}/apps/kpdf/shell.rc
%{tde_datadir}/apps/kpdfpart/part.rc
%{tde_datadir}/config.kcfg/kpdf.kcfg
%{tde_tdedocdir}/HTML/en/kpdf/
%{tde_datadir}/icons/hicolor/*/apps/kpdf.png
%{tde_datadir}/icons/hicolor/scalable/apps/kpdf.svgz
%{tde_datadir}/services/kpdf_part.desktop

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

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

##########

%package -n trinity-kpovmodeler
Summary:	A graphical editor for povray scenes
Group:		Applications/Graphics
#Requires:	povray

%description -n trinity-kpovmodeler
KPovmodeler is KDE's graphical editor for povray scenes. KPovModeler is a
modeling and composition program for creating POV-Ray scenes in KDE.

For most modelers, POV-Ray is nothing but a rendering engine. This greatly
limits the innate possibilities of the POV-Ray scripted language. This
is not the case for KPovModeler, which allows you to use all the features
of POV-Ray through the translation of POV-Ray language into a graphical
tree.

kpovmodeler uses the povray package, currently available only in Debian's
non-free, unsupported repository.

Homepage: http://www.kpovmodeler.org

%files -n trinity-kpovmodeler
%defattr(-,root,root,-)
%doc rpmdocs/kpovmodeler/
%{tde_bindir}/kpovmodeler
%{tde_libdir}/libkpovmodeler.so.*
%{tde_tdelibdir}/libkpovmodelerpart.*
%{tde_tdeappdir}/kpovmodeler.desktop
%{tde_datadir}/apps/kpovmodeler/
%{tde_datadir}/icons/crystalsvg/*/mimetypes/kpovmodeler_doc.*
%{tde_datadir}/icons/hicolor/*/apps/kpovmodeler.*
%doc %{tde_tdedocdir}/HTML/en/kpovmodeler/

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

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

##########

%package -n trinity-kruler
Summary:	A screen ruler and color measurement tool for Trinity
Group:		Applications/Graphics

%description -n trinity-kruler
Kruler is a screen ruler (using pixels) and color measurement tool for KDE.

%files -n trinity-kruler
%defattr(-,root,root,-)
%{tde_bindir}/kruler
%{tde_tdeappdir}/kruler.desktop
%{tde_datadir}/applnk/Graphics/kruler.desktop
%{tde_datadir}/apps/kruler/
%{tde_datadir}/icons/hicolor/*/apps/kruler.png
%{tde_tdedocdir}/HTML/en/kruler/

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

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

##########

%package -n trinity-ksnapshot
Summary:	Screenshot utility for Trinity
Group:		Applications/Graphics

%description -n trinity-ksnapshot
KSnapshot is a simple applet for taking screenshots. It is capable of 
capturing images of either the whole desktop or just a single window. 
The images can then be saved in a variety of formats.

%files -n trinity-ksnapshot
%defattr(-,root,root,-)
%{tde_bindir}/ksnapshot
%{tde_tdeappdir}/ksnapshot.desktop
%{tde_datadir}/icons/hicolor/*/apps/ksnapshot.png
%{tde_datadir}/icons/hicolor/scalable/apps/ksnapshot.svgz
%{tde_tdedocdir}/HTML/en/ksnapshot/

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

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

##########

%package -n trinity-ksvg
Summary:	SVG viewer for Trinity
Group:		Applications/Graphics

%description -n trinity-ksvg
KSVG allows you view SVG (scalable vector graphics) files. This package
includes kpart so you can embed it in konqueror and a standalone
application.

%files -n trinity-ksvg
%defattr(-,root,root,-)
%{tde_bindir}/printnodetest
%{tde_bindir}/svgdisplay
%{tde_tdelibdir}/libksvgplugin.la
%{tde_tdelibdir}/libksvgplugin.so
%{tde_tdelibdir}/libksvgrendererlibart.la
%{tde_tdelibdir}/libksvgrendererlibart.so
%{tde_tdelibdir}/svgthumbnail.la
%{tde_tdelibdir}/svgthumbnail.so
%{tde_libdir}/libksvg.so.0
%{tde_libdir}/libksvg.so.0.0.1
%{tde_libdir}/libtext2path.so.0
%{tde_libdir}/libtext2path.so.0.0.0
%{tde_datadir}/apps/ksvg/ksvgplugin.rc
%{tde_datadir}/services/ksvglibartcanvas.desktop
%{tde_datadir}/services/ksvgplugin.desktop
%{tde_datadir}/services/svgthumbnail.desktop
%{tde_datadir}/servicetypes/ksvgrenderer.desktop

%post -n trinity-ksvg
/sbin/ldconfig || :

%postun -n trinity-ksvg
/sbin/ldconfig || :

##########

%package -n trinity-kview
Summary:	Simple image viewer/converter for Trinity
Group:		Applications/Graphics

%description -n trinity-kview
KView is a simple image viewer and converter application. It supports
a number of plugins, which add an array of basic editing capabilities
as well.

%files -n trinity-kview
%defattr(-,root,root,-)
%{tde_bindir}/kview
%{tde_tdelibdir}/kcm_kviewcanvasconfig.la
%{tde_tdelibdir}/kcm_kviewcanvasconfig.so
%{tde_tdelibdir}/kcm_kviewgeneralconfig.la
%{tde_tdelibdir}/kcm_kviewgeneralconfig.so
%{tde_tdelibdir}/kcm_kviewpluginsconfig.la
%{tde_tdelibdir}/kcm_kviewpluginsconfig.so
%{tde_tdelibdir}/kcm_kviewpresenterconfig.la
%{tde_tdelibdir}/kcm_kviewpresenterconfig.so
%{tde_tdelibdir}/kcm_kviewviewerpluginsconfig.la
%{tde_tdelibdir}/kcm_kviewviewerpluginsconfig.so
%{tde_tdelibdir}/kview.la
%{tde_tdelibdir}/kview.so
%{tde_tdelibdir}/kview_browserplugin.la
%{tde_tdelibdir}/kview_browserplugin.so
%{tde_tdelibdir}/kview_effectsplugin.la
%{tde_tdelibdir}/kview_effectsplugin.so
%{tde_tdelibdir}/kview_presenterplugin.la
%{tde_tdelibdir}/kview_presenterplugin.so
%{tde_tdelibdir}/kview_scannerplugin.la
%{tde_tdelibdir}/kview_scannerplugin.so
%{tde_tdelibdir}/libkviewcanvas.la
%{tde_tdelibdir}/libkviewcanvas.so
%{tde_tdelibdir}/libkviewviewer.la
%{tde_tdelibdir}/libkviewviewer.so
%{tde_libdir}/lib[kt]deinit_kview.so
%{tde_libdir}/libkimageviewer.so.*
%{tde_tdelibdir}/libphotobook.la
%{tde_tdelibdir}/libphotobook.so
%{tde_tdeappdir}/kview.desktop
%{tde_datadir}/apps/kview/
%{tde_datadir}/apps/kviewviewer/
%{tde_datadir}/apps/photobook/photobookui.rc
%{tde_datadir}/icons/crystalsvg/*/apps/photobook.png
%{tde_datadir}/icons/hicolor/*/apps/kview.png
%{tde_datadir}/services/kconfiguredialog/kviewcanvasconfig.desktop
%{tde_datadir}/services/kconfiguredialog/kviewgeneralconfig.desktop
%{tde_datadir}/services/kconfiguredialog/kviewpluginsconfig.desktop
%{tde_datadir}/services/kconfiguredialog/kviewpresenterconfig.desktop
%{tde_datadir}/services/kconfiguredialog/kviewviewerpluginsconfig.desktop
%{tde_datadir}/services/kviewcanvas.desktop
%{tde_datadir}/services/kviewviewer.desktop
%{tde_datadir}/services/photobook.desktop
%{tde_datadir}/servicetypes/kimageviewer.desktop
%{tde_datadir}/servicetypes/kimageviewercanvas.desktop
%{tde_tdedocdir}/HTML/en/kview/

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

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

##########

%package -n trinity-kviewshell
Summary:	Generic framework for viewer applications in Trinity
Group:		Applications/Graphics

%description -n trinity-kviewshell
KViewShell is a generic viewing framework that allows the graphical
applications, such as the kview image viewer, to be embedded in other
KDE applications, such as Konqueror.

KViewShell comes with a djvuviewpart plugin included, for viewing
DjVu images.

%files -n trinity-kviewshell
%defattr(-,root,root,-)
%{tde_bindir}/kviewshell
%{tde_libdir}/libdjvu.la
%{tde_libdir}/libdjvu.so
%{tde_tdelibdir}/djvuviewpart.so
%{tde_tdelibdir}/djvuviewpart.la
%{tde_tdelibdir}/emptymultipagepart.la
%{tde_tdelibdir}/emptymultipagepart.so
%{tde_tdelibdir}/kviewerpart.la
%{tde_tdelibdir}/kviewerpart.so
%{tde_libdir}/libkmultipage.so.*
%{tde_datadir}/apps/djvumultipage.rc
%{tde_datadir}/apps/kviewerpart/
%{tde_datadir}/apps/kviewshell/kviewshell.rc
%{tde_datadir}/config.kcfg/djvumultipage.kcfg
%{tde_datadir}/config.kcfg/kviewshell.kcfg
%{tde_datadir}/icons/crystalsvg/*/apps/kviewshell.png
%{tde_datadir}/services/emptymultipage.desktop
%{tde_datadir}/services/djvumultipage.desktop
%{tde_datadir}/servicetypes/kmultipage.desktop

%post -n trinity-kviewshell
for f in crystalsvg ; do
  touch --no-create %{tde_datadir}/icons/${f} 2> /dev/null ||:
  gtk-update-icon-cache -q %{tde_datadir}/icons/${f} 2> /dev/null ||:
done
/sbin/ldconfig || :

%postun -n trinity-kviewshell
for f in crystalsvg ; do
  touch --no-create %{tde_datadir}/icons/${f} 2> /dev/null ||:
  gtk-update-icon-cache -q %{tde_datadir}/icons/${f} 2> /dev/null ||:
done
/sbin/ldconfig || :

##########

%package -n trinity-libkscan
Summary:	Scanner library for Trinity
Group:		Environment/Libraries

%description -n trinity-libkscan
KScan is TDE's scanner library. It's used by kooka and by koffice currently.
It provides an easy-to-use library, which allows you to access your scanner
(as long as it's sane compatible).

%files -n trinity-libkscan
%defattr(-,root,root,-)
%{tde_libdir}/libkscan.so.*
%{tde_datadir}/icons/crystalsvg/16x16/actions/palette_color.png
%{tde_datadir}/icons/crystalsvg/16x16/actions/palette_gray.png
%{tde_datadir}/icons/crystalsvg/16x16/actions/palette_halftone.png
%{tde_datadir}/icons/crystalsvg/16x16/actions/palette_lineart.png
%{tde_datadir}/services/scanservice.desktop

%post -n trinity-libkscan
for f in crystalsvg ; do
  touch --no-create %{tde_datadir}/icons/${f} 2> /dev/null ||:
  gtk-update-icon-cache -q %{tde_datadir}/icons/${f} 2> /dev/null ||:
done
/sbin/ldconfig || :

%postun -n trinity-libkscan
for f in crystalsvg ; do
  touch --no-create %{tde_datadir}/icons/${f} 2> /dev/null ||:
  gtk-update-icon-cache -q %{tde_datadir}/icons/${f} 2> /dev/null ||:
done
/sbin/ldconfig || :

##########

%package -n trinity-libkscan-devel
Summary:	Development files for the Trinity scanner library
Group:		Development/Libraries

%description -n trinity-libkscan-devel
This package contains development files for Trinity's scanner library.

%files -n trinity-libkscan-devel
%defattr(-,root,root,-)
%{tde_libdir}/libkscan.la
%{tde_libdir}/libkscan.so

%post -n trinity-libkscan-devel
/sbin/ldconfig || :

%postun -n trinity-libkscan-devel
/sbin/ldconfig || :

##########

%package libpoppler-tqt
Summary:	TQt support for Poppler
Group:		Environment/Libraries
Provides:	poppler-tqt = %{version}-%{release}

%description libpoppler-tqt
TQt support library for Poppler.
This library is used by the Trinity graphics file plugins for PDF support.

%files libpoppler-tqt
%defattr(-,root,root,-)
%{tde_libdir}/libpoppler-tqt.so.*

%post libpoppler-tqt
/sbin/ldconfig || :

%postun libpoppler-tqt
/sbin/ldconfig || :

##########

%package libpoppler-tqt-devel
Summary:	Development files for TQt support for Poppler
Group:		Development/Libraries
Requires:	%{name}-libpoppler-tqt
Provides:	poppler-tqt-devel = %{version}-%{release}

%description libpoppler-tqt-devel
Development files of TQt support library for Poppler.
This package contains the development files needed to compile applications against poppler-tqt.

%files libpoppler-tqt-devel
%defattr(-,root,root,-)
%{tde_tdeincludedir}/poppler-link-qt3.h
%{tde_tdeincludedir}/poppler-page-transition.h
%{tde_tdeincludedir}/poppler-qt.h
%{tde_libdir}/libpoppler-tqt.la
%{tde_libdir}/libpoppler-tqt.so
%{tde_libdir}/pkgconfig/poppler-tqt.pc

%post libpoppler-tqt-devel
/sbin/ldconfig || :

%postun libpoppler-tqt-devel
/sbin/ldconfig || :

##########

%package devel
Summary:	Development files for %{name} 
Group:		Development/Libraries

Obsoletes:	trinity-kdegraphics-devel < %{version}-%{release}
Provides:	trinity-kdegraphics-devel = %{version}-%{release}

Requires: trinity-libkscan-devel = %{version}-%{release}
Requires: %{name}-libpoppler-tqt-devel = %{version}-%{release}

%description devel
%{summary}.

%files devel
%defattr(-,root,root,-)
%{tde_tdeincludedir}/dom/
#%{tde_tdeincludedir}/kfaximage.h
%{tde_tdeincludedir}/kmultipageInterface.h
%{tde_tdeincludedir}/ksvg/
%{tde_tdeincludedir}/kviewshell/
%{tde_tdeincludedir}/libtext2path-0.1/BezierPath.h
%{tde_tdeincludedir}/libtext2path-0.1/Glyph.h
%{tde_tdeincludedir}/libtext2path-0.1/GlyphTracer.h
%{tde_libdir}/lib[kt]deinit_kview.la
%{tde_libdir}/lib[kt]deinit_mrmlsearch.la
%{tde_libdir}/libkghostviewlib.la
%{tde_libdir}/libkghostviewlib.so
%{tde_libdir}/libkimageviewer.la
%{tde_libdir}/libkimageviewer.so
%{tde_libdir}/libkmultipage.la
%{tde_libdir}/libkmultipage.so
%{tde_libdir}/libkpovmodeler.la
%{tde_libdir}/libkpovmodeler.so
%{tde_libdir}/libksvg.la
%{tde_libdir}/libksvg.so
%{tde_libdir}/libtext2path.la
%{tde_libdir}/libtext2path.so
# kfaxview
%{tde_libdir}/libkfaximage.so
%{tde_libdir}/libkfaximage.la
# cmake
%{tde_datadir}/cmake/*

%post devel
/sbin/ldconfig || :

%postun devel
/sbin/ldconfig || :

############

# Excludes kuickshow (built separately)
#%exclude %{tde_bindir}/kuickshow
#%exclude %{tde_tdelibdir}/kuickshow.la
#%exclude %{tde_tdelibdir}/kuickshow.so
#%exclude %{tde_libdir}/lib[kt]deinit_kuickshow.la
#%exclude %{tde_libdir}/lib[kt]deinit_kuickshow.so
#%exclude %{tde_tdeappdir}/kuickshow.desktop
#%exclude %{tde_datadir}/apps/kuickshow/
#%exclude %{tde_datadir}/icons/hicolor/*/apps/kuickshow.png
#%exclude %{tde_tdedocdir}/HTML/en/kuickshow/

##########

%if 0%{?suse_version} || 0%{?pclinuxos}
%debug_package
%endif

##########

%prep
%setup -q -n kdegraphics-3.5.13.1
%if 0%{?rhel} && 0%{?rhel} <= 5
%patch3 -p1 -b .mkstemps
%endif
%patch9 -p1
%patch10 -p1

%if 0%{?rhel} == 4
%patch201 -p1 -b .rhel4
%endif

%if 0%{?build_kamera} == 0
%__rm -rf doc/kamera/
%endif

%build
unset QTDIR || : ; . /etc/profile.d/qt3.sh
export PATH="%{tde_bindir}:${PATH}"
export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig:${PKG_CONFIG_PATH}"
export CMAKE_INCLUDE_PATH="%{tde_includedir}:%{tde_includedir}/tqt"

# Do not build against any "/usr" installed KDE
export KDEDIR=%{tde_prefix}

# Specific path for RHEL4
if [ -d /usr/X11R6 ]; then
  export CXXFLAGS="${RPM_OPT_FLAGS} -I/usr/X11R6/include -L/usr/X11R6/%{_lib}"
fi

%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version}
%__mkdir_p build
cd build
%endif

%cmake \
  -DCMAKE_INSTALL_PREFIX=%{tde_prefix} \
  -DBIN_INSTALL_DIR=%{tde_bindir} \
  -DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \
  -DLIB_INSTALL_DIR=%{tde_libdir} \
  -DSHARE_INSTALL_PREFIX=%{tde_datadir} \
  -DPKGCONFIG_INSTALL_DIR="%{tde_libdir}/pkgconfig" \
  -DCMAKE_SKIP_RPATH="OFF" \
  %{?with_t1lib:-DWITH_T1LIB=ON} \
  %{?with_paper:-DWITH_LIBPAPER=ON} \
  -DWITH_TIFF=ON \
  -DWITH_OPENEXR=ON \
  -DWITH_PDF=ON \
  -DBUILD_ALL=ON \
  -DBUILD_KUICKSHOW=OFF \
  %{!?build_kamera:-DBUILD_KAMERA=OFF} \
  ..

%__make %{?_smp_mflags} || %__make

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

# locale's
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


%clean
%__rm -rf %{buildroot}



%changelog
* Sun Sep 30 2012 Francois Andriot <francois.andriot@free.fr> - 3.5.13.1-1
- Initial build for TDE 3.5.13.1