summaryrefslogtreecommitdiffstats
path: root/redhat/tdebindings/tdebindings-14.0.0.spec
blob: a32f8d1aa826a1468f6005e5305985beaaa53bfa (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
# Special note for RHEL4:
#  You must create symlink 'libgcj.so' manually because it does not exist by default.
# E.g:
#  ln -s /usr/lib/libgcj.so.5.0.0 /usr/lib/jvm/java/lib/libgcj.so
# or 64 bits:
#  ln -s /usr/lib64/libgcj.so.5.0.0 /usr/lib/jvm/java/lib/libgcj.so

%define tde_version 14.0.0

# 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 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_mandir %{tde_datadir}/man

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

%define _docdir %{tde_docdir}

# RHEL4 specific
Source91:  filter-requires.sh
%if 0%{?rhel} == 4
%define    _use_internal_dependency_generator 0
%define    __find_requires sh %{SOURCE91}
%endif

Name:			trinity-tdebindings
Summary:		TDE bindings to non-C++ languages
Version:		%{tde_version}
Release:		%{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant}

License:		GPLv2
Group:			User Interface/Desktops

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

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

Source0:		%{name}-%{version}%{?preversion:~%{preversion}}.tar.gz

Patch1:			tdebindings-14.0.0-ftbfs.patch

# [tdebindings] Function 'rb_frame_this_func' does not exist in RHEL5
Patch5:		kdebindings-3.5.13.1-fix_rhel5_ftbfs.patch

BuildRequires: autoconf automake libtool m4
BuildRequires: trinity-tqtinterface-devel >= %{tde_version}
BuildRequires: trinity-arts-devel >= 1:1.5.10
BuildRequires: trinity-tdelibs-devel >= %{tde_version}

BuildRequires: desktop-file-utils
BuildRequires: zlib-devel
BuildRequires: perl(ExtUtils::MakeMaker)

# GTK2 support
%if 0%{?rhel} == 4
BuildRequires:	evolution28-gtk2-devel
Requires:		evolution28-gtk2
BuildRequires:	evolution28-glib2-devel
Requires:		evolution28-glib2
BuildRequires:	evolution28-cairo-devel
Requires:		evolution28-cairo
BuildRequires:	evolution28-pango-devel
Requires:		evolution28-pango
BuildRequires:	evolution28-atk-devel
Requires:		evolution28-atk
%else
BuildRequires:	gtk2-devel
%endif

# XULRUNNER support
%if 0%{?fedora} || 0%{?rhel} >= 5 || 0%{?mgaversion} || 0%{?mdkversion} || 0%{?suse_version} >= 1220
#BuildRequires: xulrunner-devel
%endif
%if 0%{?suse_version} == 1140
BuildRequires: mozilla-xulrunner20-devel
%endif

# GTK1 support
%if 0%{?fedora} || 0%{?rhel}
%define with_gtk1 1
BuildRequires: glib-devel
BuildRequires: gtk+-devel
%endif
%if 0%{?mdkversion} == 201100
%define with_gtk1 1
BuildRequires: %{_lib}glib1.2-devel
BuildRequires: %{_lib}gtk+-devel
%endif

%if 0%{?mgaversion} || 0%{?mdkversion}
%if 0%{?pclinuxos}
BuildRequires:	libgdk_pixbuf2.0-devel
%else
BuildRequires:	%{_lib}gdk_pixbuf2.0-devel
%endif
%endif
%if 0%{?fedora}
%if 0%{?fedora} >= 17
BuildRequires: gdk-pixbuf2-devel
%else
BuildRequires: gdk-pixbuf-devel
%endif
%endif


## Python
BuildRequires: python-devel
%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")

## ruby
BuildRequires: ruby-devel >= 1.8, ruby
%if "%{?ruby_libarchdir}" != ""
%define ruby_arch %{?ruby_libarchdir}
%else
%{!?ruby_arch: %define ruby_arch %(ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]')}
%endif

%if "%{?ruby_libdir}" != ""
%define ruby_rubylibdir %{?ruby_libdir}
%else
%{!?ruby_rubylibdir: %define ruby_rubylibdir %(ruby -rrbconfig -e 'puts Config::CONFIG["rubylibdir"]')}
%endif

# Ruby 1.9 includes are located in strance directories ... (taken from ruby 1.9 spec file)
%global	_normalized_cpu	%(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/')

## java
%if 0%{?rhel} >= 4 && 0%{?rhel} <= 5
BuildRequires:	java-1.4.2-gcj-compat-devel
BuildRequires:	libgcj-devel
BuildRequires:	gcc-java
%endif

%if 0%{?rhel} >= 6 || 0%{?fedora} || 0%{?mdkversion} || 0%{?mgaversion} || 0%{?suse_version}

# PCLinuxOS use SUN's Java
%if 0%{?pclinuxos}
BuildRequires:	java-1.6.0-sun
BuildRequires:	java-1.6.0-sun-devel
%else

# Others use OpenJDK
BuildRequires: java-openjdk
BuildRequires: java-devel >= 1.4.2
%if 0%{?fedora} >= 17 || 0%{?suse_version} >= 1220 || 0%{?mgaversion} >= 3
BuildRequires: java-1.7.0-openjdk-devel
%else
BuildRequires: java-1.6.0-openjdk-devel
%endif

%endif
%endif

%if 0%{?suse_version}
%define java_home %{_usr}/%{_lib}/jvm/java
%else
%if 0%{?rhel} == 4
%define java_home %{_usr}/lib/jvm/java-1.4.2-gcj-1.4.2.0
%else
%define java_home %{_usr}/lib/jvm/java
%endif
%endif
%define _with_java --with-java=%{java_home}

## Perl
# There is no 'perl-devel' package on RHEL5
%if 0%{?rhel} >= 6 || 0%{?fedora} || 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires:	perl-devel
%endif
%define perl_vendorarch %{expand:%%(eval `perl -V:installvendorarch`; echo $installvendorarch)}

## QScintilla
BuildRequires:	trinity-tqscintilla-devel
%define _enable_qscintilla --enable-qscintilla

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

# Metapackage requires
Requires: trinity-tdebindings-java = %{version}-%{release}
Requires: trinity-libsmoketqt = %{version}-%{release}
Requires: trinity-libsmoketde = %{version}-%{release}
Requires: trinity-perl-dcop = %{version}-%{release}
Requires: trinity-python-dcop = %{version}-%{release}
Requires: trinity-libkjsembed1 = %{version}-%{release}
Requires: trinity-kjscmd = %{version}-%{release}
Requires: trinity-juic = %{version}-%{release}
Requires: trinity-libkorundum0-ruby = %{version}-%{release}
Requires: trinity-libqt0-ruby = %{version}-%{release}


%description
TDE/DCOP bindings to non-C++ languages

%files

##########

%package java
Summary:	TDE Java bindings metapackage [Trinity]
Group:		Environment/Libraries
Requires:	trinity-libdcop3-java = %{version}-%{release}
Requires:	trinity-libdcop3-jni = %{version}-%{release}
Requires:	trinity-libqt3-java = %{version}-%{release}
Requires:	trinity-libqt3-jni = %{version}-%{release}
Requires:	trinity-libtrinity-java = %{version}-%{release}
Requires:	trinity-libtrinity-jni = %{version}-%{release}

%description java
A metapackage depending on all TDE, Qt and DCOP bindings libraries
related to the Java language.

This package is part of the official TDE bindings module.

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

##########

%package -n trinity-libdcop3-java
Summary:	DCOP bindings for Java [Trinity]
Group:		Environment/Libraries

Requires:	trinity-libdcop3-jni = %{version}-%{release}

%description -n trinity-libdcop3-java
This package contains the Java classes necessary to run Java programs
using the Java DCOP bindings. DCOP is the TDE Desktop COmmunications
Protocol, used for communicating with running TDE applications.

This package is part of the official TDE bindings module.

%files -n trinity-libdcop3-java
%defattr(-,root,root,-)
#%{tde_datadir}/java/dcopjava*.jar
%{tde_libdir}/java/org/*/DCOP/*.class

##########

%package -n trinity-libdcop3-java-devel
Summary:	DCOP bindings for Java (dcopidl2java program) [Trinity]
Group:		Development/Libraries
Requires:	trinity-libdcop3-java = %{version}-%{release}

%description -n trinity-libdcop3-java-devel
This package contains the dcopidl2java program which generates Java 
stubs from DCOP IDL files, necessary to do development with the DCOP Java
bindings. DCOP is the TDE Desktop COmmunications Protocol, used for
communicating with running TDE applications.

This package is part of the official TDE bindings module.

%files -n trinity-libdcop3-java-devel
%defattr(-,root,root,-)
%{tde_bindir}/dcopidl2java

##########

%package -n trinity-libdcop3-jni
Summary:	DCOP bindings for Java ( Native libraries ) [Trinity]
Group:		Environment/Libraries

%description -n trinity-libdcop3-jni
This package contains the shared libraries and scripts necessary to
run programs using the Java DCOP bindings. DCOP is the TDE Desktop
COmmunications Protocol, used for communicating with running TDE
applications.

This package is part of the official TDE bindings module.

%files -n trinity-libdcop3-jni
%defattr(-,root,root,-)
%{tde_libdir}/libjavadcop.la
%{tde_libdir}/libjavadcop.so

%post -n trinity-libdcop3-jni
/sbin/ldconfig || :

%postun -n trinity-libdcop3-jni
/sbin/ldconfig || :

##########

%package -n trinity-libqt3-java
Summary:	Java bindings for Qt [Trinity]
Group:		Environment/Libraries
Requires:	trinity-libdcop3-jni = %{version}-%{release}
Requires:	trinity-libqt3-jni = %{version}-%{release}
Requires:	trinity-juic = %{version}-%{release}

%description -n trinity-libqt3-java
This package contains the Java classes necessary to run Java programs
using the Java Qt bindings. Qt is a very popular GUI toolkit, used by
the TDE desktop environment.

It also includes many example programs that make use of these bindings,
plus many of the Qt Tutorial examples translated into Java.

This package is part of the official TDE bindings module.

%files -n trinity-libqt3-java
%defattr(-,root,root,-)
%{tde_libdir}/java/qtjava*.jar
%{tde_tdedocdir}/HTML/en/javalib/

##########

%package -n trinity-libqt3-jni
Summary:	Java bindings for Qt ( Native libraries ) [Trinity]
Group:		Environment/Libraries

%description -n trinity-libqt3-jni
This package contains the shared libraries necessary to run Java
programs using the Java Qt bindings. Qt is a very popular GUI
toolkit, used by the TDE desktop environment.

This package is part of the official TDE bindings module.

%files -n trinity-libqt3-jni
%defattr(-,root,root,-)
%{tde_libdir}/libqtjavasupport.la
%{tde_libdir}/libqtjavasupport.so.*
%{tde_libdir}/jni/libqtjava.la
%{tde_libdir}/jni/libqtjava.so.*
%doc qtjava/ChangeLog

##########

%package -n trinity-libqt3-jni-devel
Summary:	Development files fo Java bindings for Qt ( Native libraries ) [Trinity]
Group:		Development/Libraries
Requires:	trinity-libqt3-jni = %{version}-%{release}

%description -n trinity-libqt3-jni-devel
This package contains the development files for trinity-libqt3-jni.

This package is part of the official TDE bindings module.

%files -n trinity-libqt3-jni-devel
%defattr(-,root,root,-)
%{tde_libdir}/libqtjavasupport.so
%{tde_libdir}/jni/libqtjava.so

##########

%package -n trinity-libtrinity-java
Summary:	tdelibs bindings for Java [Trinity]
Group:		Environment/Libraries

Requires:	trinity-libtrinity-jni = %{version}-%{release}

%description -n trinity-libtrinity-java
This package contains the Java classes necessary to run Java programs
using the Java tdelibs bindings. TDE is the Trinity Desktop Environment, a
very popular UNIX Desktop Environment.

It also includes some example applications that use these Java
classes, and multiple usage samples of the most common TDE classes.

This package is part of the official TDE bindings module.

%files -n trinity-libtrinity-java
%defattr(-,root,root,-)
%{tde_libdir}/java/koala*.jar

##########

%package -n trinity-libtrinity-jni
Summary:	tdelibs bindings for java ( Native libraries ) [Trinity]
Group:		Environment/Libraries

%description -n trinity-libtrinity-jni
This package contains the shared libraries necessary to run Java
programs using the Java tdelibs bindings. TDE is the Trinity Desktop
Environment, a very popular UNIX Desktop Environment.

This package is part of the official TDE bindings module.

%files -n trinity-libtrinity-jni
%defattr(-,root,root,-)
%{tde_libdir}/jni/libtdejava.la
%{tde_libdir}/jni/libtdejava.so.*
%doc tdejava/ChangeLog

##########

%package -n trinity-libtrinity-jni-devel
Summary:	Development files for tdelibs bindings for java ( Native libraries ) [Trinity]
Group:		Development/Libraries
Requires:	trinity-libtrinity-jni = %{version}-%{release}

%description -n trinity-libtrinity-jni-devel
This package contains the development files for trinity-libtrinity-jni.

This package is part of the official TDE bindings module.

%files -n trinity-libtrinity-jni-devel
%defattr(-,root,root,-)
%{tde_libdir}/jni/libtdejava.so

##########

%package -n trinity-libsmoketqt
Summary:	SMOKE Binding Library to Qt
Group:		Environment/Libraries

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

%description -n trinity-libsmoketqt
The "Scripting Meta Object Kompiler Engine" library is used by
various TDE language bindings packages to provide interfaces to the
Qt library.

This package is part of the official TDE bindings module.

%files -n trinity-libsmoketqt
%defattr(-,root,root,-)
%{tde_libdir}/libsmoketqt.so.*

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

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

##########

%package -n trinity-libsmoketqt-devel
Summary:	SMOKE Binding Library to TQt - Development Files
Group:		Development/Libraries
Requires:	trinity-libsmoketqt = %{version}-%{release}

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

%description -n trinity-libsmoketqt-devel
The "Scripting Meta Object Kompiler Engine" library is used by
various TDE language bindings packages to provide interfaces to the
Qt library. This package contains the development files for the
library.

If you are a normal user, you probably don't need this
package.

This package is part of the official TDE bindings module.

%files -n trinity-libsmoketqt-devel
%defattr(-,root,root,-)
%{tde_tdeincludedir}/smoke.h
%{tde_libdir}/libsmoketqt.so
%{tde_libdir}/libsmoketqt.la

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

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

##########

%package -n trinity-libsmoketde
Summary:	SMOKE Binding Library to TDE
Group:		Environment/Libraries

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

%description -n trinity-libsmoketde
The "Scripting Meta Object Kompiler Engine" library is used by
various TDE language bindings packages to provide interfaces to the
TDE libraries.

This package is part of the official TDE bindings module.

%files -n trinity-libsmoketde
%defattr(-,root,root,-)
%{tde_libdir}/libsmoketde.so.*

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

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

##########

%package -n trinity-libsmoketde-devel
Summary:	SMOKE Binding Library to TDE - Development Files
Group:		Development/Libraries
Requires:	trinity-libsmoketde = %{version}-%{release}

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

%description -n trinity-libsmoketde-devel
The "Scripting Meta Object Kompiler Engine" library is used by
various TDE language bindings packages to provide interfaces to the
Qt and TDE libraries. This package contains the development files for
the library.

If you are a normal user, you probably don't need this
package.

This package is part of the official TDE bindings module.

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

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

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

##########

%package -n trinity-perl-dcop
Summary:	DCOP Bindings for Perl 
Group:		Development/Libraries

Obsoletes:	trinity-kdebindings-dcopperl < %{version}-%{release}
Provides:	trinity-kdebindings-dcopperl = %{version}-%{release}

%description -n trinity-perl-dcop
Perl bindings to the DCOP interprocess communication protocol used by TDE

%files -n trinity-perl-dcop
%defattr(-,root,root,-)
%{perl_vendorarch}/auto/DCOP/*
%{perl_vendorarch}/DCOP.pm
%{perl_vendorarch}/DCOP/*
%doc dcopperl/AUTHORS dcopperl/Changes dcopperl/README dcopperl/TODO
%{tde_mandir}/man3/DCOP.3pm*

##########

%package -n trinity-python-dcop
Summary:	DCOP bindings for Python
Group:		Environment/Libraries
Requires:	python
#Provides:	%{name}-dcoppython = %{version}-%{release}

%description -n trinity-python-dcop
This package contains the shared libraries necessary to run and
develop Python programs using the Python DCOP bindings
libraries. DCOP is the TDE Desktop COmmunications Protocol, used for
communicating with running TDE applications.

This package is part of the official TDE bindings module.

%files -n trinity-python-dcop
%defattr(-,root,root,-)
%{python_sitearch}/pcop.la
%{python_sitearch}/pcop.so
%{python_sitearch}/pydcop.py*

##########

%package -n trinity-libkjsembed1
Summary:	Embedded JavaScript library
Group:		Environment/Libraries

%description -n trinity-libkjsembed1
This package contains the shared libraries necessary to run programs
linked with the KJSEmbed library. This library provides JavaScript
embedded scripting facilities to TDE applications.

This package is part of the official TDE bindings module.

%files -n trinity-libkjsembed1
%defattr(-,root,root,-)
%{tde_libdir}/libkjsembed.so.*
%{tde_tdelibdir}/libimagefxplugin.la
%{tde_tdelibdir}/libimagefxplugin.so
%{tde_datadir}/services/imagefx_plugin.desktop
%{tde_tdelibdir}/libqprocessplugin.so
%{tde_tdelibdir}/libqprocessplugin.la
%{tde_datadir}/services/qprocess_plugin.desktop
%{tde_tdelibdir}/libfileitemplugin.la
%{tde_tdelibdir}/libfileitemplugin.so
%{tde_datadir}/services/tdefileitem_plugin.desktop
%{tde_datadir}/apps/kjsembed/cmdline.js
%{tde_datadir}/servicetypes/binding_type.desktop
%{tde_bindir}/embedjs
%{tde_datadir}/apps/embedjs/embedjsui.rc
%{tde_datadir}/applnk/Utilities/embedjs.desktop
%{tde_datadir}/icons/hicolor/16x16/apps/embedjs.png
%{tde_datadir}/icons/hicolor/32x32/apps/embedjs.png
%{tde_tdelibdir}/libjavascript.la
%{tde_tdelibdir}/libjavascript.so
%{tde_datadir}/apps/kate/scripts/swaptabs.js
%{tde_datadir}/apps/kate/scripts/swaptabs.ui
%{tde_datadir}/apps/kate/scripts/swaptabs.desktop
%{tde_datadir}/services/javascript.desktop
%doc kjsembed/docs/ChangeLog

%post -n trinity-libkjsembed1
/sbin/ldconfig ||:
touch --no-create %{tde_datadir}/icons/hicolor ||:
gtk-update-icon-cache -q %{tde_datadir}/icons/hicolor 2> /dev/null ||:
update-desktop-database >& /dev/null ||:

%postun -n trinity-libkjsembed1
/sbin/ldconfig ||:
touch --no-create %{tde_datadir}/icons/hicolor ||:
gtk-update-icon-cache -q %{tde_datadir}/icons/hicolor 2> /dev/null ||:
update-desktop-database >& /dev/null ||:

##########

%package -n trinity-libkjsembed-devel
Summary:	Embedded JavaScript library (Development files)
Group:		Development/Libraries
Requires:	trinity-libkjsembed1 = %{version}-%{release}

%description -n trinity-libkjsembed-devel
This package contains the header files and symbolic links necessary
to develop and compile programs using the KJSEmbed library. This
library provides JavaScript embedded scripting facilities to TDE
applications.

It also includes lots of example programs that make use of these
bindings, plus comprehensive documentation of the bindings.

This package is part of the official TDE bindings module.

%files -n trinity-libkjsembed-devel
%defattr(-,root,root,-)
%{tde_tdeincludedir}/kjsembed/
%{tde_libdir}/libkjsembed.so
%{tde_libdir}/libkjsembed.la
%{tde_docdir}/trinity-libkjsembed-devel/plugin-examples/customobject/

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

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

##########

%package -n trinity-kjscmd
Summary:	A script interpreter using the TDE JavaScript library
Group:		Environment/Libraries

%description -n trinity-kjscmd
This package contains the kjscmd program, which is a standalone
JavaScript interpreter using the KJSEmbed library.

This package is part of the official TDE bindings module.

%files -n trinity-kjscmd
%defattr(-,root,root,-)
%{tde_bindir}/kjscmd
%{tde_tdeappdir}/kjscmd.desktop
%{tde_mandir}/man1/kjscmd.*
%{tde_tdelibdir}/libjsconsoleplugin.la
%{tde_tdelibdir}/libjsconsoleplugin.so

%post -n trinity-kjscmd
update-desktop-database >& /dev/null ||:

%postun -n trinity-kjscmd
update-desktop-database >& /dev/null ||:

##########

%package -n trinity-juic
Summary:	The Qt Java UI Compiler
Group:		Environment/Libraries
Requires:	trinity-libqt3-java = %{version}-%{release}

%description -n trinity-juic
This package contains the juic program, which is used to convert
a UI description file generated by the Qt Designer, and converts
it into a Qt Java class. It is necessary for compiling and 
developing programs using the Qt Java bindings together with Qt
Designer.

This package is part of the official TDE bindings module.

%files -n trinity-juic
%defattr(-,root,root,-)
%{tde_bindir}/juic
%{tde_datadir}/juic/

##########

%package -n trinity-libkorundum0-ruby
Summary:	TDE bindings for Ruby [Trinity]
Group:		Environment/Libraries
Requires:	trinity-libqt0-ruby = %{version}-%{release}

%description -n trinity-libkorundum0-ruby
This package contains the files necessary for running and developing
Ruby code using the Korundum TDE Ruby bindings.

It also includes some example programs and templates that make use of
these bindings.

This package is part of the official TDE bindings module.

%files -n trinity-libkorundum0-ruby
%defattr(-,root,root,-)
%{tde_bindir}/rbtdesh
%{tde_bindir}/rbtdeapi
%{tde_bindir}/krubyinit
%{tde_bindir}/rbtdeconfig_compiler
%{ruby_rubylibdir}/Korundum.rb
%{ruby_rubylibdir}/TDE/korundum.rb
%{ruby_arch}/korundum.la
%{ruby_arch}/korundum.so*
%doc korundum/ChangeLog

%post -n trinity-libkorundum0-ruby
/sbin/ldconfig || :

%postun -n trinity-libkorundum0-ruby
/sbin/ldconfig || :

##########

%package -n trinity-libqt0-ruby
Summary:	Qt bindings for Ruby [Trinity]
Group:		Environment/Libraries
Requires:	ruby

%description -n trinity-libqt0-ruby
This package contains the files necessary for running and developing
Ruby code using the Qt Ruby bindings.

It also includes some example programs that make use of these bindings,
plus many of the Qt Tutorial examples translated into Ruby.

This package is part of the official TDE bindings module.

%files -n trinity-libqt0-ruby
%defattr(-,root,root,-)
%{tde_bindir}/rbqtsh
%{tde_bindir}/rbqtapi
%{tde_bindir}/rbuic
%{tde_bindir}/qtrubyinit
%{ruby_rubylibdir}/Qt/qtruby.rb
%{ruby_rubylibdir}/Qt.rb
%{ruby_arch}/qtruby.so*
%{ruby_arch}/qtruby.la
%{ruby_arch}/tqui.so*
%{ruby_arch}/tqui.la
%doc qtruby/ChangeLog

%post -n trinity-libqt0-ruby
/sbin/ldconfig || :

%postun -n trinity-libqt0-ruby
/sbin/ldconfig || :

##########

%if 0
%package -n trinity-kmozilla
Summary:	Kmozilla for TDE
Group:		Environment/Libraries

%description -n trinity-kmozilla
%{summary}

%files -n trinity-kmozilla
%defattr(-,root,root,-)
%{tde_bindir}/kmozilla
%{tde_libdir}/libkmozillapart.so.*
%{tde_libdir}/libkmozillapart.so
%{tde_libdir}/libkmozillapart.la
%{tde_datadir}/services/kmozilla.desktop
%endif

##########

%package -n trinity-xpart-notepad
Summary:	A small XPart editor
Group:		Applications/Utilities

%description -n trinity-xpart-notepad
xpart_notepad is a small XPart editor. Use it to understand how to use XPart.

%files -n trinity-xpart-notepad
%defattr(-,root,root,-)
%{tde_bindir}/shell_xparthost
%{tde_bindir}/xp_notepad
%{tde_libdir}/libxp_notepadpart.la
%{tde_libdir}/libxp_notepadpart.so
%{tde_libdir}/libxp_notepadpart.so.*
%{tde_datadir}/services/xp_notepad.desktop
%doc xparts/xpart_notepad/README

%post -n trinity-xpart-notepad
/sbin/ldconfig || :

%postun -n trinity-xpart-notepad
/sbin/ldconfig || :

##########

%if 0%{?with_gtk1}
%package -n trinity-libgtkxparts1
Summary:	Xparts library for GTK
Group:		Environment/Libraries

%description -n trinity-libgtkxparts1
%{summary}

%files -n trinity-libgtkxparts1
%defattr(-,root,root,-)
%{tde_libdir}/libgtkxparts.so.*
%{tde_libdir}/libgtkxparts.la

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

%postun -n trinity-libgtkxparts1
/sbin/ldconfig || :
%endif

##########

%package -n trinity-libtdexparts
Summary:	Xparts library for TDE
Group:		Environment/Libraries

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

%description -n trinity-libtdexparts
%{summary}

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

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

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

##########

%package -n trinity-libxparts-devel
Summary:	Xparts development files
Group:		Development/Libraries
%if 0%{?with_gtk1}
Requires:	trinity-libgtkxparts1 = %{version}-%{release}
%endif
Requires:	trinity-libtdexparts = %{version}-%{release}

%description -n trinity-libxparts-devel
%{summary}

%files -n trinity-libxparts-devel
%defattr(-,root,root,-)
%{tde_tdeincludedir}/xtdeparts/
%if 0%{?with_gtk1}
%{tde_libdir}/libgtkxparts.so
%endif
%{tde_libdir}/libtdexparts.so

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

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

##########

%package xparts-extras
Summary:	Extra xparts for TDE [Trinity]
Group:		Environment/Libraries

# Metapckage requires
Requires:	trinity-xpart-notepad = %{version}-%{release}
%if 0%{?with_gtk1}
Requires:	trinity-libgtkxparts1 = %{version}-%{release}
%endif
Requires:	trinity-libtdexparts = %{version}-%{release}
Requires:	trinity-libdcop-c = %{version}-%{release}

%description xparts-extras
This package contains extra xparts-based modules for Trinity
This includes the mozilla-konqueror plugin

This package is part of the official TDE bindings module.

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

###########

%package -n trinity-libdcop-c
Summary:	DCOP bindings for C [Trinity]
Group:		Environment/Libraries

%description -n trinity-libdcop-c
%{summary}

%files -n trinity-libdcop-c
%defattr(-,root,root,-)
%{tde_libdir}/libdcopc.so.*

%post -n trinity-libdcop-c
/sbin/ldconfig || :

%postun -n trinity-libdcop-c
/sbin/ldconfig || :

###########

%package -n trinity-libdcop-c-devel
Summary:	DCOP bindings for C, development files [Trinity]
Group:		Development/Libraries
Requires:	trinity-libdcop-c = %{version}-%{release}

%description -n trinity-libdcop-c-devel
%{summary}

%files -n trinity-libdcop-c-devel
%defattr(-,root,root,-)
%{tde_libdir}/libdcopc.so
%{tde_libdir}/libdcopc.la
%{tde_tdeincludedir}/dcopc/

%post -n trinity-libdcop-c-devel
/sbin/ldconfig || :

%postun -n trinity-libdcop-c-devel
/sbin/ldconfig || :

##########

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

Requires:	trinity-tdelibs-devel >= %{tde_version}
Requires:	%{name} = %{version}-%{release}

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

# Metapackage
Requires:	trinity-libsmoketqt-devel = %{version}-%{release}
Requires:	trinity-libdcop3-java-devel = %{version}-%{release}
Requires:	trinity-libsmoketde-devel = %{version}-%{release}
Requires:	trinity-libkjsembed-devel = %{version}-%{release}
Requires:	trinity-libxparts-devel = %{version}-%{release}
Requires:	trinity-libdcop-c-devel = %{version}-%{release}
Requires:	trinity-libqt3-jni-devel = %{version}-%{release}
Requires:	trinity-libtrinity-jni-devel = %{version}-%{release}

%description devel
Development files for the TDE bindings.

%files devel

##########

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

##########

%prep
%setup -q -n %{name}-%{version}%{?preversion:~%{preversion}}
%patch1 -p1 -b .ftbfs

%if "%{?perl_vendorarch}" == ""
exit 1
%endif

%if 0%{?rhel} >= 4 && 0%{?rhel} <= 5
%patch5 -p1 -b .ruby
%endif

# Disable kmozilla, it does not build with recent xulrunner (missing 'libmozjs.so')
%__sed -i "xparts/Makefile.am" \
  -e "s|SUBDIRS = .*|SUBDIRS = src xpart_notepad|"

%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp -f "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh" || %__cp -f "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh"
%__make -f "admin/Makefile.common"


%build
unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"

unset JAVA_HOME ||:
%{?java_home:JAVA_HOME=%{java_home}; export JAVA_HOME}

# sip/PyQt/PyKDE built separately, not here
export DO_NOT_COMPILE="$DO_NOT_COMPILE python"

# Ruby headers, strange location ...
if [ -d "/usr/include/%{_normalized_cpu}-linux" ]; then
  export EXTRA_INCLUDES="/usr/include/%{_normalized_cpu}-linux"
fi

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

# Warning: openSUSE 13.1: /usr/include/ruby-2.0.0/ruby.h
%if 0%{?suse_version} >= 1310
EXTRA_INCLUDES="/usr/include/ruby-%{rb20_ver}:/usr/include/ruby-%{rb20_ver}/%{_target}"
%endif

# Warning: GCC visibility causes FTBFS [Bug #1285]
%configure \
  --prefix=%{tde_prefix} \
  --exec-prefix=%{tde_prefix} \
  --bindir=%{tde_bindir} \
  --datadir=%{tde_datadir} \
  --docdir=%{tde_docdir} \
  --includedir=%{tde_tdeincludedir} \
  --libdir=%{tde_libdir} \
  --mandir=%{tde_mandir} \
  \
  --disable-dependency-tracking \
  --disable-debug \
  --enable-new-ldflags \
  --enable-final \
  --enable-closure \
  --enable-rpath \
  --disable-gcc-hidden-visibility \
  \
  --with-extra-includes=%{_includedir}/tqscintilla:${EXTRA_INCLUDES} \
  --with-extra-libs=%{tde_libdir} \
  --with-pythondir=%{_usr} \
  \
  %{?_with_java} %{!?_with_java:--without-java} \
  %{?_enable_qscintilla} %{!?_enable_qscintilla:--disable-qscintilla}

# Build dcopperl with specific options
pushd dcopperl
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS=vendor

# [Bug #348] Ugly hack to modify the man pages directory
sed -i Makefile \
  -e "s|/usr/share/man|%{tde_mandir}|g"

%__make OPTIMIZE="$RPM_OPT_FLAGS" ||:
popd

# smoke (not smp-safe)
%__make -C smoke

# The rest is smp-safe
%__make %{?_smp_mflags} PYTHON=%{__python}


%install
export PATH="%{tde_bindir}:${PATH}"
%__rm -rf $RPM_BUILD_ROOT

%__make install DESTDIR=%{?buildroot} \
  PYTHON=%{__python}

# Removes some perl files
find $RPM_BUILD_ROOT -type f -a \( -name perllocal.pod -o -name .packlist \
  -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'

# Installs juic
%__install -D -m 755 qtjava/designer/juic/bin/juic	%{?buildroot}%{tde_bindir}/juic
%__install -d -m 755 %{?buildroot}%{tde_datadir}/juic/common
%__install qtjava/designer/juic/common/*.xml %{?buildroot}%{tde_datadir}/juic/common
%__install qtjava/designer/juic/common/*.xsl %{?buildroot}%{tde_datadir}/juic/common
%__install -d -m 755 %{?buildroot}%{tde_datadir}/juic/java
%__install qtjava/designer/juic/java/*.xml %{?buildroot}%{tde_datadir}/juic/java
%__install qtjava/designer/juic/java/*.xsl %{?buildroot}%{tde_datadir}/juic/java
%__install qtjava/designer/juic/juic.xsl  %{?buildroot}%{tde_datadir}/juic

# kjsembed sample files
%__install -d -m 755 %{?buildroot}%{tde_docdir}/trinity-libkjsembed-devel/plugin-examples/customobject/
%__install kjsembed/plugins/customobject_plugin.cpp %{?buildroot}%{tde_docdir}/trinity-libkjsembed-devel/plugin-examples/customobject/
%__install kjsembed/plugins/customobject_plugin.h %{?buildroot}%{tde_docdir}/trinity-libkjsembed-devel/plugin-examples/customobject/
%__install kjsembed/plugins/customobject_plugin.desktop %{?buildroot}%{tde_docdir}/trinity-libkjsembed-devel/plugin-examples/customobject/
%__install kjsembed/plugins/customqobject_plugin.cpp %{?buildroot}%{tde_docdir}/trinity-libkjsembed-devel/plugin-examples/customobject/
%__install kjsembed/plugins/customqobject_plugin.h %{?buildroot}%{tde_docdir}/trinity-libkjsembed-devel/plugin-examples/customobject/
%__install kjsembed/plugins/customqobject_plugin.desktop %{?buildroot}%{tde_docdir}/trinity-libkjsembed-devel/plugin-examples/customobject/


# Man installation location is wrong on RHEL4...
if [ -d "%{buildroot}%{_mandir}/man3" ]; then
  mv -f %{buildroot}%{_mandir}/man3 %{buildroot}%{tde_mandir}/man3/
  rm -rf %{buildroot}%{_mandir}
fi


%clean
%__rm -rf $RPM_BUILD_ROOT


%changelog
* Fri Jul 05 2013 Francois Andriot <[email protected]> - 14.0.0-1
- Initial release for TDE R14.0.0