forked from ellson/MOTHBALLED-graphviz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphviz.spec.in
989 lines (864 loc) · 27.6 KB
/
graphviz.spec.in
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
# $Id$ $Revision$
# @configure_input@
# Note: pre gd-2.0.34 graphviz uses its own gd tree with gif support and other fixes
#-- Global graphviz rpm and src.rpm tags-------------------------------------
Name: graphviz
Summary: Graph Visualization Tools
Version: @VERSION@
%define truerelease 1
%{?distroagnostic: %define release %{truerelease}}
%{!?distroagnostic: %define release %{truerelease}%{?dist}}
Release: %{?release}
Group: Applications/Multimedia
License: EPL
URL: http://www.graphviz.org/
Source0: http://www.graphviz.org/pub/@GRAPHVIZ_SOURCES@/graphviz-@VERSION@.tar.gz
# graphviz is relocatable - Caution: this feature is used in AT&T,
# but probably will not be supported in Redhat/Fedora/Centos distros
Prefix: /usr
#-- feature and package selection -------------------------------------------
# depends on macro values set by redhat-rpm-config
# All features are off (undefined) by default
# To enable, use: <percent>define FEATURE 1
# Available features are:
# SHARP GHOSTSCRIPT _GO GUILE _IO JAVA LUA OCAML ORTHO PERL PHP
# PYTHON RUBY R_LANG TCL IPSEPCOLA MYLIBGD PANGOCAIRO RSVG
# GTK GLITZ SMYRNA DEVIL MING GDK _QT WEBP
# SuSE uses a different mechanism to generate BuildRequires
# norootforbuild
# neededforbuild expat freetype2-devel gcc tcl tcl-devel tk tk-devel x-devel-packages
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: zlib-devel expat-devel ann-devel
BuildRequires: /bin/ksh bison m4 flex swig tk tcl >= 8.3 freetype-devel >= 2
#-- All platforms
%define __X 1
#-- Red Hat Enterprise Linux (also Centos) specific Build Requirements
%if 0%{?rhel}
%if %rhel == 4
BuildRequires: xorg-x11-devel
%endif
%if %rhel >= 4
BuildRequires: fontconfig-devel
%define TCL 1
BuildRequires: tcl-devel tk-devel
%define PERL 1
%define RUBY 1
BuildRequires: ruby ruby-devel
%define GUILE 1
BuildRequires: guile-devel
%define PYTHON 1
BuildRequires: python python-devel
%define IPSEPCOLA 1
%define ORTHO 1
%endif
%if %rhel >= 5
BuildRequires: libXaw-devel libSM-devel libICE-devel libXpm-devel libXt-devel libXmu-devel libXext-devel libX11-devel
BuildRequires: libtool-ltdl libtool-ltdl-devel
%define JAVA 1
BuildRequires: java-devel
%define PHP 1
BuildRequires: php-devel
%define PANGOCAIRO 1
BuildRequires: cairo-devel >= 1.1.10 pango-devel gmp-devel gtk2-devel
%define RSVG 1
BuildRequires: librsvg2-devel
%define SFDP 1
BuildRequires: gts-devel
%define SMYRNA 1
BuildRequires: libglade2-devel gtkglarea2-devel gtkglext-devel freeglut-devel
%define GTK 1
%endif
%if %rhel >= 6
BuildRequires: perl-devel perl-libs perl-ExtUtils-Embed
%define LUA 1
BuildRequires: lua-devel
%define OCAML 1
BuildRequires: ocaml
%define MYLIBGD 0
BuildRequires: gd gd-devel
%define GDK 1
%define GHOSTSCRIPT 1
BuildRequires: ghostscript-devel
%define POPPLER 1
BuildRequires: poppler-glib-devel
%define _QT 1
BuildRequires: qt-devel
%endif
%endif
#-- Fedora specific Build Requirements
%if 0%{?fedora}
%if %fedora >= 9
BuildRequires: libXaw-devel libSM-devel libICE-devel libXpm-devel libXt-devel libXmu-devel libXext-devel libX11-devel
BuildRequires: fontconfig-devel
BuildRequires: libtool-ltdl libtool-ltdl-devel
%define TCL 1
BuildRequires: tcl-devel tk-devel
%define PERL 1
BuildRequires: perl-devel perl-ExtUtils-Embed
%define RUBY 1
BuildRequires: ruby ruby-devel
%define GUILE 1
BuildRequires: guile-devel
%define PYTHON 1
BuildRequires: python python-devel
%define JAVA 1
BuildRequires: java-devel
%define PHP 1
BuildRequires: php-devel
%define _QT 1
BuildRequires: qt-devel
%ifnarch ppc64
%define SHARP 1
BuildRequires: mono-core
%define OCAML 1
BuildRequires: ocaml
%endif
%define LUA 1
BuildRequires: lua-devel
%define PANGOCAIRO 1
BuildRequires: cairo-devel >= 1.1.10 pango-devel gmp-devel gtk2-devel
%define RSVG 1
BuildRequires: librsvg2-devel
%define MYLIBGD 0
BuildRequires: gd gd-devel
%define DEVIL 1
BuildRequires: DevIL-devel
%define SFDP 1
BuildRequires: gts-devel
%define LASI 1
BuildRequires: lasi-devel
%define GDK 1
%define IPSEPCOLA 1
%define ORTHO 1
%define GTK 1
%define SMYRNA 1
BuildRequires: libglade2-devel gtkglarea2-devel gtkglext-devel glade3-libgladeui-devel freeglut-devel
#define GLITZ 1
# BuildRequires: glitz-devel
%define GHOSTSCRIPT 1
BuildRequires: ghostscript-devel
%define POPPLER 1
BuildRequires: poppler-glib-devel
#define MING 1
#BuildRequires: ming ming-devel
%define R_LANG 1
BuildRequires: R-devel swig >= 1.3.33 perl-libs
%endif
%if %fedora >= 16
%define WEBP 1
BuildRequires: libwebp-devel
%endif
%if %fedora >= 19
%define SEPARATE_LICENSE 1
%endif
%if %fedora >= 21
%define _GO 1
BuildRequires: golang >= 1.2 gcc-go swig >= 3.0.2
%endif
%endif
# What a meal PHP makes of versioning !!!
%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
# Fix private-shared-object-provides
# RPM 4.8
%{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$}
%{?filter_setup}
# RPM 4.9
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
#-- main graphviz rpm ------------------------------------------------
Requires: %{name}-nox = %{version}-%{release}
Requires: %{name}-x = %{version}-%{release}
%description
A collection of tools for the manipulation and layout
of graphs (as in nodes and edges, not as in bar-charts).
%files
%defattr(-,root,root,-)
%if 0%{?SEPARATE_LICENSE}
%license COPYING
%endif
%doc COPYING AUTHORS ChangeLog NEWS README
#-- graphviz-nox rpm --------------------------------------------------
%package nox
Group: Applications/Multimedia
Summary: Graphviz commands that do not depend on X11 - all graphviz installation will want this.
Requires: urw-fonts
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-plugins-core = %{version}-%{release}
%description nox
Graphviz plugins and commands that do not depend on x11.
When used alone, this is intended for mimimalist web-server apps with no X11 on the server.
%files nox
%defattr(-,root,root,-)
%if 0%{?SEPARATE_LICENSE}
%license COPYING
%endif
%doc COPYING AUTHORS ChangeLog NEWS README
%exclude %{_bindir}/dot_builtins
%{_bindir}/acyclic
%{_bindir}/bcomps
%{_bindir}/ccomps
%{_bindir}/circo
%{_bindir}/cluster
%{_bindir}/dijkstra
%{_bindir}/dot
%{_bindir}/dot2gxl
%{_bindir}/fdp
%{_bindir}/gc
%{_bindir}/gml2gv
%{_bindir}/graphml2gv
%{_bindir}/gv2gml
%{_bindir}/gv2gxl
%{_bindir}/gvcolor
%{_bindir}/gvgen
%{_bindir}/gvmap
%{_bindir}/gvmap.sh
%{_bindir}/gvpack
%{_bindir}/gvpr
%{_bindir}/gxl2dot
%{_bindir}/gxl2gv
%{_bindir}/mingle
%{_bindir}/edgepaint
%{_bindir}/mm2gv
%{_bindir}/neato
%{_bindir}/nop
%{_bindir}/osage
%{_bindir}/patchwork
%{_bindir}/prune
%{_bindir}/sccmap
%{_bindir}/sfdp
%{_bindir}/tred
%{_bindir}/twopi
%{_bindir}/unflatten
%{_mandir}/man1/acyclic.1*
%{_mandir}/man1/bcomps.1*
%{_mandir}/man1/ccomps.1*
%{_mandir}/man1/circo.1*
%{_mandir}/man1/cluster.1*
%{_mandir}/man1/diffimg.1*
%{_mandir}/man1/dijkstra.1*
%{_mandir}/man1/dot.1*
%{_mandir}/man1/fdp.1*
%{_mandir}/man1/gc.1*
%{_mandir}/man1/gml2gv.1*
%{_mandir}/man1/graphml2gv.1*
%{_mandir}/man1/gv2gml.1*
%{_mandir}/man1/gv2gxl.1*
%{_mandir}/man1/gvcolor.1*
%{_mandir}/man1/gvgen.1*
%{_mandir}/man1/gvmap.1*
%{_mandir}/man1/gvmap.sh.1*
%{_mandir}/man1/gvpack.1*
%{_mandir}/man1/gvpr.1*
%{_mandir}/man1/gxl2gv.1*
%{_mandir}/man1/mingle.1*
%{_mandir}/man1/edgepaint.1*
%{_mandir}/man1/mm2gv.1*
%{_mandir}/man1/neato.1*
%{_mandir}/man1/nop.1*
%{_mandir}/man1/osage.1*
%{_mandir}/man1/patchwork.1*
%{_mandir}/man1/prune.1*
%{_mandir}/man1/sccmap.1*
%{_mandir}/man1/sfdp.1*
%{_mandir}/man1/tred.1*
%{_mandir}/man1/twopi.1*
%{_mandir}/man1/unflatten.1*
%{_mandir}/man7/graphviz.7*
%dir %{_datadir}/graphviz
%{_datadir}/graphviz/gvpr/*
#-- graphviz-libs rpm --------------------------------------------------
%package libs
Group: Applications/Multimedia
Summary: Graphviz base libs
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description libs
Graphviz core libs
%files libs
%defattr(-,root,root,-)
%{_libdir}/libcdt.so.*
%{_libdir}/libcgraph.so.*
%{_libdir}/libgvc.so.*
%{_libdir}/libgvpr.so.*
%{_libdir}/libpathplan.so.*
%{_libdir}/libxdot.so.4*
%{_libdir}/liblab_gamut.so.*
#-- graphviz-plugins-core rpm --------------------------------------------------
%package plugins-core
Group: Applications/Multimedia
Summary: Graphviz plugins - core layout engines and text renderers
Requires: %{name} = %{version}-%{release}
%description plugins-core
Graphviz plugins - core layout engines and text renderers
# run "dot -c" to generate plugin config in {_libdir}/graphviz/config
%post
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
# if there is no dot after everything else is done, then remove config
%postun
if [ $1 -eq 0 ]; then
rm -f $RPM_INSTALL_PREFIX0/%{_lib}/graphviz/config || :
fi
%files plugins-core
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz
%{_libdir}/graphviz/libgvplugin_core.so.*
%{_libdir}/graphviz/libgvplugin_dot_layout.so.*
%{_libdir}/graphviz/libgvplugin_neato_layout.so.*
#-- graphviz-x rpm --------------------------------------------------
%if 0%{?__X}
%package x
Group: Applications/Multimedia
Summary: Graphviz commands that depend on x11 - most installations will want this
Requires: %{name}-nox = %{version}-%{release}
Requires: %{name}-plugins-x = %{version}-%{release}
%description x
Graphviz plugins and commands that depend on x11 - most installations will want this
%files x
%defattr(-,root,root,-)
%if 0%{?SEPARATE_LICENSE}
%license COPYING
%endif
%doc COPYING AUTHORS ChangeLog NEWS README
%{_bindir}/lefty
%{_bindir}/lneato
%{_bindir}/dotty
%{_bindir}/vimdot
%{_mandir}/man1/lefty.1*
%{_mandir}/man1/lneato.1*
%{_mandir}/man1/dotty.1*
%{_mandir}/man1/vimdot.1*
%{_datadir}/graphviz/lefty
%if 0%{?SMYRNA}
%{_bindir}/smyrna
%{_datadir}/graphviz/smyrna
%{_mandir}/man1/smyrna.1*
%endif
%endif
#-- graphviz-plugins-x rpm --------------------------------------------------
%if 0%{?__X}
%package plugins-x
Group: Applications/Multimedia
Summary: Graphviz plugins and commands that depend on x11 - most installations will want this
Requires: %{name} = %{version}-%{release}
%description plugins-x
Graphviz plugins that depend on x11 - most installations will want this.
# run "dot -c" to generate plugin config in {_libdir}/graphviz/config
%post plugins-x
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
%postun plugins-x
[ -x $RPM_INSTALL_PREFIX0/bin/dot ] && LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c || :
%files plugins-x
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz
%{_libdir}/graphviz/libgvplugin_xlib.so.*
%if 0%{?PANGOCAIRO}
%{_libdir}/graphviz/libgvplugin_pango.so.*
%endif
%if 0%{?LASI}
%{_libdir}/graphviz/libgvplugin_lasi.so.*
%endif
%if 0%{?GDK}
%{_libdir}/graphviz/libgvplugin_gdk.so.*
%endif
%if 0%{?GTK}
%{_libdir}/graphviz/libgvplugin_gtk.so.*
%endif
%if 0%{?GHOSTSCRIPT}
%{_libdir}/graphviz/libgvplugin_gs.so.*
%endif
%if 0%{?POPPLER}
%{_libdir}/graphviz/libgvplugin_poppler.so.*
%endif
%if 0%{?RSVG}
%{_libdir}/graphviz/libgvplugin_rsvg.so.*
%endif
%endif
#-- graphviz-gd rpm --------------------------------------------------
%package gd
Group: Applications/Multimedia
Summary: Graphviz binaries that depend on libgd
Requires: %{name} = %{version}-%{release}
# this next Requires is not strictly neccessary for diffimg,
# but users will probably expect the plugins to get pulled in
Requires: %{name}-plugins-gd = %{version}-%{release}
%description gd
Graphviz binaries that depend on gd. (Unless you absolutely have
to use GIF, you are recommended to use the PNG format instead because
of the better quality anti-aliased lines provided by the cairo+pango
based renderer.)
%files gd
%defattr(-,root,root,-)
%{_bindir}/diffimg
#-- graphviz-plugins-gd rpm --------------------------------------------------
%package plugins-gd
Group: Applications/Multimedia
Summary: Graphviz plugin for gd renderers.
Requires: %{name} = %{version}-%{release}
%description plugins-gd
Graphviz plugin for image rendering using libgd. (Unless you absolutely have
to use GIF, you are recommended to use the PNG format instead because
of the better quality anti-aliased lines provided by the cairo+pango
based renderer.)
# run "dot -c" to generate plugin config in {_libdir}/graphviz/config
%post plugins-gd
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
%postun plugins-gd
[ -x $RPM_INSTALL_PREFIX0/bin/dot ] && LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c || :
%files plugins-gd
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz
%{_libdir}/graphviz/libgvplugin_gd.so.*
#-- graphviz-plugins-webp rpm --------------------------------------------------
%if 0%{?WEBP}
%package plugins-webp
Group: Applications/Multimedia
Summary: Graphviz plugin for webp format images, using libwebp
Requires: %{name}-x = %{version}-%{release}
Obsoletes: %{name}-webp
%description plugins-webp
Graphviz plugin for webp image rendering.
# run "dot -c" to generate plugin config in {_libdir}/graphviz/config
%post plugins-webp
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
%postun plugins-webp
[ -x $RPM_INSTALL_PREFIX0/bin/dot ] && LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c || :
%files plugins-webp
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz
%{_libdir}/graphviz/libgvplugin_webp.so.*
%endif
#-- graphviz-plugins-devil rpm --------------------------------------------------
%if 0%{?DEVIL}
%package plugins-devil
Group: Applications/Multimedia
Summary: Graphviz plugin for renderers based on DevIL
Requires: %{name}-x = %{version}-%{release}
Obsoletes: %{name}-devil
%description plugins-devil
Graphviz plugin for renderers based on DevIL. (Unless you absolutely have
to use BMP, TIF, or TGA, you are recommended to use the PNG format instead
supported directly by the cairo+pango based renderer in the base graphviz rpm.)
# run "dot -c" to generate plugin config in {_libdir}/graphviz/config
%post plugins-devil
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
%postun plugins-devil
[ -x $RPM_INSTALL_PREFIX0/bin/dot ] && LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c || :
%files plugins-devil
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz
%{_libdir}/graphviz/libgvplugin_devil.so.*
%endif
#-- graphviz-plugins-ming rpm --------------------------------------------------
%if 0%{?MING}
%package plugins-ming
Group: Applications/Multimedia
Summary: Graphviz plugin for flash renderer based on ming
Requires: %{name}-x = %{version}-%{release}
Obsoletes: %{name}-ming
%description plugins-ming
Graphviz plugin for -Tswf (flash) renderer based on ming.
# run "dot -c" to generate plugin config in {_libdir}/graphviz/config
%post plugins-ming
LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
%postun plugins-ming
[ -x $RPM_INSTALL_PREFIX0/bin/dot ] && LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c || :
%files plugins-ming
%{_libdir}/graphviz/libgvplugin_ming.so.*
%{_libdir}/graphviz/*fdb
%endif
#-- graphviz-qt rpm --------------------------------------------------
%if 0%{?_QT}
%package qt
Group: Applications/Multimedia
Summary: Graphviz applications using _QT
Requires: %{name}-x = %{version}-%{release}
%description qt
Graphviz applications using _QT - currently just gvedit
%files qt
%defattr(-,root,root,-)
%{_bindir}/gvedit
%{_datadir}/graphviz/gvedit
%{_mandir}/man1/gvedit.1*
%endif
#-- graphviz-lang-sharp rpm --------------------------------------------
%if 0%{?SHARP}
%package lang-sharp
Group: Applications/Multimedia
Summary: C# extension for graphviz
Requires: %{name} = %{version}-%{release}, mono-core
Obsoletes: %{name}-sharp
%description lang-sharp
C# extension for graphviz.
%files lang-sharp
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz/sharp
%{_libdir}/graphviz/sharp/*
%{_mandir}/man3/*.3sharp.*
%endif
#-- graphviz-lang-go rpm --------------------------------------------
%if 0%{?_GO}
%package lang-go
Group: Applications/Multimedia
Summary: GO extension for graphviz
Requires: %{name} = %{version}-%{release}, golang
Obsoletes: %{name}-go
%description lang-go
Guile extension for graphviz.
%files lang-go
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz/go
%{_libdir}/graphviz/go/*
%{_mandir}/man3/*.3go.*
%endif
#-- graphviz-lang-guile rpm --------------------------------------------
%if 0%{?GUILE}
%package lang-guile
Group: Applications/Multimedia
Summary: Guile extension for graphviz
Requires: %{name} = %{version}-%{release}, guile
Obsoletes: %{name}-guile
%description lang-guile
Guile extension for graphviz.
%files lang-guile
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz/guile
%{_libdir}/graphviz/guile/*
%{_mandir}/man3/*.3guile.*
%endif
#-- graphviz-lang-io rpm -----------------------------------------------
%if 0%{?_IO}
%package lang-io
Group: Applications/Multimedia
Summary: Io extension for graphviz
Requires: %{name} = %{version}-%{release}, io
Obsoletes: %{name}-io
%description lang-io
Io extension for graphviz.
%files lang-io
%defattr(-,root,root,-)
%{_mandir}/man3/*.3io.*
%endif
#-- graphviz-lang-java rpm ---------------------------------------------
%if 0%{?JAVA}
%package lang-java
Group: Applications/Multimedia
Summary: Java extension for graphviz
Requires: %{name} = %{version}-%{release}, java
Obsoletes: %{name}-java
%description lang-java
Java extension for graphviz.
%files lang-java
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz/java
%{_libdir}/graphviz/java/*
%{_mandir}/man3/*.3java.*
%endif
#-- graphviz-lang-lua rpm ----------------------------------------------
%if 0%{?LUA}
%package lang-lua
Group: Applications/Multimedia
Summary: Lua extension for graphviz
Requires: %{name} = %{version}-%{release}, lua
Obsoletes: %{name}-lua
%description lang-lua
Lua extension for graphviz.
%files lang-lua
%defattr(-,root,root,-)
%{_libdir}/lua*/*
%{_datadir}/graphviz/demo/*.lua*
%{_mandir}/man3/*.3lua.*
%exclude %{_libdir}/graphviz/lua/*.so
%endif
#-- graphviz-lang-ocaml rpm --------------------------------------------
%if 0%{?OCAML}
%package lang-ocaml
Group: Applications/Multimedia
Summary: Ocaml extension for graphviz
Requires: %{name} = %{version}-%{release}, ocaml
Obsoletes: %{name}-ocaml
%description lang-ocaml
Ocaml extension for graphviz.
%files lang-ocaml
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz/ocaml
%{_libdir}/graphviz/ocaml/*
%{_mandir}/man3/*.3ocaml.*
%endif
#-- graphviz-lang-perl rpm ---------------------------------------------
%if 0%{?PERL}
%package lang-perl
Group: Applications/Multimedia
Summary: Perl extension for graphviz
Requires: %{name} = %{version}-%{release}, perl
Obsoletes: %{name}-perl
%description lang-perl
Perl extension for graphviz.
%files lang-perl
%defattr(-,root,root,-)
%{_libdir}/perl*/*
%{_datadir}/graphviz/demo/*.pl*
%{_mandir}/man3/*.3perl.*
%exclude %{_libdir}/graphviz/perl/*.so
%exclude %{_libdir}/graphviz/perl/*.pm
%endif
#-- graphviz-lang-php rpm ----------------------------------------------
%if 0%{?PHP}
%package lang-php
Group: Applications/Multimedia
Summary: PHP extension for graphviz
Requires: %{name} = %{version}-%{release}, /usr/bin/php
Obsoletes: %{name}-php
%description lang-php
PHP extension for graphviz.
%files lang-php
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/php.d/%{name}.ini
%{php_extdir}/gv.so
%{_datadir}/php*/*
%{_datadir}/graphviz/demo/*.php*
%{_mandir}/man3/*.3php.*
%exclude %{_libdir}/graphviz/php/*.so
%exclude %{_libdir}/graphviz/php/*.php
%endif
#-- graphviz-lang-python rpm -------------------------------------------
%if 0%{?PYTHON}
%package lang-python
Group: Applications/Multimedia
Summary: Python extension for graphviz
Requires: %{name} = %{version}-%{release}, python
Obsoletes: %{name}-python
%description lang-python
Python extension for graphviz.
%files lang-python
%defattr(-,root,root,-)
%{_libdir}/python*/*
%{_datadir}/graphviz/demo/*.py*
%{_mandir}/man3/*.3python.*
%exclude %{_libdir}/graphviz/python/*.so
%exclude %{_libdir}/graphviz/python/*.py*
%endif
#-- graphviz-lang-R rpm ---------------------------------------------
%if 0%{?R_LANG}
%package lang-R
Group: Applications/Multimedia
Summary: R extension for graphviz
Requires: %{name} = %{version}-%{release}, R
Obsoletes: %{name}-R
%description lang-R
R extension for graphviz.
%files lang-R
%defattr(-,root,root,-)
%dir %{_libdir}/graphviz/R
%{_libdir}/graphviz/R/*
%{_mandir}/man3/*.3r.*
%endif
#-- graphviz-lang-ruby rpm ---------------------------------------------
%if 0%{?RUBY}
%package lang-ruby
Group: Applications/Multimedia
Summary: Ruby extension for graphviz
Requires: %{name} = %{version}-%{release}, ruby
Obsoletes: %{name}-ruby
%description lang-ruby
Ruby extension for graphviz.
%files lang-ruby
%defattr(-,root,root,-)
%{_libdir}/*ruby*/*
%{_datadir}/graphviz/demo/*.rb*
%{_mandir}/man3/*.3ruby.*
%exclude %{_libdir}/graphviz/ruby/*.so
%endif
#-- graphviz-lang-tcl rpm ----------------------------------------------
%if 0%{?TCL}
%package lang-tcl
Group: Applications/Multimedia
Summary: Tcl extension & tools for graphviz
Requires: %{name} = %{version}-%{release}, tcl >= 8.3
Obsoletes: %{name}-tcl
%description lang-tcl
Various tcl packages (extensions) for the graphviz tools.
%files lang-tcl
%defattr(-,root,root,-)
%{_libdir}/tcl*/*
%{_datadir}/graphviz/demo/*.tcl*
%{_datadir}/graphviz/demo/*_data
%{_datadir}/graphviz/demo/entities.html
%{_mandir}/man3/*.3tcl.*
%exclude %{_libdir}/graphviz/tcl/*
%endif
#-- graphviz-devel rpm --------------------------------------------
%package devel
Group: Development/Libraries
Summary: Development package for graphviz
Requires: %{name}-libs = %{version}-%{release}, pkgconfig
%description devel
A collection of tools for the manipulation and layout
of graphs (as in nodes and edges, not as in bar-charts).
This package contains development files for graphviz-libs.
%files devel
%defattr(-,root,root,-)
%{_includedir}/graphviz
%{_libdir}/libcdt.so
%{_mandir}/man3/cdt.3.*
%{_libdir}/pkgconfig/libcdt.pc
%{_libdir}/libcgraph.so
%{_mandir}/man3/cgraph.3.*
%{_libdir}/pkgconfig/libcgraph.pc
%{_libdir}/libgvc.so
%{_mandir}/man3/gvc.3.*
%{_libdir}/pkgconfig/libgvc.pc
%{_libdir}/libgvpr.so
%{_mandir}/man3/gvpr.3.*
%{_libdir}/pkgconfig/libgvpr.pc
%{_libdir}/libpathplan.so
%{_mandir}/man3/pathplan.3.*
%{_libdir}/pkgconfig/libpathplan.pc
%{_libdir}/libxdot.so
%{_mandir}/man3/xdot.3.*
%{_libdir}/pkgconfig/libxdot.pc
%{_libdir}/liblab_gamut.so
%{_mandir}/man3/lab_gamut.3.*
%{_libdir}/pkgconfig/liblab_gamut.pc
%{_mandir}/man3/expr.3.*
%{_mandir}/man3/pack.3.*
%exclude %{_libdir}/graphviz/libgvplugin*
%exclude %{_libdir}/graphviz/*.so
#-- graphviz-graphs rpm -------------------------------------------
%package graphs
Group: Applications/Multimedia
Summary: Demo graphs for graphviz
%if 0%{?fedora} >= 11
BuildArch: noarch
%endif
%if 0%{?rhel} >= 6
BuildArch: noarch
%endif
%description graphs
Some demo graphs for graphviz.
%files graphs
%defattr(-,root,root,-)
%dir %{_datadir}/graphviz
%{_datadir}/graphviz/graphs
%if 0%{?SMYRNA}
%{_datadir}/graphviz/examples
%endif
#-- graphviz-doc rpm ----------------------------------------------
%package doc
Group: Documentation
Summary: PDF and HTML documents for graphviz
%if 0%{?fedora} >= 11
BuildArch: noarch
%endif
%if 0%{?rhel} >= 6
BuildArch: noarch
%endif
%description doc
Provides some additional PDF and HTML documentation for graphviz.
%files doc
%defattr(-,root,root,-)
%doc __doc/*
#-- building --------------------------------------------------
%prep
%setup -q
### the rpm in centos4/5 is too old to handle this
#for p in %{patches}; do
# patch -p1 < ${p} || exit 1
#done
%build
# XXX ix86 only used to have -ffast-math, let's use everywhere
%{expand: %%define optflags %{optflags} -ffast-math}
# %%configure is broken in RH7.3 rpmbuild
CFLAGS="$RPM_OPT_FLAGS" \
./configure \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--libdir=%{_libdir} \
--includedir=%{_includedir} \
--datadir=%{_datadir} \
--mandir=%{_mandir} \
--disable-static \
--disable-dependency-tracking \
--enable-sharp%{!?SHARP:=no} \
--enable-go%{!?_GO:=no} \
--enable-guile%{!?GUILE:=no} \
--enable-io%{!?_IO:=no} \
--enable-java%{!?JAVA:=no} \
--enable-lua%{!?LUA:=no} \
--enable-ocaml%{!?OCAML:=no} \
--enable-perl%{!?PERL:=no} \
--enable-php%{!?PHP:=no} \
--enable-python%{!?PYTHON:=no} \
--enable-r%{!?R_LANG:=no} \
--enable-ruby%{!?RUBY:=no} \
--enable-tcl%{!?TCL:=no} \
--with%{!?DEVIL:out}-devil \
--with%{!?WEBP:out}-webp \
--with%{!?GDK:out}-gdk \
--with%{!?GHOSTSCRIPT:out}-ghostscript \
--with%{!?GLITZ:out}-glitz \
--with%{!?IPSEPCOLA:out}-ipsepcola \
--with%{!?LASI:out}-lasi \
--with%{!?MING:out}-ming \
--with%{!?_QT:out}-qt \
--with%{!?PANGOCAIRO:out}-pangocairo \
--with%{!?POPPLER:out}-poppler \
--with%{!?RSVG:out}-rsvg \
--with%{!?ORTHO:out}-ortho \
--with%{!?SFDP:out}-sfdp \
--with%{!?SMYRNA:out}-smyrna \
--with%{!?__X:out}-x
make %{?_smp_mflags}
%install
rm -rf %{buildroot} __doc
make DESTDIR=%{buildroot} \
docdir=%{buildroot}%{_docdir}/%{name} \
pkgconfigdir=%{_libdir}/pkgconfig \
install
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
chmod -x %{buildroot}%{_datadir}/%{name}/lefty/*
cp -a %{buildroot}%{_datadir}/%{name}/doc __doc
rm -rf %{buildroot}%{_datadir}/%{name}/doc
%if 0%{?PHP}
# PHP configuration file
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
%{__cat} << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/%{name}.ini
; Enable %{name} extension module
extension=gv.so
__EOF__
%endif
%check
%ifnarch ppc64 ppc
# regression test, segfaults on ppc/ppc64, possible endian issues?
# regressions tests require ksh93 - not available on centos3
#cd rtest
#make rtest
%endif
%clean
# optional regression test using the products in the build tree
%if 0%{?rtest}
cd rtest
make rtest
%endif
# clean up temporary installation
rm -rf %{buildroot}
#-- changelog --------------------------------------------------
%changelog
* Tue Mar 03 2009 John Ellson <ellson@research.att.com>
- release graphviz-2.22 - see ChangeLog for details
* Fri Oct 26 2007 John Ellson <ellson@research.att.com>
- reinstated binary relocatability in AT&T's rpms since we need it internally
* Wed Aug 15 2007 John Ellson <ellson@research.att.com>
- release 2.14.1 - see ChangeLog for details
* Thu Aug 2 2007 John Ellson <ellson@research.att.com>
- release 2.14 - see ChangeLog for details
* Fri Mar 16 2007 Stephen North <north@research.att.com>
- remove xorg-X11-devel from rhel >= 5
* Mon Dec 11 2006 John Ellson <john.ellson@comcast.net>
- fix graphviz-lua description (Fedora BZ#218191)
* Tue Sep 13 2005 John Ellson <ellson@research.att.com>
- split out language bindings into their own rpms so that
main rpm doesn't depend on (e.g.) ocaml
* Sat Aug 13 2005 John Ellson <ellson@research.att.com>
- imported various fixes from the Fedora-Extras .spec by Oliver Falk <oliver@linux-kernel.at>
* Wed Jul 20 2005 John Ellson <ellson@research.att.com>
- release 2.4