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