]> git.pld-linux.org Git - packages/graphviz.git/blob - graphviz.spec
graphviz ignores $JAVA_HOME so use fixed paths
[packages/graphviz.git] / graphviz.spec
1 # TODO
2 # - %{_libdir}/graphviz/config is not FHS friendly path as config
3 # - io language binding (waiting for swig support)
4 # - some plugin subpackages? (libgvplugin_*: gs=ghostscript, gtk, lasi, poppler, visio, webp)
5 #
6 # Conditional build:
7 # - language bindings
8 %bcond_without  dotnet          # C# bindings
9 %bcond_without  golang          # Go bindings
10 %bcond_without  guile           # guile bindings
11 %bcond_without  java            # Java bindings
12 %bcond_without  ocaml           # OCaml bindings
13 %bcond_with     php             # PHP bindings
14 %bcond_without  perl            # Perl bindings
15 %bcond_without  ruby            # Ruby bindings
16 %bcond_without  tcl             # Tcl bindings
17 %bcond_without  lua             # Lua bindings
18 %bcond_without  r               # R bindings
19 %bcond_without  python          # Python bindings
20 %bcond_without  python2         # Python 2 bindings
21 %bcond_without  python3         # Python 3 bindings
22 %bcond_with     io              # io language bindings (needs swig support)
23 # - plugins, features
24 %bcond_without  gd              # gd plugin and gd support in tcl package
25 %bcond_without  ming            # ming support
26 %bcond_without  devil           # DevIL plugin
27 %bcond_without  qt              # Qt features (gvedit utility)
28 %bcond_without  smyrna          # SMYRNA utility (large graph viewer)
29 %bcond_without  ipsepcola       # IPSEPCOLA features in neato engine [C++ portability problems]
30
31 %define         tclver  8.6
32
33 %if 0%{!?php_name:1}
34 %define         php_name        php73
35 %endif
36
37 %ifarch i386 x32
38 %undefine with_dotnet
39 %endif
40 %ifnarch %{ix86} %{x8664}
41 %undefine with_java
42 %endif
43 %ifarch i386 i486
44 %undefine with_java
45 %endif
46 %ifnarch %go_arches
47 %undefine with_golang
48 %endif
49 %if %{without python}
50 %undefine       with_python2
51 %undefine       with_python3
52 %endif
53
54 %{?with_java:%{?use_default_jdk}}
55
56 Summary:        Graph Visualization Tools
57 Summary(pl.UTF-8):      Narzędzie do wizualizacji w postaci grafów
58 Name:           graphviz
59 Version:        2.47.2
60 Release:        3
61 License:        EPL v1.0
62 Group:          X11/Applications/Graphics
63 #Source0Download: https://graphviz.org/download/source/
64 Source0:        https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/%{version}/%{name}-%{version}.tar.xz
65 # Source0-md5:  4b60526ed7a6a43dfb23b5c175286cd8
66 Patch0:         %{name}-fontpath.patch
67 Patch1:         %{name}-link.patch
68 Patch2:         %{name}-bad-header.patch
69 Patch3:         %{name}-php.patch
70 Patch4:         %{name}-ltdl.patch
71 Patch7:         %{name}-ruby.patch
72 Patch10:        %{name}-ming.patch
73 Patch12:        %{name}-webp.patch
74 Patch14:        python-paths.patch
75 Patch15:        ghostscript918.patch
76 Patch16:        java.patch
77 URL:            http://www.graphviz.org/
78 %{?with_devil:BuildRequires:    DevIL-devel}
79 %{?with_r:BuildRequires:        R}
80 BuildRequires:  ann-devel
81 BuildRequires:  autoconf >= 2.61
82 BuildRequires:  automake
83 BuildRequires:  bison >= 3.0
84 BuildRequires:  cairo-devel >= 1.0.0
85 # for tests
86 #BuildRequires: criterion-devel
87 BuildRequires:  expat-devel >= 1.95
88 BuildRequires:  flex >= 2.5.2
89 BuildRequires:  fontconfig-devel
90 BuildRequires:  freetype-devel >= 2.0.0
91 BuildRequires:  gawk
92 BuildRequires:  gcc >= 5:3.2
93 %{?with_gd:BuildRequires:       gd-devel >= 2.0.34}
94 BuildRequires:  gdk-pixbuf2-devel >= 2.0
95 BuildRequires:  gettext-tools
96 BuildRequires:  ghostscript-devel
97 %{?with_golang:BuildRequires:   golang}
98 BuildRequires:  gtk+2-devel >= 2:2.8.0
99 # only tested, actually not used
100 #BuildRequires: gtkglarea-devel >= 2.0
101 BuildRequires:  gts-devel
102 %{?with_guile:BuildRequires:    guile-devel >= 2.0}
103 #BuildRequires: io
104 %if %{with java}
105 %{?use_jdk:%buildrequires_jdk}%{!?use_jdk:BuildRequires:        jdk}
106 BuildRequires:  jpackage-utils
107 %endif
108 BuildRequires:  libLASi-devel
109 BuildRequires:  libjpeg-devel
110 BuildRequires:  libltdl-devel >= 2:2.2
111 BuildRequires:  libpng-devel
112 BuildRequires:  librsvg-devel >= 2.36.0
113 BuildRequires:  libstdc++-devel >= 6:4.7
114 BuildRequires:  libtool >= 2:2.2
115 BuildRequires:  libwebp-devel
116 # currently external library is not used
117 #BuildRequires: libvisio-devel
118 # for lua51 binary
119 %if %{with lua}
120 BuildRequires:  lua51
121 BuildRequires:  lua51-devel >= 5.1
122 %endif
123 %{?with_ming:BuildRequires:     ming-devel >= 0.4}
124 %{?with_dotnet:BuildRequires:   mono-csharp}
125 %{?with_ocaml:BuildRequires:    ocaml}
126 BuildRequires:  pango-devel >= 1:1.14.9
127 BuildRequires:  perl-devel
128 %if %{with php}
129 BuildRequires:  %{php_name}-devel
130 BuildRequires:  %{php_name}-program
131 BuildRequires:  swig-php >= 3.0.11
132 %endif
133 BuildRequires:  pkgconfig
134 BuildRequires:  poppler-glib-devel
135 %{?with_python:BuildRequires:   python-devel >= 1:2.3}
136 %{?with_python2:BuildRequires:  python-devel >= 1:2.3}
137 %{?with_python3:BuildRequires:  python3-devel >= 1:3.6}
138 %{?with_perl:BuildRequires:     rpm-perlprov}
139 %{?with_python:BuildRequires:   rpm-pythonprov}
140 BuildRequires:  rpmbuild(macros) >= 2.021
141 %{?with_ruby:BuildRequires:     ruby-devel >= 1.9}
142 BuildRequires:  sed >= 4.0
143 # swig-csharp,swig-go,swig-java,swig-lua,swig-ocaml in main swig
144 # swig-io ???
145 BuildRequires:  swig >= 1.3
146 %{?with_guile:BuildRequires:    swig-guile >= 2.0.3}
147 %{?with_perl:BuildRequires:     swig-perl >= 1.3}
148 %{?with_python:BuildRequires:   swig-python >= 1.3}
149 %{?with_ruby:BuildRequires:     swig-ruby >= 1.3}
150 BuildRequires:  tar >= 1:1.22
151 %if %{with tcl}
152 BuildRequires:  swig-tcl >= 1.3
153 BuildRequires:  tcl-devel >= %{tcl_ver}
154 BuildRequires:  tk-devel >= 8.6.0
155 %endif
156 BuildRequires:  xorg-lib-libX11-devel
157 BuildRequires:  xorg-lib-libXaw-devel
158 BuildRequires:  xorg-lib-libXpm-devel
159 # tested in configure to enable ghostscript plugin build, actually not used
160 BuildRequires:  xorg-lib-libXrender-devel
161 BuildRequires:  xz
162 BuildRequires:  zlib-devel
163 %if %{with smyrna}
164 BuildRequires:  OpenGL-glut-devel
165 BuildRequires:  gtkglext-devel >= 1.0
166 BuildRequires:  libglade2-devel >= 2.0
167 %endif
168 %if %{with qt}
169 BuildRequires:  Qt5Core-devel >= 5
170 BuildRequires:  Qt5Gui-devel >= 5
171 BuildRequires:  Qt5PrintSupport-devel >= 5
172 BuildRequires:  Qt5Widgets-devel >= 5
173 BuildRequires:  qt5-build >= 5
174 BuildRequires:  qt5-qmake >= 5
175 %endif
176 Requires(post,postun):  /sbin/ldconfig
177 # gd plugin is required by dot command (if graphviz is built with gd support)
178 %{?with_gd:Requires:    %{name}-gd = %{version}-%{release}}
179 Requires:       %{name}-libs = %{version}-%{release}
180 Requires:       cairo >= 1.0.0
181 Requires:       fonts-Type1-urw
182 Requires:       gtk+2 >= 2:2.8.0
183 Requires:       libltdl >= 2:2.2
184 Requires:       librsvg >= 2.36.0
185 Requires:       pango >= 1:1.14.9
186 %{!?with_golang:Obsoletes:      golang-graphviz < %{version}}
187 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
188
189 %description
190 A collection of tools and tcl packages for the manipulation and layout
191 of graphs (as in nodes and edges, not as in barcharts).
192
193 %description -l pl.UTF-8
194 Kolekcja narzędzi oraz pakietów tcl służących do manipulacji i
195 rozmieszczania grafów.
196
197 %package libs
198 Summary:        Graphviz shared libraries
199 Summary(pl.UTF-8):      Biblioteki współdzielone graphviza
200 Group:          Libraries
201 Conflicts:      graphviz < 2.40.1-1
202
203 %description libs
204 Graphviz shared libraries.
205
206 %description libs -l pl.UTF-8
207 Biblioteki współdzielone graphviza.
208
209 %package devil
210 Summary:        Graphviz plugin for renderers based on DevIL
211 Summary(pl.UTF-8):      Wtyczka Graphviza do renderowania w oparciu o bibliotekę DevIL
212 Group:          Applications/Multimedia
213 Requires:       %{name}-libs = %{version}-%{release}
214
215 %description devil
216 Graphviz plugin for renderers based on DevIL. (Unless you absolutely
217 have to use BMP, TIF, or TGA, you are recommended to use the PNG
218 format instead supported directly by the cairo+pango based renderer in
219 the base graphviz rpm.)
220
221 %description devil -l pl.UTF-8
222 Wtyczka Graphviza do renderowania w oparciu o bibliotekę DevIL (jeśli
223 nie ma absolutnej konieczności używania formatu BMP, TIF lub TGA,
224 zalecane jest używanie format PNG bezpośrednio z renderera cairo+pango
225 obecnego w podstawowym pakiecie graphviz.
226
227 %package gd
228 Summary:        Graphviz plugin for renderers based on GD
229 Summary(pl.UTF-8):      Wtyczka Graphviza do renderowania w oparciu o bibliotekę GD
230 Group:          Applications/Multimedia
231 Requires:       %{name}-libs = %{version}-%{release}
232 Requires:       gd >= 2.0.33-5
233
234 %description gd
235 Graphviz plugin for renderers based on gd. (Unless you absolutely have
236 to use GIF, you are recommended to use the PNG format instead because
237 of the better quality anti-aliased lines provided by the cairo+pango
238 based renderer.)
239
240 %description gd -l pl.UTF-8
241 Wtyczka Graphviza do renderowania w oparciu o bibliotekę DevIL (jeśli
242 nie ma absolutnej konieczności używania formatu GIF, zalecane jest
243 używanie format PNG bezpośrednio z renderera cairo+pango obecnego w
244 podstawowym pakiecie graphviz.
245
246 %package ming
247 Summary:        Graphviz plugin for flash renderer based on ming
248 Summary(pl.UTF-8):      Wtyczka Graphviza do renderowania w oparciu o bibliotekę ming
249 Group:          Applications/Multimedia
250 Requires:       %{name}-libs = %{version}-%{release}
251
252 %description ming
253 Graphviz plugin for -Tswf (flash) renderer based on ming.
254
255 %description ming -l pl.UTF-8
256 Wtyczka Graphviza do renderowania z opcją -Tswf (flash) w oparciu o
257 bibliotekę ming.
258
259 %package devel
260 Summary:        Header files for graphviz libraries
261 Summary(pl.UTF-8):      Pliki nagłówkowe do bibliotek graphviz
262 Group:          X11/Development/Libraries
263 Requires:       %{name}-libs = %{version}-%{release}
264 Requires:       libltdl-devel >= 2:2
265
266 %description devel
267 This package contains the header files for graphviz libraries.
268
269 %description devel -l pl.UTF-8
270 Ten pakiet zawiera pliki nagłówkowe do bibliotek graphviz.
271
272 %package gvedit
273 Summary:        gvedit - simple graph editor and viewer based on Qt
274 Summary(pl.UTF-8):      gvedit - prosty edytor i przeglądarka grafów oparta na Qt
275 Group:          X11/Applications/Graphics
276 Requires:       %{name} = %{version}-%{release}
277
278 %description gvedit
279 gvedit provides a simple Qt-based graph editor and viewer.
280
281 %description gvedit -l l.UTF-8
282 gvedit to prosty edytor i przeglądarka grafów oparta na Qt.
283
284 %package smyrna
285 Summary:        SMYRNA large graph viewer
286 Summary(pl.UTF-8):      SMYRNA - przeglądarka dużych grafów
287 Group:          X11/Applications/Graphics
288 Requires:       %{name} = %{version}-%{release}
289 Requires:       gtkglext >= 1.0
290
291 %description smyrna
292 SMYRNA is an interactive viewer for graphs in the DOT format. It is
293 especially designed to handle large graphs, and allows flat and
294 topological fisheye views.
295
296 %description smyrna -l pl.UTF-8
297 SMYRNA to interaktywna przeglądarka grafów w formacie DOT. Jest
298 przeznaczona szczególnie do obsługi dużych grafów, udostępnia widok
299 płaski oraz topologiczny typu "rybie oko".
300
301 %package doc-html
302 Summary:        HTML documentation for graphviz
303 Summary(pl.UTF-8):      Dokumentacja do graphviza w formacie HTML
304 Group:          Documentation
305
306 %description doc-html
307 HTML documentation for graphviz.
308
309 %description doc-html -l pl.UTF-8
310 Dokumentacja do graphviza w formacie HTML.
311
312 %package doc-pdf
313 Summary:        PDF documentation for graphviz
314 Summary(pl.UTF-8):      Dokumentacja do graphviza w formacie PDF
315 Group:          Documentation
316
317 %description doc-pdf
318 PDF documentation for graphviz.
319
320 %description doc-pdf -l pl.UTF-8
321 Dokumentacja do graphviza w formacie PDF.
322
323 %package graphs
324 Summary:        Demo graphs for graphviz
325 Summary(pl.UTF-8):      Przykładowe grafy dla graphviza
326 Group:          X11/Applications/Graphics
327 Requires:       %{name} = %{version}-%{release}
328
329 %description graphs
330 This package provides some example graphs.
331
332 %description graphs -l pl.UTF-8
333 Ten pakiet zawiera trochę przykładowych grafów.
334
335 %package -n golang-%{name}
336 Summary:        Go binding for graphviz
337 Summary(pl.UTF-8):      Wiązania języka Go dla graphviza
338 Group:          Libraries
339 Requires:       %{name} = %{version}-%{release}
340 Requires:       golang
341
342 %description -n golang-%{name}
343 Go binding for graphviz.
344
345 %description -n golang-%{name} -l pl.UTF-8
346 Wiązania języka Go dla graphviza.
347
348 %package -n io-%{name}
349 Summary:        Io binding for graphviz
350 Summary(pl.UTF-8):      Wiązania języka Io dla graphviza
351 Group:          Libraries
352 Requires:       %{name} = %{version}-%{release}
353 Requires:       io
354
355 %description -n io-%{name}
356 Io binding for graphviz.
357
358 %description -n io-%{name} -l pl.UTF-8
359 Wiązania języka Io dla graphviza.
360
361 %package -n guile-%{name}
362 Summary:        Guile binding for graphviz
363 Summary(pl.UTF-8):      Wiązania Guile dla graphviza
364 Group:          Libraries
365 Requires:       %{name} = %{version}-%{release}
366 Obsoletes:      graphviz-guile < 2.26.3-1
367
368 %description -n guile-%{name}
369 Guile binding for graphviz.
370
371 %description -n guile-%{name} -l pl.UTF-8
372 Wiązania Guile dla graphviza.
373
374 %package -n java-%{name}
375 Summary:        Java binding for graphviz
376 Summary(pl.UTF-8):      Wiązania Javy dla graphviza
377 Group:          Libraries
378 Requires:       %{name} = %{version}-%{release}
379 Obsoletes:      graphviz-java < 2.26.3-1
380
381 %description -n java-%{name}
382 Java binding for graphviz.
383
384 %description -n java-%{name} -l pl.UTF-8
385 Wiązania Javy dla graphviza.
386
387 %package -n lua-%{name}
388 Summary:        LUA binding for graphviz
389 Summary(pl.UTF-8):      Wiązania LUA dla graphviza
390 Group:          Libraries
391 Requires:       %{name} = %{version}-%{release}
392 Obsoletes:      graphviz-lua < 2.26.3-1
393
394 %description -n lua-%{name}
395 LUA binding for graphviz.
396
397 %description -n lua-%{name} -l pl.UTF-8
398 Wiązania LUA dla graphviza.
399
400 %package -n ocaml-%{name}
401 Summary:        OCaml binding for graphviz
402 Summary(pl.UTF-8):      Wiązania OCamla dla graphviza
403 Group:          Libraries
404 Requires:       %{name} = %{version}-%{release}
405 Obsoletes:      graphviz-ocaml < 2.26.3-1
406
407 %description -n ocaml-%{name}
408 OCaml binding for graphviz.
409
410 %description -n ocaml-%{name} -l pl.UTF-8
411 Wiązania OCamla dla graphviza.
412
413 %package -n perl-%{name}
414 Summary:        Perl binding for graphviz
415 Summary(pl.UTF-8):      Wiązania Perla dla graphviza
416 Group:          Libraries
417 Requires:       %{name} = %{version}-%{release}
418 Obsoletes:      ocmal-perl < 2.26.3-1
419
420 %description -n perl-%{name}
421 Perl binding for graphviz.
422
423 %description -n perl-%{name} -l pl.UTF-8
424 Wiązania Perla dla graphviza.
425
426 %package -n %{php_name}-%{name}
427 Summary:        PHP binding for graphviz
428 Summary(pl.UTF-8):      Wiązania PHP dla graphviza
429 Group:          Libraries
430 Requires:       %{name} = %{version}-%{release}
431 Obsoletes:      graphviz-php < 2.26.3-1
432 %{?requires_php_extension}
433
434 %description -n %{php_name}-%{name}
435 PHP binding for graphviz.
436
437 %description -n %{php_name}-%{name} -l pl.UTF-8
438 Wiązania PHP dla graphviza.
439
440 %package -n python-libgraphviz
441 Summary:        Python 2 binding for graphviz
442 Summary(pl.UTF-8):      Wiązania Pythona 2 dla graphviza
443 Group:          Libraries
444 Requires:       %{name} = %{version}-%{release}
445 Obsoletes:      graphviz-python < 2.26.3-1
446 Obsoletes:      python-graphviz < 2.44.1-10
447
448 %description -n python-libgraphviz
449 Python 2 binding for graphviz.
450
451 %description -n python-libgraphviz -l pl.UTF-8
452 Wiązania Pythona 2 dla graphviza.
453
454 %package -n python3-libgraphviz
455 Summary:        Python 3 binding for graphviz
456 Summary(pl.UTF-8):      Wiązania Pythona 3 dla graphviza
457 Group:          Libraries
458 Requires:       %{name} = %{version}-%{release}
459 Obsoletes:      python3-graphviz < 2.44.1-10
460
461 %description -n python3-libgraphviz
462 Python 3 binding for graphviz.
463
464 %description -n python3-libgraphviz -l pl.UTF-8
465 Wiązania Pythona 3 dla graphviza.
466
467 %package -n ruby-%{name}
468 Summary:        Ruby binding for graphviz
469 Summary(pl.UTF-8):      Wiązania Ruby'ego dla graphviza
470 Group:          Libraries
471 Requires:       %{name} = %{version}-%{release}
472 Obsoletes:      graphviz-ruby < 2.26.3-1
473
474 %description -n ruby-%{name}
475 Ruby binding for graphviz.
476
477 %description -n ruby-%{name} -l pl.UTF-8
478 Wiązania Ruby'ego dla graphviza.
479
480 %package -n dotnet-%{name}-sharp
481 Summary:        C# binding for graphviz
482 Summary(pl.UTF-8):      Wiązania C# dla graphviza
483 Group:          Libraries
484 Requires:       %{name} = %{version}-%{release}
485 Obsoletes:      graphviz-sharp < 2.26.3-1
486 Obsoletes:      sharp-graphviz < 2.26.3-6
487
488 %description -n dotnet-%{name}-sharp
489 C# binding for graphviz.
490
491 %description -n dotnet-%{name}-sharp -l pl.UTF-8
492 Wiązania C# dla graphviza.
493
494 %package -n tcl-%{name}
495 Summary:        Tcl extension tools for graphviz
496 Summary(pl.UTF-8):      Rozszerzenia Tcl dla graphviza
497 Group:          X11/Applications/Graphics
498 Requires:       %{name} = %{version}-%{release}
499 Obsoletes:      graphviz-tcl < 2.26.3-1
500
501 %description -n tcl-%{name}
502 This package contains the various Tcl packages (extensions) using
503 graphviz.
504
505 %description -n tcl-%{name} -l pl.UTF-8
506 Ten pakiet zawiera różne pakiety (rozszerzenia) Tcl używające
507 graphviza.
508
509 %package -n R-%{name}
510 Summary:        graphviz bindings for R language
511 Summary(pl.UTF-8):      Wiązania graphviza dla języka R
512 Group:          X11/Applications/Graphics
513 Requires:       %{name} = %{version}-%{release}
514
515 %description -n R-%{name}
516 graphviz bindings for R language.
517
518 %description -n R-%{name} -l pl.UTF-8
519 Wiązania graphviza dla języka R.
520
521 %prep
522 %setup -q
523 %patch0 -p1
524 %patch1 -p1
525 %patch3 -p1
526 %patch4 -p1
527 %patch7 -p1
528 %patch10 -p1
529 %patch12 -p1
530 %patch14 -p1
531 %patch15 -p1
532 %patch16 -p1
533
534 %{__sed} '1s@/usr/bin/lua$@/usr/bin/lua5.1@' -i tclpkg/gv/demo/modgraph.lua
535
536 %{__sed} -E -i -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
537       tclpkg/gv/demo/modgraph.py
538
539 %build
540 touch config/config.rpath
541 %{__libtoolize} --ltdl
542 %{__aclocal} -I m4
543 %{__autoconf}
544 %{__autoheader}
545 %{__automake}
546
547 CPPFLAGS="%{rpmcppflags}"
548 %if %{with java}
549 CPPFLAGS="$CPPFLAGS -I%{java_home}/include -I%{java_home}/include/linux"
550 %endif
551 export CPPFLAGS
552
553 %configure \
554 %ifarch %{x8664} aarch64 ppc64 sparc64 s390x
555         LIBPOSTFIX="64" \
556 %endif
557 %ifarch x32
558         LIBPOSTFIX="x32" \
559 %endif
560 %if %{with java}
561         JAVA="%{java_home}/bin/java}" \
562         JAVAC="%{java_home}/bin/javac}" \
563 %endif
564         LUA=/usr/bin/lua5.1 \
565         PHP=%{__php} \
566         %{?with_ruby:RUBY_VER=%{ruby_abi}} \
567         ac_cv_lib_criterion_main=no \
568         lua_suffix=51 \
569         %{!?with_devil:--disable-devil} \
570         %{?with_golang:--enable-go} \
571         %{?with_io:--enable-io} \
572         %{!?with_java:--disable-java} \
573         --disable-ltdl-install \
574         %{!?with_lua:--disable-lua} \
575         %{!?with_ocaml:--disable-ocaml} \
576         %{!?with_perl:--disable-perl} \
577         %{!?with_php:--disable-php} \
578         %{!?with_python:--disable-python} \
579         %{!?with_python2:--disable-python2} \
580         %{!?with_python3:--disable-python3} \
581         %{!?with_r:--disable-r} \
582         %{!?with_ruby:--disable-ruby} \
583         %{!?with_dotnet:--disable-sharp} \
584         %{!?with_tcl:--disable-tcl} \
585         --disable-silent-rules \
586         --disable-static \
587         %{?with_ipsepcola:--with-ipsepcola} \
588         %{?with_ming:--with-ming} \
589         %{!?with_qt:--without-qt} \
590         %{?with_smyrna:--with-smyrna} \
591         %{!?with_gd:--without-libgd} \
592         --with-visio \
593         --with-webp
594
595 %{__make}
596
597 %install
598 rm -rf $RPM_BUILD_ROOT
599
600 %{__make} -j1 install \
601         DESTDIR=$RPM_BUILD_ROOT
602
603 %if %{with php}
604 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
605 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{name}.ini
606 ; Enable gv.so extension module
607 extension=gv.so
608 EOF
609
610 # drop the symlinks and install to php dirs directly
611 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{php_name}-%{name}-%{version}
612 %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{name}/php,%{php_data_dir}}/gv.php
613 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/php/libgv_php.so
614 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/php/gv.so
615 %{__mv} $RPM_BUILD_ROOT{%{_datadir}/%{name}/demo,%{_examplesdir}/%{php_name}-%{name}-%{version}}/modgraph.php
616 %endif
617
618 # "man3/gv.3r.gz" and "man3/gv.3ruby.gz" are both manual for "gv" in "section 3" of man pages
619 # make manual pages unique.
620 for a in $RPM_BUILD_ROOT%{_mandir}/man3/gv.*; do
621         m=${a##*/}
622         l=${m#gv.3}
623         %{__mv} $a ${a%/*}/gv_$l.3
624 done
625
626 # created by %{_bindir}/dot -c
627 touch $RPM_BUILD_ROOT%{_libdir}/graphviz/config
628
629 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
630 %{__rm} $RPM_BUILD_ROOT%{_libdir}/graphviz/libgvplugin_*.la
631 %{__rm} $RPM_BUILD_ROOT%{_libdir}/graphviz/*/lib*.la
632 %if %{with java}
633 %{__rm} $RPM_BUILD_ROOT%{_libdir}/graphviz/java/org/graphviz/lib*.la
634 %endif
635
636 rm -rf doc-html doc-pdf
637 %{__mv} $RPM_BUILD_ROOT%{_datadir}/%{name}/doc/html doc-html
638 %{__mv} $RPM_BUILD_ROOT%{_datadir}/%{name}/doc/pdf doc-pdf
639 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
640 %{?with_smyrna:%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/examples}
641
642 cd $RPM_BUILD_ROOT
643 patch -p1 --no-backup-if-mismatch < %{PATCH2} || exit 1
644
645 %clean
646 rm -rf $RPM_BUILD_ROOT
647
648 %post
649 umask 022
650 [ ! -x %{_bindir}/dot ] || %{_bindir}/dot -c > /dev/null 2>&1
651
652 %postun -p /sbin/ldconfig
653
654 %post   libs -p /sbin/ldconfig
655 %postun libs -p /sbin/ldconfig
656
657 %post -n %{php_name}-%{name}
658 %php_webserver_restart
659
660 %postun -n %{php_name}-%{name}
661 if [ "$1" = 0 ]; then
662         %php_webserver_restart
663 fi
664
665 %files
666 %defattr(644,root,root,755)
667 %doc AUTHORS CHANGELOG.md COPYING README
668 %attr(755,root,root) %{_bindir}/acyclic
669 %attr(755,root,root) %{_bindir}/bcomps
670 %attr(755,root,root) %{_bindir}/ccomps
671 %attr(755,root,root) %{_bindir}/circo
672 %attr(755,root,root) %{_bindir}/cluster
673 %attr(755,root,root) %{_bindir}/dijkstra
674 %attr(755,root,root) %{_bindir}/dot
675 %attr(755,root,root) %{_bindir}/dot2gxl
676 %attr(755,root,root) %{_bindir}/dot_builtins
677 %attr(755,root,root) %{_bindir}/dotty
678 %attr(755,root,root) %{_bindir}/edgepaint
679 %attr(755,root,root) %{_bindir}/fdp
680 %attr(755,root,root) %{_bindir}/gc
681 %attr(755,root,root) %{_bindir}/gml2gv
682 %attr(755,root,root) %{_bindir}/graphml2gv
683 %attr(755,root,root) %{_bindir}/gv2gml
684 %attr(755,root,root) %{_bindir}/gv2gxl
685 %attr(755,root,root) %{_bindir}/gvcolor
686 %attr(755,root,root) %{_bindir}/gvgen
687 %attr(755,root,root) %{_bindir}/gvmap
688 %attr(755,root,root) %{_bindir}/gvmap.sh
689 %attr(755,root,root) %{_bindir}/gvpack
690 %attr(755,root,root) %{_bindir}/gvpr
691 %attr(755,root,root) %{_bindir}/gxl2dot
692 %attr(755,root,root) %{_bindir}/gxl2gv
693 %attr(755,root,root) %{_bindir}/lefty
694 %attr(755,root,root) %{_bindir}/lneato
695 %attr(755,root,root) %{_bindir}/mingle
696 %attr(755,root,root) %{_bindir}/mm2gv
697 %attr(755,root,root) %{_bindir}/neato
698 %attr(755,root,root) %{_bindir}/nop
699 %attr(755,root,root) %{_bindir}/osage
700 %attr(755,root,root) %{_bindir}/patchwork
701 %attr(755,root,root) %{_bindir}/prune
702 %attr(755,root,root) %{_bindir}/sccmap
703 %attr(755,root,root) %{_bindir}/sfdp
704 %attr(755,root,root) %{_bindir}/tred
705 %attr(755,root,root) %{_bindir}/twopi
706 %attr(755,root,root) %{_bindir}/unflatten
707 %attr(755,root,root) %{_bindir}/vimdot
708 %ghost %{_libdir}/graphviz/config
709 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_core.so*
710 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_dot_layout.so*
711 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_gdk.so*
712 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_gs.so*
713 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_gtk.so*
714 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_lasi.so*
715 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_neato_layout.so*
716 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_pango.so*
717 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_poppler.so*
718 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_rsvg.so*
719 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_visio.so*
720 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_webp.so*
721 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_xlib.so*
722 %dir %{_datadir}/graphviz
723 %dir %{_datadir}/graphviz/demo
724 %{_datadir}/graphviz/gvpr
725 %{_datadir}/graphviz/lefty
726 %{_mandir}/man1/acyclic.1*
727 %{_mandir}/man1/bcomps.1*
728 %{_mandir}/man1/ccomps.1*
729 %{_mandir}/man1/circo.1*
730 %{_mandir}/man1/cluster.1*
731 %{_mandir}/man1/dijkstra.1*
732 %{_mandir}/man1/dot.1*
733 %{_mandir}/man1/dot2gxl.1*
734 %{_mandir}/man1/dotty.1*
735 %{_mandir}/man1/edgepaint.1*
736 %{_mandir}/man1/fdp.1*
737 %{_mandir}/man1/gc.1*
738 %{_mandir}/man1/gml2gv.1*
739 %{_mandir}/man1/graphml2gv.1*
740 %{_mandir}/man1/gv2gml.1*
741 %{_mandir}/man1/gv2gxl.1*
742 %{_mandir}/man1/gvcolor.1*
743 %{_mandir}/man1/gvgen.1*
744 %{_mandir}/man1/gvmap.1*
745 %{_mandir}/man1/gvmap.sh.1*
746 %{_mandir}/man1/gvpack.1*
747 %{_mandir}/man1/gvpr.1*
748 %{_mandir}/man1/gxl2dot.1*
749 %{_mandir}/man1/gxl2gv.1*
750 %{_mandir}/man1/lefty.1*
751 %{_mandir}/man1/lneato.1*
752 %{_mandir}/man1/mingle.1*
753 %{_mandir}/man1/mm2gv.1*
754 %{_mandir}/man1/neato.1*
755 %{_mandir}/man1/nop.1*
756 %{_mandir}/man1/osage.1*
757 %{_mandir}/man1/patchwork.1*
758 %{_mandir}/man1/prune.1*
759 %{_mandir}/man1/sccmap.1*
760 %{_mandir}/man1/sfdp.1*
761 %{_mandir}/man1/tred.1*
762 %{_mandir}/man1/twopi.1*
763 %{_mandir}/man1/unflatten.1*
764 %{_mandir}/man1/vimdot.1*
765 %{_mandir}/man7/graphviz.7*
766
767 %files libs
768 %defattr(644,root,root,755)
769 %attr(755,root,root) %{_libdir}/libcdt.so.*.*.*
770 %attr(755,root,root) %ghost %{_libdir}/libcdt.so.5
771 %attr(755,root,root) %{_libdir}/libcgraph.so.*.*.*
772 %attr(755,root,root) %ghost %{_libdir}/libcgraph.so.6
773 %attr(755,root,root) %{_libdir}/libgvc.so.*.*.*
774 %attr(755,root,root) %ghost %{_libdir}/libgvc.so.6
775 %attr(755,root,root) %{_libdir}/libgvpr.so.*.*.*
776 %attr(755,root,root) %ghost %{_libdir}/libgvpr.so.2
777 %attr(755,root,root) %{_libdir}/liblab_gamut.so.*.*.*
778 %attr(755,root,root) %ghost %{_libdir}/liblab_gamut.so.1
779 %attr(755,root,root) %{_libdir}/libpathplan.so.*.*.*
780 %attr(755,root,root) %ghost %{_libdir}/libpathplan.so.4
781 %attr(755,root,root) %{_libdir}/libxdot.so.*.*.*
782 %attr(755,root,root) %ghost %{_libdir}/libxdot.so.4
783 %dir %{_libdir}/graphviz
784
785 %if %{with devil}
786 %files devil
787 %defattr(644,root,root,755)
788 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_devil.so*
789 %endif
790
791 %if %{with gd}
792 %files gd
793 %defattr(644,root,root,755)
794 %attr(755,root,root) %{_bindir}/diffimg
795 %{_mandir}/man1/diffimg.1*
796 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_gd.so*
797 %endif
798
799 %if %{with ming}
800 %files ming
801 %defattr(644,root,root,755)
802 %attr(755,root,root) %{_libdir}/graphviz/libgvplugin_ming.so*
803 %{_datadir}/graphviz/font
804 %endif
805
806 %files devel
807 %defattr(644,root,root,755)
808 %attr(755,root,root) %{_libdir}/libcdt.so
809 %attr(755,root,root) %{_libdir}/libcgraph.so
810 %attr(755,root,root) %{_libdir}/libgvc.so
811 %attr(755,root,root) %{_libdir}/libgvpr.so
812 %attr(755,root,root) %{_libdir}/liblab_gamut.so
813 %attr(755,root,root) %{_libdir}/libpathplan.so
814 %attr(755,root,root) %{_libdir}/libxdot.so
815 %{_pkgconfigdir}/libcdt.pc
816 %{_pkgconfigdir}/libcgraph.pc
817 %{_pkgconfigdir}/libgvc.pc
818 %{_pkgconfigdir}/libgvpr.pc
819 %{_pkgconfigdir}/liblab_gamut.pc
820 %{_pkgconfigdir}/libpathplan.pc
821 %{_pkgconfigdir}/libxdot.pc
822 %{_includedir}/graphviz
823 %{_mandir}/man3/cdt.3*
824 %{_mandir}/man3/cgraph.3*
825 %{_mandir}/man3/expr.3*
826 %{_mandir}/man3/gvc.3*
827 %{_mandir}/man3/gvpr.3*
828 %{_mandir}/man3/pack.3*
829 %{_mandir}/man3/xdot.3*
830
831 %if %{with qt}
832 %files gvedit
833 %defattr(644,root,root,755)
834 %attr(755,root,root) %{_bindir}/gvedit
835 %{_datadir}/graphviz/gvedit
836 %{_mandir}/man1/gvedit.1*
837 %endif
838
839 %if %{with smyrna}
840 %files smyrna
841 %defattr(644,root,root,755)
842 %attr(755,root,root) %{_bindir}/smyrna
843 %{_datadir}/graphviz/smyrna
844 %{_mandir}/man1/smyrna.1*
845 %endif
846
847 %files doc-html
848 %defattr(644,root,root,755)
849 %doc doc-html/*
850
851 %files doc-pdf
852 %defattr(644,root,root,755)
853 %doc doc-pdf/*
854
855 %files graphs
856 %defattr(644,root,root,755)
857 %{_datadir}/graphviz/graphs
858
859 %if %{with golang}
860 %files -n golang-%{name}
861 %defattr(644,root,root,755)
862 %dir %{_libdir}/graphviz/go
863 %attr(755,root,root) %{_libdir}/graphviz/go/libgv_go.so
864 %{_libdir}/graphviz/go/gv.go
865 %{_libdir}/graphviz/go/runtime.h
866 %{_mandir}/man3/gv_go.3*
867 %endif
868
869 %if %{with guile}
870 %files -n guile-%{name}
871 %defattr(644,root,root,755)
872 %dir %{_libdir}/graphviz/guile
873 %attr(755,root,root) %{_libdir}/graphviz/guile/libgv_guile.so
874 %{_mandir}/man3/gv_guile.3*
875 %endif
876
877 %if %{with io}
878 %files -n io-%{name}
879 %defattr(644,root,root,755)
880 %dir %{_libdir}/graphviz/io
881 %attr(755,root,root) %{_libdir}/graphviz/io/libgv_io.so*
882 %{_mandir}/mann/gv_io.n*
883 %endif
884
885 %if %{with java}
886 %files -n java-%{name}
887 %defattr(644,root,root,755)
888 %dir %{_libdir}/graphviz/java
889 %attr(755,root,root) %{_libdir}/graphviz/java/libgv.so
890 %dir %{_libdir}/graphviz/java/org
891 %dir %{_libdir}/graphviz/java/org/graphviz
892 %attr(755,root,root) %{_libdir}/graphviz/java/org/graphviz/libgv_java.so
893 %{_libdir}/graphviz/java/org/graphviz/*.class
894 %{_libdir}/graphviz/java/org/graphviz/*.java
895 %{_mandir}/man3/gv_java.3*
896 %endif
897
898 %if %{with lua}
899 %files -n lua-%{name}
900 %defattr(644,root,root,755)
901 %dir %{_libdir}/graphviz/lua
902 %attr(755,root,root) %{_libdir}/graphviz/lua/libgv_lua.so
903 %attr(755,root,root) %{_libdir}/graphviz/lua/gv.so
904 %attr(755,root,root) %{_datadir}/graphviz/demo/modgraph.lua
905 %attr(755,root,root) %{_libdir}/lua/gv.so
906 %{_mandir}/man3/gv_lua.3*
907 %endif
908
909 %if %{with ocaml}
910 %files -n ocaml-%{name}
911 %defattr(644,root,root,755)
912 %dir %{_libdir}/graphviz/ocaml
913 %attr(755,root,root) %{_libdir}/graphviz/ocaml/libgv_ocaml.so
914 %{_libdir}/graphviz/ocaml/META.gv
915 # ocamlopt temporarily disabled
916 #%{_libdir}/graphviz/ocaml/gv.a
917 %{_libdir}/graphviz/ocaml/gv.cm*
918 #%{_libdir}/graphviz/ocaml/gv.ml*
919 %{_mandir}/man3/gv_ocaml.3*
920 %endif
921
922 %if %{with perl}
923 %files -n perl-%{name}
924 %defattr(644,root,root,755)
925 %dir %{_libdir}/graphviz/perl
926 %attr(755,root,root) %{_libdir}/graphviz/perl/libgv_perl.so
927 %attr(755,root,root) %{_libdir}/graphviz/perl/gv.so
928 %{_libdir}/graphviz/perl/gv.pm
929 %attr(755,root,root) %{_datadir}/graphviz/demo/modgraph.pl
930 %attr(755,root,root) %{perl_vendorarch}/gv.so
931 %{perl_vendorarch}/gv.pm
932 %{_mandir}/man3/gv_perl.3*
933 %endif
934
935 %if %{with php}
936 %files -n %{php_name}-%{name}
937 %defattr(644,root,root,755)
938 %attr(755,root,root) %{php_extensiondir}/gv.so
939 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{name}.ini
940 %{php_data_dir}/gv.php
941 %{_mandir}/man3/gv_php.3*
942 %{_examplesdir}/%{php_name}-%{name}-%{version}
943 %endif
944
945 %if %{with python}
946 %files -n python-libgraphviz
947 %defattr(644,root,root,755)
948 %dir %{_libdir}/graphviz/python
949 %attr(755,root,root) %{_libdir}/graphviz/python/libgv_python.so
950 %attr(755,root,root) %{_libdir}/graphviz/python/_gv.so
951 %{_libdir}/graphviz/python/gv.py
952 %if %{with python2}
953 %dir %{_libdir}/graphviz/python2
954 %attr(755,root,root) %{_libdir}/graphviz/python2/libgv_python2.so
955 %attr(755,root,root) %{_libdir}/graphviz/python2/_gv.so
956 %{_libdir}/graphviz/python2/gv.py
957 %endif
958 %attr(755,root,root) %{_datadir}/graphviz/demo/modgraph.py
959 %attr(755,root,root) %{py_sitedir}/_gv.so
960 %{py_sitedir}/gv.py
961 %{_mandir}/man3/gv_python.3*
962 %endif
963
964 %if %{with python3}
965 %files -n python3-libgraphviz
966 %defattr(644,root,root,755)
967 %dir %{_libdir}/graphviz/python3
968 %attr(755,root,root) %{_libdir}/graphviz/python3/libgv_python3.so
969 %attr(755,root,root) %{_libdir}/graphviz/python3/_gv.so
970 %{_libdir}/graphviz/python3/gv.py
971 %attr(755,root,root) %{py3_sitedir}/_gv.so
972 %{py3_sitedir}/gv.py
973 %endif
974
975 %if %{with ruby}
976 %files -n ruby-%{name}
977 %defattr(644,root,root,755)
978 %dir %{_libdir}/graphviz/ruby
979 %attr(755,root,root) %{_libdir}/graphviz/ruby/libgv_ruby.so
980 %attr(755,root,root) %{_libdir}/graphviz/ruby/gv.so
981 %attr(755,root,root) %{_datadir}/graphviz/demo/modgraph.rb
982 %{ruby_vendorarchdir}/gv.so
983 %{_mandir}/man3/gv_ruby.3*
984 %endif
985
986 %if %{with dotnet}
987 %files -n dotnet-%{name}-sharp
988 %defattr(644,root,root,755)
989 %dir %{_libdir}/graphviz/sharp
990 %attr(755,root,root) %{_libdir}/graphviz/sharp/libgv_sharp.so
991 %{_libdir}/graphviz/sharp/*.cs
992 %{_mandir}/man3/gv_sharp.3*
993 %endif
994
995 %if %{with tcl}
996 %files -n tcl-%{name}
997 %defattr(644,root,root,755)
998 %dir %{_libdir}/graphviz/tcl
999 %attr(755,root,root) %{_libdir}/graphviz/tcl/libgv_tcl.so
1000 %attr(755,root,root) %{_libdir}/graphviz/tcl/libtcldot.so*
1001 %attr(755,root,root) %{_libdir}/graphviz/tcl/libtcldot_builtin.so*
1002 %attr(755,root,root) %{_libdir}/graphviz/tcl/libtclplan.so*
1003 %{_libdir}/graphviz/tcl/pkgIndex.tcl
1004 %{_libdir}/tcl%{tclver}/graphviz
1005 %{_mandir}/man3/gv_tcl.3*
1006 %{_mandir}/man3/pathplan.3*
1007 %{_mandir}/man3/tcldot.3tcl*
1008 %{_datadir}/graphviz/demo/pathplan_data
1009 %{_datadir}/graphviz/demo/*.README
1010 %{_datadir}/graphviz/demo/*.html
1011 %attr(755,root,root) %{_datadir}/graphviz/demo/doted.tcl
1012 %attr(755,root,root) %{_datadir}/graphviz/demo/entities.tcl
1013 %attr(755,root,root) %{_datadir}/graphviz/demo/gcat.tcl
1014 %attr(755,root,root) %{_datadir}/graphviz/demo/modgraph.tcl
1015 %attr(755,root,root) %{_datadir}/graphviz/demo/pathplan.tcl
1016 %if %{with gd}
1017 %attr(755,root,root) %{_libdir}/graphviz/tcl/libgdtclft.so*
1018 %{_mandir}/man3/gdtclft.3tcl*
1019 %endif
1020 %endif
1021
1022 %if %{with r}
1023 %files -n R-%{name}
1024 %defattr(644,root,root,755)
1025 %dir %{_libdir}/%{name}/R
1026 %attr(755,root,root) %{_libdir}/%{name}/R/gv.so
1027 %attr(755,root,root) %{_libdir}/%{name}/R/libgv_R.so
1028 %{_mandir}/man3/gv_r.3*
1029 %endif
This page took 0.113439 seconds and 3 git commands to generate.