graphviz.spec 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. # redhat/graphviz.spec.fedora. Generated from graphviz.spec.fedora.in by configure.
  2. #-- Global graphviz rpm and src.rpm tags-------------------------------------
  3. Name: graphviz
  4. Summary: Graph Visualization Tools
  5. Version: 12.2.1
  6. Release: 1%{?dist}
  7. Group: Applications/Multimedia
  8. License: EPL
  9. URL: https://graphviz.org/
  10. Source0: https://gitlab.com/graphviz/graphviz/-/archive/12.2.1/graphviz-12.2.1.tar.gz
  11. # Necessary conditionals
  12. %ifarch %{mono_arches}
  13. %global SHARP 1
  14. %else
  15. %global SHARP 0
  16. %endif
  17. # Assuming Fedora
  18. %global LICENSE 1
  19. %global ANN 1
  20. %global ARRRR 1
  21. %global DEEEE 0
  22. %global DEVIL 1
  23. %global GOLANG 1
  24. %global GTS 1
  25. %global GTK 1
  26. %global JAVASCRIPT 0
  27. %global LASI 1
  28. %global PHP 1
  29. %global WEBP 1
  30. # Overrides for RHEL
  31. %if 0%{?rhel}
  32. %global LICENSE 0
  33. %global ARRRR 0
  34. %global DEEEE 0
  35. %global DEVIL 0
  36. %global GOLANG 0
  37. %global GTS 0
  38. %global GTK 0
  39. %global JAVASCRIPT 0
  40. %global LASI 0
  41. %global SHARP 0
  42. %global WEBP 0
  43. %endif
  44. # Overrides for Rocky
  45. %if 0%{?rhel}
  46. %global ANN 0
  47. %endif
  48. # Plugins version
  49. %global pluginsver 6
  50. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  51. BuildRequires: java-devel
  52. BuildRequires: zlib-devel expat-devel bison m4 flex swig gcc-c++
  53. BuildRequires: libX11-devel gtk2-devel freeglut-devel
  54. BuildRequires: freetype-devel fontconfig-devel cairo-devel pango-devel
  55. BuildRequires: gmp-devel gd gd-devel librsvg2-devel
  56. BuildRequires: ghostscript ghostscript-devel poppler-glib-devel libtool-ltdl libtool-ltdl-devel
  57. BuildRequires: qt5-qtbase-devel
  58. BuildRequires: ruby ruby-devel lua-devel
  59. BuildRequires: perl-devel perl-libs perl-ExtUtils-Embed tcl tcl-devel tk tk-devel
  60. BuildRequires: python3 python3-devel
  61. %if %{ANN}
  62. BuildRequires: ann-devel
  63. %endif
  64. %if %{ARRRR}
  65. BuildRequires: R-devel
  66. %endif
  67. %if %{DEEEE}
  68. BuildRequires: ldc-druntime-devel
  69. %endif
  70. %if %{DEVIL}
  71. BuildRequires: DevIL-devel
  72. %endif
  73. %if %{GOLANG}
  74. BuildRequires: golang gcc-go swig >= 3.0.2
  75. %endif
  76. %if %{GTK}
  77. BuildRequires: libglade2-devel gtkglext-devel
  78. %endif
  79. %if %{GTS}
  80. BuildRequires: gts-devel
  81. %endif
  82. %if 0%{?fedora} > 0 || 0%{?rhel} >= 9
  83. BuildRequires: guile30-devel
  84. %else
  85. BuildRequires: guile-devel
  86. %endif
  87. %if %{LASI}
  88. BuildRequires: lasi-devel
  89. %endif
  90. %if %{PHP}
  91. BuildRequires: php-devel
  92. %endif
  93. %if %{SHARP}
  94. BuildRequires: mono-core
  95. %endif
  96. %if %{WEBP}
  97. BuildRequires: libwebp-devel
  98. %endif
  99. %if %{PHP}
  100. # What a meal PHP makes of versioning !!!
  101. %define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
  102. %global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
  103. %global ini_name 40-%{name}.ini
  104. # Fix private-shared-object-provides
  105. # RPM 4.8
  106. %{?filter_provides_in: %filter_provides_in %{php_extdir}/.*\.so$}
  107. %{?filter_setup}
  108. # RPM 4.9
  109. %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
  110. %endif
  111. # Fix for the i386 extended precision (rhbz#772637)
  112. %ifarch i386 i686
  113. %global FFSTORE -ffloat-store
  114. %endif
  115. #-- main graphviz rpm ------------------------------------------------
  116. Requires: %{name}-nox = %{version}-%{release}
  117. Requires: %{name}-x = %{version}-%{release}
  118. %description
  119. A collection of tools for the manipulation and layout
  120. of graphs (as in nodes and edges, not as in bar-charts).
  121. %files
  122. %defattr(-,root,root,-)
  123. %if %{LICENSE}
  124. %license COPYING
  125. %endif
  126. %doc COPYING AUTHORS CHANGELOG.md NEWS README
  127. #-- graphviz-nox rpm --------------------------------------------------
  128. %package nox
  129. Group: Applications/Multimedia
  130. Summary: Graphviz commands with no X11 dependencies
  131. Requires: urw-fonts
  132. Requires: %{name}-libs = %{version}-%{release}
  133. Requires: %{name}-plugins-core = %{version}-%{release}
  134. Provides: %{name}-nox = %{version}-%{release}
  135. %description nox
  136. Graphviz plugins and commands that do not depend on x11.
  137. When used alone, this is intended for minimalist web-server apps
  138. with no X11 on the server.
  139. # completely remove any old configs before any fresh install of dot.
  140. # don't remove any externally provided plugins. "doc -c" should refind them
  141. %pre nox
  142. rm -rf %{_libdir}/graphviz/config* || :
  143. # run "dot -c" to generate plugin config in {_libdir}/graphviz/config%{pluginsver}
  144. %post nox
  145. LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c
  146. %files nox
  147. %defattr(-,root,root,-)
  148. %if %{LICENSE}
  149. %license COPYING
  150. %endif
  151. %doc COPYING AUTHORS CHANGELOG.md NEWS README
  152. %{_bindir}/dot_builtins
  153. %{_bindir}/dot_sandbox
  154. %{_bindir}/acyclic
  155. %{_bindir}/bcomps
  156. %{_bindir}/ccomps
  157. %{_bindir}/circo
  158. %{_bindir}/cluster
  159. %{_bindir}/dijkstra
  160. %{_bindir}/dot
  161. %{_bindir}/dot2gxl
  162. %{_bindir}/fdp
  163. %{_bindir}/gc
  164. %{_bindir}/gml2gv
  165. %{_bindir}/graphml2gv
  166. %{_bindir}/gv2gml
  167. %{_bindir}/gv2gxl
  168. %{_bindir}/gvcolor
  169. %{_bindir}/gvgen
  170. %{_bindir}/gvmap
  171. %{_bindir}/gvmap.sh
  172. %{_bindir}/gvpack
  173. %{_bindir}/gvpr
  174. %{_bindir}/gxl2dot
  175. %{_bindir}/gxl2gv
  176. %if %{ANN}
  177. %{_bindir}/mingle
  178. %endif
  179. %{_bindir}/edgepaint
  180. %{_bindir}/mm2gv
  181. %{_bindir}/neato
  182. %{_bindir}/nop
  183. %{_bindir}/osage
  184. %{_bindir}/patchwork
  185. %{_bindir}/prune
  186. %{_bindir}/sccmap
  187. %{_bindir}/sfdp
  188. %{_bindir}/tred
  189. %{_bindir}/twopi
  190. %{_bindir}/unflatten
  191. %{_mandir}/man1/acyclic.1*
  192. %{_mandir}/man1/bcomps.1*
  193. %{_mandir}/man1/ccomps.1*
  194. %{_mandir}/man1/circo.1*
  195. %{_mandir}/man1/cluster.1*
  196. %{_mandir}/man1/dijkstra.1*
  197. %{_mandir}/man1/dot.1*
  198. %{_mandir}/man1/dot_sandbox.1*
  199. %{_mandir}/man1/dot2gxl.1*
  200. %{_mandir}/man1/fdp.1*
  201. %{_mandir}/man1/gc.1*
  202. %{_mandir}/man1/gml2gv.1*
  203. %{_mandir}/man1/graphml2gv.1*
  204. %{_mandir}/man1/gv2gml.1*
  205. %{_mandir}/man1/gv2gxl.1*
  206. %{_mandir}/man1/gvcolor.1*
  207. %{_mandir}/man1/gvgen.1*
  208. %{_mandir}/man1/gvmap.1*
  209. %{_mandir}/man1/gvmap.sh.1*
  210. %{_mandir}/man1/gvpack.1*
  211. %{_mandir}/man1/gvpr.1*
  212. %{_mandir}/man1/gxl2dot.1*
  213. %{_mandir}/man1/gxl2gv.1*
  214. %if %{ANN}
  215. %{_mandir}/man1/mingle.1*
  216. %endif
  217. %{_mandir}/man1/edgepaint.1*
  218. %{_mandir}/man1/mm2gv.1*
  219. %{_mandir}/man1/neato.1*
  220. %{_mandir}/man1/nop.1*
  221. %{_mandir}/man1/osage.1*
  222. %{_mandir}/man1/patchwork.1*
  223. %{_mandir}/man1/prune.1*
  224. %{_mandir}/man1/sccmap.1*
  225. %{_mandir}/man1/sfdp.1*
  226. %{_mandir}/man1/tred.1*
  227. %{_mandir}/man1/twopi.1*
  228. %{_mandir}/man1/unflatten.1*
  229. %{_mandir}/man7/graphviz.7*
  230. %dir %{_datadir}/graphviz
  231. %{_datadir}/graphviz/gvpr/*
  232. #-- graphviz-libs rpm --------------------------------------------------
  233. %package libs
  234. Group: Applications/Multimedia
  235. Summary: Graphviz base libs
  236. Requires(post): /sbin/ldconfig
  237. Requires(postun): /sbin/ldconfig
  238. %description libs
  239. Graphviz core libs
  240. %post libs
  241. /sbin/ldconfig
  242. %postun libs
  243. /sbin/ldconfig
  244. %files libs
  245. %defattr(-,root,root,-)
  246. %{_libdir}/libcdt.so.*
  247. %{_libdir}/libcgraph.so.*
  248. %{_libdir}/libgvc.so.*
  249. %{_libdir}/libgvpr.so.*
  250. %{_libdir}/libpathplan.so.*
  251. %{_libdir}/libxdot.so.4*
  252. %exclude %{_libdir}/graphviz/*
  253. #-- graphviz-plugins-core rpm --------------------------------------------------
  254. %package plugins-core
  255. Group: Applications/Multimedia
  256. Summary: Graphviz plugins - core layout engines and text renderers
  257. Requires: %{name}-nox = %{version}-%{release}
  258. %description plugins-core
  259. Graphviz plugins - core layout engines and text renderers
  260. # run "dot -c" to generate plugin config in {_libdir}/graphviz/config%{pluginsver}
  261. # this one is conditional because of rpm dependency ordering
  262. # on a fresh install this package is installed before dot is avaiable from graphviz-nox
  263. # no matter since dot -c is also run from the graphviz-nox install
  264. %post plugins-core
  265. [ -x %{_bindir}/dot ] && LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c || :
  266. # if there is no dot after everything else is done, then remove config
  267. %postun plugins-core
  268. if [ $1 -eq 0 ]; then
  269. rm -f %{_libdir}/graphviz/config6 || :
  270. fi
  271. %files plugins-core
  272. %defattr(-,root,root,-)
  273. %dir %{_libdir}/graphviz
  274. %{_libdir}/graphviz/libgvplugin_core.so.*
  275. %{_libdir}/graphviz/libgvplugin_dot_layout.so.*
  276. %{_libdir}/graphviz/libgvplugin_neato_layout.so.*
  277. #-- graphviz-x rpm --------------------------------------------------
  278. %package x
  279. Group: Applications/Multimedia
  280. Summary: Graphviz commands with X11 dependencies
  281. Requires: %{name}-nox = %{version}-%{release}
  282. Requires: %{name}-plugins-x = %{version}-%{release}
  283. %description x
  284. Graphviz commands with X11 dependencies
  285. %files x
  286. %defattr(-,root,root,-)
  287. %if %{LICENSE}
  288. %license COPYING
  289. %endif
  290. %doc COPYING AUTHORS CHANGELOG.md NEWS README
  291. %{_bindir}/vimdot
  292. %{_mandir}/man1/vimdot.1*
  293. %if %{GTK}
  294. %{_bindir}/smyrna
  295. %{_datadir}/graphviz/smyrna
  296. %{_mandir}/man1/smyrna.1*
  297. %endif
  298. #-- graphviz-plugins-x rpm --------------------------------------------------
  299. %package plugins-x
  300. Group: Applications/Multimedia
  301. Summary: Graphviz plugins with X11 dependencies
  302. Requires: %{name} = %{version}-%{release}
  303. %description plugins-x
  304. Graphviz plugins that depend on x11 - most installations will want this.
  305. # run "dot -c" to generate plugin config in {_libdir}/graphviz/config6
  306. %post plugins-x
  307. LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c
  308. %postun plugins-x
  309. [ -x %{_bindir}/dot ] && LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c || :
  310. %files plugins-x
  311. %defattr(-,root,root,-)
  312. %dir %{_libdir}/graphviz
  313. %{_libdir}/graphviz/libgvplugin_xlib.so.*
  314. %{_libdir}/graphviz/libgvplugin_pango.so.*
  315. %{_libdir}/graphviz/libgvplugin_rsvg.so.*
  316. %{_libdir}/graphviz/libgvplugin_gdk.so.*
  317. %{_libdir}/graphviz/libgvplugin_gs.so.*
  318. %{_libdir}/graphviz/libgvplugin_poppler.so.*
  319. %if %{LASI}
  320. %{_libdir}/graphviz/libgvplugin_lasi.so.*
  321. %endif
  322. #-- graphviz-gd rpm --------------------------------------------------
  323. %package gd
  324. Group: Applications/Multimedia
  325. Summary: Graphviz binaries that depend on libgd
  326. Requires: %{name} = %{version}-%{release}
  327. # this next Requires is not strictly neccessary for diffimg,
  328. # but users will probably expect the plugins to get pulled in
  329. Requires: %{name}-plugins-gd = %{version}-%{release}
  330. %description gd
  331. Graphviz binaries that depend on gd. (Unless you absolutely have
  332. to use GIF, you are recommended to use the PNG format instead because
  333. of the better quality anti-aliased lines provided by the cairo+pango
  334. based renderer.)
  335. %files gd
  336. %defattr(-,root,root,-)
  337. %{_bindir}/diffimg
  338. %{_mandir}/man1/diffimg.1*
  339. #-- graphviz-plugins-gd rpm --------------------------------------------------
  340. %package plugins-gd
  341. Group: Applications/Multimedia
  342. Summary: Graphviz plugin for gd renderers
  343. Requires: %{name} = %{version}-%{release}
  344. %description plugins-gd
  345. Graphviz plugin for image rendering using libgd. (Unless you absolutely have
  346. to use GIF, you are recommended to use the PNG format instead because
  347. of the better quality anti-aliased lines provided by the cairo+pango
  348. based renderer.)
  349. # run "dot -c" to generate plugin config in {_libdir}/graphviz/config6
  350. %post plugins-gd
  351. LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c
  352. %postun plugins-gd
  353. [ -x %{_bindir}/dot ] && LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c || :
  354. %files plugins-gd
  355. %defattr(-,root,root,-)
  356. %dir %{_libdir}/graphviz
  357. %{_libdir}/graphviz/libgvplugin_gd.so.*
  358. #-- graphviz-plugins-vt rpm --------------------------------------------------
  359. %package plugins-vt
  360. Group: Applications/Multimedia
  361. Summary: Graphviz plugin for vt format
  362. Requires: %{name}-x = %{version}-%{release}
  363. Obsoletes: %{name}-vt <= 2.41
  364. Provides: %{name}-vt = %{version}-%{release}
  365. %description plugins-vt
  366. Graphviz plugin for vt terminal rendering.
  367. # run "dot -c" to generate plugin config in {_libdir}/graphviz/config6
  368. %post plugins-vt
  369. LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c
  370. %postun plugins-vt
  371. [ -x %{_bindir}/dot ] && LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c || :
  372. %files plugins-vt
  373. %defattr(-,root,root,-)
  374. %dir %{_libdir}/graphviz
  375. %{_libdir}/graphviz/libgvplugin_vt.so.*
  376. #-- graphviz-plugins-webp rpm --------------------------------------------------
  377. %if %{WEBP}
  378. %package plugins-webp
  379. Group: Applications/Multimedia
  380. Summary: Graphviz plugin for webp format images, using libwebp
  381. Requires: %{name}-x = %{version}-%{release}
  382. Obsoletes: %{name}-webp <= 2.41
  383. Provides: %{name}-webp = %{version}-%{release}
  384. %description plugins-webp
  385. Graphviz plugin for webp image rendering.
  386. # run "dot -c" to generate plugin config in {_libdir}/graphviz/config6
  387. %post plugins-webp
  388. LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c
  389. %postun plugins-webp
  390. [ -x %{_bindir}/dot ] && LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c || :
  391. %files plugins-webp
  392. %defattr(-,root,root,-)
  393. %dir %{_libdir}/graphviz
  394. %{_libdir}/graphviz/libgvplugin_webp.so.*
  395. %endif
  396. #-- graphviz-plugins-devil rpm --------------------------------------------------
  397. %if %{DEVIL}
  398. %package plugins-devil
  399. Group: Applications/Multimedia
  400. Summary: Graphviz plugin for renderers based on DevIL
  401. Requires: %{name}-x = %{version}-%{release}
  402. Obsoletes: %{name}-devil <= 2.41
  403. Provides: %{name}-devil = %{version}-%{release}
  404. %description plugins-devil
  405. Graphviz plugin for renderers based on DevIL. (Unless you absolutely have
  406. to use BMP, TIF, or TGA, you are recommended to use the PNG format instead
  407. supported directly by the cairo+pango based renderer in the base graphviz rpm.)
  408. # run "dot -c" to generate plugin config in {_libdir}/graphviz/config6
  409. %post plugins-devil
  410. LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c
  411. %postun plugins-devil
  412. [ -x %{_bindir}/dot ] && LD_LIBRARY_PATH=%{_libdir} %{_bindir}/dot -c || :
  413. %files plugins-devil
  414. %defattr(-,root,root,-)
  415. %dir %{_libdir}/graphviz
  416. %{_libdir}/graphviz/libgvplugin_devil.so.*
  417. %endif
  418. #-- graphviz-qt rpm --------------------------------------------------
  419. %package qt
  420. Group: Applications/Multimedia
  421. Summary: Graphviz applications using _QT
  422. Requires: %{name}-x = %{version}-%{release}
  423. %description qt
  424. Graphviz applications using _QT - currently just gvedit
  425. %files qt
  426. %defattr(-,root,root,-)
  427. %{_bindir}/gvedit
  428. %{_datadir}/graphviz/gvedit
  429. %{_mandir}/man1/gvedit.1*
  430. #-- graphviz-lang-sharp rpm --------------------------------------------
  431. %if %{SHARP}
  432. %package lang-sharp
  433. Group: Applications/Multimedia
  434. Summary: C# extension for graphviz
  435. Requires: %{name} = %{version}-%{release}, mono-core
  436. Obsoletes: %{name}-sharp <= 2.41
  437. Provides: %{name}-sharp = %{version}-%{release}
  438. %description lang-sharp
  439. C# extension for graphviz.
  440. %files lang-sharp
  441. %defattr(-,root,root,-)
  442. %dir %{_libdir}/graphviz/sharp
  443. %{_libdir}/graphviz/sharp/*
  444. %{_mandir}/man3/*.3sharp.*
  445. %endif
  446. #-- graphviz-lang-d rpm ---------------------------------------------
  447. %if 0%{?DEEEE}
  448. %package lang-d
  449. Group: Applications/Multimedia
  450. Summary: D extension for graphviz
  451. Requires: %{name} = %{version}-%{release}, D
  452. Obsoletes: %{name}-d <= 2.41
  453. Provides: %{name}-d = %{version}-%{release}
  454. %description lang-d
  455. D extension for graphviz.
  456. %files lang-d
  457. %defattr(-,root,root,-)
  458. %dir %{_libdir}/graphviz/d
  459. %{_libdir}/graphviz/d/*
  460. %{_mandir}/man3/*.3d.*
  461. %endif
  462. #-- graphviz-lang-go rpm --------------------------------------------
  463. %if %{GOLANG}
  464. %package lang-go
  465. Group: Applications/Multimedia
  466. Summary: GO extension for graphviz
  467. Requires: %{name} = %{version}-%{release}, golang
  468. Obsoletes: %{name}-go <= 2.41
  469. Provides: %{name}-go = %{version}-%{release}
  470. %description lang-go
  471. Guile extension for graphviz.
  472. %files lang-go
  473. %defattr(-,root,root,-)
  474. %dir %{_libdir}/graphviz/go
  475. %{_libdir}/graphviz/go/*
  476. %{_mandir}/man3/*.3go.*
  477. %endif
  478. #-- graphviz-lang-guile rpm --------------------------------------------
  479. %package lang-guile
  480. Group: Applications/Multimedia
  481. Summary: Guile extension for graphviz
  482. %if 0%{?fedora} > 0 || 0%{?rhel} >= 9
  483. Requires: %{name} = %{version}-%{release}, guile30
  484. %else
  485. Requires: %{name} = %{version}-%{release}, guile
  486. %endif
  487. Obsoletes: %{name}-guile <= 2.41
  488. Provides: %{name}-guile = %{version}-%{release}
  489. %description lang-guile
  490. Guile extension for graphviz.
  491. %files lang-guile
  492. %defattr(-,root,root,-)
  493. %dir %{_libdir}/graphviz/guile
  494. %{_libdir}/graphviz/guile/*
  495. %{_mandir}/man3/*.3guile.*
  496. #-- graphviz-lang-java rpm ---------------------------------------------
  497. %package lang-java
  498. Group: Applications/Multimedia
  499. Summary: Java extension for graphviz
  500. Requires: %{name} = %{version}-%{release}, java
  501. Obsoletes: %{name}-java <= 2.41
  502. Provides: %{name}-java = %{version}-%{release}
  503. %description lang-java
  504. Java extension for graphviz.
  505. %files lang-java
  506. %defattr(-,root,root,-)
  507. %dir %{_libdir}/graphviz/java
  508. %{_libdir}/graphviz/java/*
  509. %{_mandir}/man3/*.3java.*
  510. #-- graphviz-lang-javascript rpm ---------------------------------------------
  511. %if 0%{?JAVASCRIPT}
  512. %package lang-javascript
  513. Group: Applications/Multimedia
  514. Summary: Javascript extension for graphviz
  515. Requires: %{name} = %{version}-%{release}, javascript
  516. Obsoletes: %{name}-javascript <= 2.41
  517. Provides: %{name}-javascript = %{version}-%{release}
  518. %description lang-javascript
  519. Javascript extension for graphviz.
  520. %files lang-javascript
  521. %defattr(-,root,root,-)
  522. %dir %{_libdir}/graphviz/javascript
  523. %{_libdir}/graphviz/javascript/*
  524. %{_mandir}/man3/*.3javascript.*
  525. %endif
  526. #-- graphviz-lang-lua rpm ----------------------------------------------
  527. %package lang-lua
  528. Group: Applications/Multimedia
  529. Summary: Lua extension for graphviz
  530. Requires: %{name} = %{version}-%{release}, lua
  531. Obsoletes: %{name}-lua <= 2.41
  532. Provides: %{name}-lua = %{version}-%{release}
  533. %description lang-lua
  534. Lua extension for graphviz.
  535. %files lang-lua
  536. %defattr(-,root,root,-)
  537. %{_libdir}/lua*/*
  538. %{_datadir}/graphviz/demo/*.lua*
  539. %{_mandir}/man3/*.3lua.*
  540. %exclude %{_libdir}/graphviz/lua/*.so
  541. #-- graphviz-lang-perl rpm ---------------------------------------------
  542. %package lang-perl
  543. Group: Applications/Multimedia
  544. Summary: Perl extension for graphviz
  545. Requires: %{name} = %{version}-%{release}, perl
  546. Obsoletes: %{name}-perl <= 2.41
  547. Provides: %{name}-perl = %{version}-%{release}
  548. %description lang-perl
  549. Perl extension for graphviz.
  550. %files lang-perl
  551. %defattr(-,root,root,-)
  552. %{_libdir}/perl*/*
  553. %{_datadir}/graphviz/demo/*.pl*
  554. %{_mandir}/man3/*.3perl.*
  555. %exclude %{_libdir}/graphviz/perl/*.so
  556. %exclude %{_libdir}/graphviz/perl/*.pm
  557. %if %{PHP}
  558. #-- graphviz-lang-php rpm ----------------------------------------------
  559. %package lang-php
  560. Group: Applications/Multimedia
  561. Summary: PHP extension for graphviz
  562. Requires: %{name} = %{version}-%{release}, /usr/bin/php
  563. Obsoletes: %{name}-php <= 2.41
  564. Provides: %{name}-php = %{version}-%{release}
  565. %description lang-php
  566. PHP extension for graphviz.
  567. %files lang-php
  568. %defattr(-,root,root,-)
  569. %config(noreplace) %{_sysconfdir}/php.d/%{name}.ini
  570. %{php_extdir}/gv.so
  571. %if 0%{?rhel}
  572. %{_datadir}/php*/*
  573. %endif
  574. %{_datadir}/graphviz/demo/*.php*
  575. %{_mandir}/man3/*.3php.*
  576. %exclude %{_libdir}/graphviz/php/*.so
  577. %if 0%{?rhel}
  578. %exclude %{_libdir}/graphviz/php/*.php
  579. %endif
  580. %endif
  581. #-- graphviz-lang-python3 rpm -------------------------------------------
  582. %package lang-python3
  583. Group: Applications/Multimedia
  584. Summary: Python extension for graphviz
  585. Requires: %{name} = %{version}-%{release}, python3
  586. Conflicts: %{name}-python <= 2.41
  587. Conflicts: %{name}-lang-python <= 2.41
  588. %description lang-python3
  589. Python extension for graphviz.
  590. %files lang-python3
  591. %defattr(-,root,root,-)
  592. %{_libdir}/python3*/*
  593. %{_datadir}/graphviz/demo/*.py*
  594. %{_mandir}/man3/gv.3python.*
  595. %exclude %{_libdir}/graphviz/python3/*.so
  596. %exclude %{_libdir}/graphviz/python3/*.py*
  597. #-- graphviz-lang-R rpm ---------------------------------------------
  598. %if %{ARRRR}
  599. %package lang-R
  600. Group: Applications/Multimedia
  601. Summary: R extension for graphviz
  602. Requires: %{name} = %{version}-%{release}, R
  603. Obsoletes: %{name}-R <= 2.41
  604. Provides: %{name}-R = %{version}-%{release}
  605. %description lang-R
  606. R extension for graphviz.
  607. %files lang-R
  608. %defattr(-,root,root,-)
  609. %dir %{_libdir}/graphviz/R
  610. %{_libdir}/graphviz/R/*
  611. %{_mandir}/man3/*.3r.*
  612. %endif
  613. #-- graphviz-lang-ruby rpm ---------------------------------------------
  614. %package lang-ruby
  615. Group: Applications/Multimedia
  616. Summary: Ruby extension for graphviz
  617. Requires: %{name} = %{version}-%{release}, ruby
  618. Obsoletes: %{name}-ruby <= 2.41
  619. Provides: %{name}-ruby = %{version}-%{release}
  620. %description lang-ruby
  621. Ruby extension for graphviz.
  622. %files lang-ruby
  623. %defattr(-,root,root,-)
  624. %{_libdir}/*ruby*/*
  625. %{_datadir}/graphviz/demo/*.rb*
  626. %{_mandir}/man3/*.3ruby.*
  627. %exclude %{_libdir}/graphviz/ruby/*.so
  628. #-- graphviz-lang-tcl rpm ----------------------------------------------
  629. %package lang-tcl
  630. Group: Applications/Multimedia
  631. Summary: Tcl extension & tools for graphviz
  632. Requires: %{name} = %{version}-%{release}, tcl >= 8.3
  633. Obsoletes: %{name}-tcl <= 2.41
  634. Provides: %{name}-tcl = %{version}-%{release}
  635. %description lang-tcl
  636. Various tcl packages (extensions) for the graphviz tools.
  637. %files lang-tcl
  638. %defattr(-,root,root,-)
  639. %{_libdir}/tcl*/*
  640. %{_datadir}/graphviz/demo/*.tcl*
  641. %{_datadir}/graphviz/demo/*_data
  642. %{_datadir}/graphviz/demo/entities.html
  643. %{_mandir}/man3/*.3tcl.*
  644. %exclude %{_libdir}/graphviz/tcl/*
  645. #-- graphviz-devel rpm --------------------------------------------
  646. %package devel
  647. Group: Development/Libraries
  648. Summary: Development package for graphviz
  649. Requires: %{name}-libs = %{version}-%{release}, pkgconfig
  650. Requires(post): /sbin/ldconfig
  651. Requires(postun): /sbin/ldconfig
  652. %description devel
  653. A collection of tools for the manipulation and layout
  654. of graphs (as in nodes and edges, not as in bar-charts).
  655. This package contains development files for graphviz-libs.
  656. %post devel
  657. /sbin/ldconfig
  658. %postun devel
  659. /sbin/ldconfig
  660. %files devel
  661. %defattr(-,root,root,-)
  662. %{_includedir}/graphviz
  663. %{_libdir}/libcdt.so
  664. %{_mandir}/man3/cdt.3.*
  665. %{_libdir}/pkgconfig/libcdt.pc
  666. %{_libdir}/libcgraph.so
  667. %{_mandir}/man3/cgraph.3.*
  668. %{_libdir}/pkgconfig/libcgraph.pc
  669. %{_libdir}/libgvc.so
  670. %{_mandir}/man3/gvc.3.*
  671. %{_libdir}/pkgconfig/libgvc.pc
  672. %{_libdir}/libgvpr.so
  673. %{_mandir}/man3/gvpr.3.*
  674. %{_libdir}/pkgconfig/libgvpr.pc
  675. %{_libdir}/libpathplan.so
  676. %{_mandir}/man3/pathplan.3.*
  677. %{_libdir}/pkgconfig/libpathplan.pc
  678. %{_libdir}/libxdot.so
  679. %{_mandir}/man3/xdot.3.*
  680. %{_libdir}/pkgconfig/libxdot.pc
  681. %{_mandir}/man3/expr.3.*
  682. %{_mandir}/man3/pack.3.*
  683. %exclude %{_libdir}/graphviz/libgvplugin*
  684. %exclude %{_libdir}/graphviz/*.so
  685. #-- graphviz-graphs rpm -------------------------------------------
  686. %package graphs
  687. Group: Applications/Multimedia
  688. Summary: Demo graphs for graphviz
  689. BuildArch: noarch
  690. %description graphs
  691. Some demo graphs for graphviz.
  692. %files graphs
  693. %defattr(-,root,root,-)
  694. %dir %{_datadir}/graphviz
  695. %{_datadir}/graphviz/graphs
  696. %if %{GTK}
  697. %{_datadir}/graphviz/examples
  698. %endif
  699. #-- graphviz-doc rpm ----------------------------------------------
  700. %package doc
  701. Group: Documentation
  702. Summary: PDF and HTML documents for graphviz
  703. BuildArch: noarch
  704. %description doc
  705. Provides some additional PDF and HTML documentation for graphviz.
  706. %files doc
  707. %defattr(-,root,root,-)
  708. %doc __doc/*
  709. #-- building --------------------------------------------------
  710. %prep
  711. %setup -q
  712. for p in %{patches}; do
  713. patch -p1 < ${p} || exit 1
  714. done
  715. %build
  716. CFLAGS="$RPM_OPT_FLAGS" \
  717. ./configure \
  718. --prefix=%{_prefix} \
  719. --bindir=%{_bindir} \
  720. --libdir=%{_libdir} \
  721. --includedir=%{_includedir} \
  722. --datadir=%{_datadir} \
  723. --mandir=%{_mandir} \
  724. --pdfdir='$(docdir)/pdf' \
  725. --htmldir='$(docdir)/html' \
  726. --disable-static \
  727. --disable-dependency-tracking \
  728. --enable-sharp \
  729. --enable-guile \
  730. --enable-java \
  731. --disable-d \
  732. --disable-javascript \
  733. --enable-lua \
  734. --enable-perl \
  735. --enable-php \
  736. --enable-ruby \
  737. --enable-tcl \
  738. --with-gdk \
  739. --with-ghostscript \
  740. --with-ipsepcola \
  741. %if ! %{ANN}
  742. --without-ann \
  743. %endif
  744. %if ! %{GOLANG}
  745. --disable-go \
  746. %endif
  747. %if ! %{JAVASCRIPT}
  748. --disable-javascript \
  749. %endif
  750. %if ! %{LASI}
  751. --without-lasi \
  752. %endif
  753. %if ! %{PHP}
  754. --disable-php \
  755. %endif
  756. %if ! %{GTS}
  757. --without-gts \
  758. %endif
  759. %if ! %{SHARP}
  760. --disable-sharp \
  761. %endif
  762. %if ! %{ARRRR}
  763. --disable-r \
  764. %endif
  765. %if ! %{DEEEE}
  766. --disable-d \
  767. %endif
  768. %if ! %{WEBP}
  769. --without-webp \
  770. %endif
  771. %if ! %{DEVIL}
  772. --without-devil \
  773. %endif
  774. %if ! %{GTK}
  775. --without-gtk \
  776. --without-gtkgl \
  777. --without-gtkglext \
  778. --without-smyrna \
  779. %endif
  780. --with-qt \
  781. --with-pangocairo \
  782. --with-poppler \
  783. --with-rsvg \
  784. --with-ortho \
  785. --with-sfdp \
  786. --with-x
  787. make %{?_smp_mflags}
  788. %install
  789. rm -rf %{buildroot} __doc
  790. make DESTDIR=%{buildroot} install
  791. find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
  792. cp -a %{buildroot}%{_docdir}/%{name} __doc
  793. rm -rf %{buildroot}%{_docdir}/%{name}
  794. %if %{PHP}
  795. # PHP configuration file
  796. %{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
  797. %{__cat} << __EOF__ > %{buildroot}%{_sysconfdir}/php.d/%{name}.ini
  798. ; Enable %{name} extension module
  799. extension=gv.so
  800. __EOF__
  801. %endif
  802. # Remove executable modes from demos
  803. find %{buildroot}%{_datadir}/%{name}/demo -type f -exec chmod a-x {} ';'
  804. # Rename python demos to prevent byte compilation
  805. find %{buildroot}%{_datadir}/%{name}/demo -type f -name "*.py" -exec mv {} {}.demo ';'
  806. # Ghost plugins config
  807. touch %{buildroot}%{_libdir}/graphviz/config%{pluginsver}
  808. %check
  809. %ifnarch ppc64 ppc
  810. # regression test, segfaults on ppc/ppc64, possible endian issues?
  811. #cd rtest
  812. #make rtest
  813. %endif
  814. %clean
  815. # optional regression test using the products in the build tree
  816. # FIXME - rtest not working reliably in rpm build environment - JCE
  817. %if 0%{?rtest}
  818. #cd rtest
  819. #make rtest
  820. %endif
  821. # clean up temporary installation
  822. rm -rf %{buildroot}
  823. #-- changelog --------------------------------------------------
  824. %changelog
  825. * Fri Dec 6 2024 <> 12.2.1
  826. - see git log
  827. (This automatically-replaced single-entry is used for frequent
  828. updates in the unstable development series of releases.
  829. A properly constructed changelog entry is a requirement
  830. for stable releases.)