graphviz/graphviz.spec

473 lines
12 KiB
RPMSpec
Raw Normal View History

2012-09-19 02:57:19 +00:00
# disable madness
%define _unpackaged_subdirs_terminate_build 0
2020-03-27 20:52:03 +00:00
%define _disable_rebuild_configure 1
%define _disable_ld_no_undefined 1
2012-02-01 14:37:10 +04:00
%bcond_without static
%bcond_with libr
2020-03-27 21:01:13 +00:00
%bcond_with java
2022-03-23 05:06:11 +00:00
# temorary section ro e2k
2023-06-08 22:56:59 +03:00
%ifarch %{x86_64} %{ix86} aarch64
%bcond_without ruby
2024-07-17 16:46:10 +00:00
%bcond_without php
%bcond_without ocaml
2023-06-08 22:56:59 +03:00
%bcond_without tcl
%endif
%ifarch %{e2k} %{riscv}
2022-03-23 05:06:11 +00:00
%bcond_with ruby
%bcond_with php
2023-06-08 22:56:59 +03:00
%bcond_without tcl
2024-07-17 16:46:10 +00:00
%bcond_with ocaml
2022-03-23 05:06:11 +00:00
%endif
2015-01-29 21:25:23 +10:00
2012-02-01 14:37:10 +04:00
%define cdt_major 5
%define cgraph_major 6
2024-07-17 16:46:10 +00:00
%define gamut_major 1
2012-02-01 14:37:10 +04:00
%define gvc_major 6
%define gvpr_major 2
%define pathplan_major 4
%define xdot_major 4
%define lib_cdt %mklibname cdt %{cdt_major}
%define lib_cgraph %mklibname cgraph %{cgraph_major}
2024-07-17 16:46:10 +00:00
%define lib_gamut %mklibname lab_gamut %{gamut_major}
2012-02-01 14:37:10 +04:00
%define lib_gvc %mklibname gvc %{gvc_major}
%define lib_gvpr %mklibname gvpr %{gvpr_major}
%define lib_pathplan %mklibname pathplan %{pathplan_major}
%define lib_xdot %mklibname xdot %{xdot_major}
%define devname %mklibname graphviz -d
2012-02-01 14:37:10 +04:00
%define staticname %mklibname graphviz -d -s
2012-09-19 02:57:19 +00:00
%if %{_use_internal_dependency_generator}
%global __requires_exclude /usr/bin/lua
2012-09-19 02:57:19 +00:00
%endif
2012-02-01 14:37:10 +04:00
Summary: Graph visualization tools
Name: graphviz
2024-07-17 16:46:10 +00:00
Version: 7.0.3
Release: 4
2012-02-01 14:37:10 +04:00
License: Common Public License
Group: Graphics
Url: http://www.graphviz.org
2024-07-17 16:46:10 +00:00
Source0: https://www2.graphviz.org/Packages/stable/portable_source/%{name}-%{version}.tar.gz
Patch0: graphviz-link.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: libtool
BuildRequires: swig
BuildRequires: gd-devel
2020-01-29 15:23:57 +03:00
BuildRequires: git
2021-05-17 14:43:41 +09:00
BuildRequires: groff
BuildRequires: gettext-devel
2021-05-17 14:43:41 +09:00
BuildRequires: ghostscript
# jpeg: No (only required by internal libgd)
#BuildRequires: jpeg-devel
2012-02-01 14:37:10 +04:00
BuildRequires: libltdl-devel
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(pangocairo)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xaw7)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(zlib)
2020-03-27 23:32:58 +00:00
BuildRequires: perl-ExtUtils-Embed
2022-03-23 05:06:11 +00:00
# temporary section
%ifnarch %e2k}
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(glut)
%endif
2012-02-01 14:37:10 +04:00
Conflicts: %{mklibname graphviz 4} < 2.20.3-3
%description
A collection of tools for the manipulation and layout
of graphs (as in nodes and edges, not as in barcharts).
%files
%dir %{_libdir}/%{name}
%{_bindir}/*
%{_mandir}/man?/*
2012-02-01 14:37:10 +04:00
%{_datadir}/graphviz
%{_libdir}/graphviz/*.so.*
%post
%{_bindir}/dot -c
%postun
if ! test -x %{_bindir}/dot; then rm -f %{_libdir}/%{name}/config; fi
2012-02-01 14:37:10 +04:00
#-------------------------------------------------------------------------
%package doc
Summary: %{name} documentation
Group: Books/Computer books
2012-02-01 14:37:10 +04:00
%description doc
The %{name} documentation.
%files doc
%{_datadir}/doc/%{name}
#-------------------------------------------------------------------------
%package -n %{lib_cdt}
Summary: Shared library for %{name}
Group: System/Libraries
2012-02-01 14:37:10 +04:00
Conflicts: %{_lib}graphviz4 < 2.26
%description -n %{lib_cdt}
This package provides the cdt shared library for %{name}.
%files -n %{lib_cdt}
%{_libdir}/libcdt.so.%{cdt_major}*
#-------------------------------------------------------------------------
%package -n %{lib_cgraph}
Summary: Shared library for %{name}
Group: System/Libraries
2012-02-01 14:37:10 +04:00
Conflicts: %{_lib}graphviz4 < 2.26
%description -n %{lib_cgraph}
This package provides the cgraph shared library for %{name}.
%files -n %{lib_cgraph}
%{_libdir}/libcgraph.so.%{cgraph_major}*
#-------------------------------------------------------------------------
2024-07-17 16:46:10 +00:00
%package -n %{lib_gamut}
Group: System/Libraries
Summary: Shared library for %{name}
%description -n %{lib_gamut}
This package provides the lib_gamut shared library for %{name}.
%files -n %{lib_gamut}
%{_libdir}/liblab_gamut.so.%{gamut_major}*
#-------------------------------------------------------------------------
2012-02-01 14:37:10 +04:00
%package -n %{lib_gvc}
Summary: Shared library for %{name}
Group: System/Libraries
2012-02-01 14:37:10 +04:00
Conflicts: %{_lib}graphviz4 < 2.26
%description -n %{lib_gvc}
This package provides the gvc shared library for %{name}.
%files -n %{lib_gvc}
%{_libdir}/libgvc.so.%{gvc_major}*
#-------------------------------------------------------------------------
%package -n %{lib_gvpr}
Summary: Shared library for %{name}
Group: System/Libraries
2012-02-01 14:37:10 +04:00
%description -n %{lib_gvpr}
This package provides the gvpr shared library for %{name}.
%files -n %{lib_gvpr}
%{_libdir}/libgvpr.so.%{gvpr_major}*
#-------------------------------------------------------------------------
%package -n %{lib_pathplan}
Summary: Shared library for %{name}
Group: System/Libraries
2012-02-01 14:37:10 +04:00
Conflicts: %{_lib}graphviz4 < 2.26
%description -n %{lib_pathplan}
This package provides the pathplan shared library for %{name}.
%files -n %{lib_pathplan}
%{_libdir}/libpathplan.so.%{pathplan_major}*
#-------------------------------------------------------------------------
%package -n %{lib_xdot}
Summary: Shared library for %{name}
Group: System/Libraries
2012-02-01 14:37:10 +04:00
%description -n %{lib_xdot}
This package provides the xdot shared library for %{name}.
%files -n %{lib_xdot}
%{_libdir}/libxdot.so.%{xdot_major}*
#-------------------------------------------------------------------------
%define lua_version %(if [ -x /usr/bin/lua ]; then lua -v 2>&1| awk '{print $2}' | awk -F. '{print $1 "." $2}'; fi)
%package -n lua-graphviz
Summary: Graphviz bindings for lua
Group: System/Libraries
BuildRequires: pkgconfig(lua)
2012-02-01 14:37:10 +04:00
%description -n lua-graphviz
This package provides the Lua extension for %{name}.
%files -n lua-graphviz
%{_libdir}/graphviz/lua
%{_libdir}/lua/%{lua_version}/gv.so
#-------------------------------------------------------------------------
%if %{with php}
%package -n php-graphviz
2012-02-01 14:37:10 +04:00
Summary: Graphviz bindings for php
Group: System/Libraries
BuildRequires: php-devel
BuildRequires: php-cli
Obsoletes: %{mklibname graphvizphp 0} < 2.28.0-4
2012-02-01 14:37:10 +04:00
%description -n php-graphviz
This package provides the PHP extension for %{name}.
%files -n php-graphviz
%{_libdir}/graphviz/php
2021-05-17 14:43:41 +09:00
%{_libdir}/php/extensions/gv.so
2023-06-16 09:47:30 +00:00
#{_datadir}/php/gv.php
2020-03-27 23:32:58 +00:00
%endif
2012-02-01 14:37:10 +04:00
#-------------------------------------------------------------------------
2020-01-28 16:45:45 +03:00
%package -n python3-graphviz
Summary: Graphviz bindings for python3
Group: System/Libraries
Obsoletes: %{mklibname graphvizpython 0} < 2.28.0-4
2020-03-27 23:32:58 +00:00
BuildRequires: pkgconfig(python3)
2012-02-01 14:37:10 +04:00
2020-01-28 16:45:45 +03:00
%description -n python3-graphviz
2012-02-01 14:37:10 +04:00
This package provides the Python extension for %{name}.
2020-01-28 16:45:45 +03:00
%files -n python3-graphviz
2020-03-27 23:32:58 +00:00
%{_libdir}/graphviz/python3
2020-03-27 21:02:00 +00:00
%{py3_platsitedir}/*
2012-02-01 14:37:10 +04:00
#-------------------------------------------------------------------------
2015-01-29 21:25:23 +10:00
%if %{with ruby}
2012-02-01 14:37:10 +04:00
%package -n ruby-graphviz
Summary: Graphviz bindings for ruby
Group: System/Libraries
BuildRequires: ruby-devel
Obsoletes: %{mklibname graphvizruby 0} < 2.28.0-4
2012-02-01 14:37:10 +04:00
%description -n ruby-graphviz
This package provides the Ruby extension for %{name}.
%files -n ruby-graphviz
%{_libdir}/graphviz/ruby
2020-10-13 07:53:01 +00:00
%{_libdir}/*ruby*/*
2015-01-29 21:25:23 +10:00
%endif
2012-02-01 14:37:10 +04:00
#-------------------------------------------------------------------------
%package -n perl-graphviz
Summary: Graphviz bindings for perl
Group: System/Libraries
2012-02-01 14:37:10 +04:00
BuildRequires: perl-devel
Obsoletes: %{mklibname graphvizperl 0} < 2.28.0-4
2012-02-01 14:37:10 +04:00
%description -n perl-graphviz
This package provides the Perl extension for %{name}.
%files -n perl-graphviz
%{perl_vendorarch}/*
%{_libdir}/graphviz/perl
#-------------------------------------------------------------------------
2022-03-23 05:06:11 +00:00
%if %{with tcl}
2012-02-01 14:37:10 +04:00
%package -n tcl-graphviz
Summary: Graphviz bindings for tcl
Group: System/Libraries
2012-02-01 14:37:10 +04:00
BuildRequires: tcl-devel >= 8.3.0
BuildRequires: tk-devel >= 8.3.0
BuildRequires: tk >= 8.3.0
Obsoletes: %{mklibname graphviztcl 7 -d} < 2.28.0-4
Obsoletes: %{mklibname graphviztcl 0} < 2.28.0-4
2012-02-01 14:37:10 +04:00
%description -n tcl-graphviz
This package provides the Tcl extension for %{name}.
%files -n tcl-graphviz
%{_libdir}/tcl*
%{_libdir}/graphviz/tcl
2022-03-23 05:06:11 +00:00
%endif
2012-02-01 14:37:10 +04:00
#-------------------------------------------------------------------------
2020-03-27 21:01:13 +00:00
%if %{with java}
2012-02-01 14:37:10 +04:00
%define jdk_path %{_prefix}/lib/jvm/java
%package -n java-graphviz
Summary: Graphviz bindings for java
Group: System/Libraries
2012-02-01 14:37:10 +04:00
BuildRequires: java-devel
Obsoletes: %{mklibname graphvizjava 0} < 2.28.0-4
2012-02-01 14:37:10 +04:00
%description -n java-graphviz
This package provides the Java extension for %{name}.
%files -n java-graphviz
%{_libdir}/graphviz/java
2020-03-27 21:01:13 +00:00
%endif
2012-02-01 14:37:10 +04:00
#-------------------------------------------------------------------------
%if %{with libr}
2012-02-01 14:37:10 +04:00
%package -n r-graphviz
Summary: Graphviz bindings for R
Group: System/Libraries
BuildRequires: pkgconfig(libRmath)
Obsoletes: %{mklibname graphvizr 0} < 2.28.0-4
2012-02-01 14:37:10 +04:00
%description -n r-graphviz
This package provides the R extension for %{name}.
%files -n r-graphviz
%{_libdir}/graphviz/R
%endif
2024-07-17 16:46:10 +00:00
#-------------------------------------------------------------------------
%if %{with ocaml}
%package -n ocaml-graphviz
Summary: Graphviz bindings for OCaml
Group: Development/OCaml
BuildRequires: ocaml
Obsoletes: %{mklibname graphvizocaml 0} < 2.28.0-4
%description -n ocaml-graphviz
This package provides the OCaml extension for %{name}.
%files -n ocaml-graphviz
%{_libdir}/graphviz/ocaml
%endif
2012-02-01 14:37:10 +04:00
#-------------------------------------------------------------------------
%package -n %{devname}
2012-02-01 14:37:10 +04:00
Group: Development/Other
Summary: Development package for %{name}
Provides: %{name}-devel = %{EVRD}
Obsoletes: %{mklibname graphviz -d 7} < 2.28.0-4
Obsoletes: %{mklibname tcl -d 7} < 2.28.0-4
Obsoletes: %{mklibname -d graphviz 3} < 2.28.0-4
Requires: %{lib_cdt} = %{EVRD}
Requires: %{lib_cgraph} = %{EVRD}
Requires: %{lib_gvc} = %{EVRD}
Requires: %{lib_gvpr} = %{EVRD}
Requires: %{lib_pathplan} = %{EVRD}
Requires: %{lib_xdot} = %{EVRD}
%description -n %{devname}
2012-02-01 14:37:10 +04:00
Development package for %{name}.
%files -n %{devname}
2012-02-01 14:37:10 +04:00
%{_libdir}/pkgconfig/*
%{_libdir}/graphviz/*.so
%{_libdir}/*.so
%{_includedir}/graphviz
#-------------------------------------------------------------------------
%if ! %{without static}
2012-02-01 14:37:10 +04:00
%package -n %{staticname}
Group: Development/Other
Summary: Static development package for %{name}
Requires: %{devname} = %{EVRD}
Provides: %{name}-static-devel = %{EVRD}
Obsoletes: %{mklibname -d -s graphviz 3} < 2.28.0-4
2012-02-01 14:37:10 +04:00
%description -n %{staticname}
Static development package for %{name}.
%files -n %{staticname}
%{_libdir}/graphviz/*.a
%{_libdir}/*.a
%endif
#-------------------------------------------------------------------------
%prep
2020-03-27 21:27:35 +00:00
%setup -q
%autopatch -p1
%if "%{_libdir}" != "/usr/lib64"
sed -i -e 's,I/usr/lib64,I%{_libdir},g' tclpkg/gv/Makefile.am
%endif
rm -rf libltdl
2023-06-09 01:19:14 +03:00
# fix e2k detection
sed -i 's!e2k!e2k*!g' configure.ac
2012-02-01 14:37:10 +04:00
%build
2020-01-28 16:45:45 +03:00
./autogen.sh
#autoreconf -fi
2024-07-17 16:46:10 +00:00
%if %{with php}
sed -i -e "s,-php5,php$(rpm -q --qf '%{Version}' php-cli | cut -d'.' -f1),g" configure
%endif
2021-05-17 14:43:41 +09:00
2022-03-23 05:06:11 +00:00
%ifarch %{e2k}
LUA_INSTALL_DIR=%{_libdir}/lua
%endif
2020-01-04 03:45:08 +03:00
%configure \
2012-02-01 14:37:10 +04:00
--with-x \
%if %{without static}
--disable-static \
2012-02-01 14:37:10 +04:00
%else
--enable-static \
%endif
%if %{with libr}
2012-02-01 14:37:10 +04:00
--enable-r \
%else
--disable-r \
%endif
2024-07-17 16:46:10 +00:00
--enable-ocaml \
2012-02-01 14:37:10 +04:00
--enable-perl \
2020-03-27 23:32:58 +00:00
%if %{with php}
2012-02-01 14:37:10 +04:00
--enable-php \
2020-03-27 23:32:58 +00:00
%endif
2012-02-01 14:37:10 +04:00
--disable-guile \
2023-06-08 17:15:46 +03:00
%if !%{with tcl}
--enable-tcl=no \
%endif
--disable-python \
2022-12-01 13:52:28 +03:00
--disable-python2 \
--enable-python3 \
2012-02-01 14:37:10 +04:00
--disable-sharp \
--with-pangocairo \
--with-gtk \
--with-libgd \
--disable-io \
2015-01-29 21:25:23 +10:00
%if %{with ruby}
--enable-ruby=yes \
%else
--enable-ruby=no \
%endif
2012-02-01 14:37:10 +04:00
--disable-dependency-tracking
2020-03-27 23:32:58 +00:00
pushd libltdl
aclocal -I m4
popd
2020-01-28 16:45:45 +03:00
%make TK_LIB_SPEC="-ltcl -ltk" LIBS="-lX11" \
PYTHON_INCLUDES=`python3-config --includes` \
PYTHON_LIBS=`python3-config --embed --libs` \
PYTHON_INSTALL_DIR=%{python3_sitearch} \
PYTHON=%{__python3}
2012-02-01 14:37:10 +04:00
%install
2020-01-13 15:14:30 +03:00
%makeinstall_std
2012-02-01 14:37:10 +04:00
2024-07-17 16:46:10 +00:00
%ifarch %e2k
[ -d %{buildroot}%{_prefix}/lib/lua ] && mv %{buildroot}%{_prefix}/lib/lua %{buildroot}%{_libdir}/
%endif
2022-03-23 10:50:33 +00:00
2012-02-01 14:37:10 +04:00
# fix documentation
install -d -m 755 %{buildroot}%{_docdir}
mv %{buildroot}%{_datadir}/%{name}/demo %{buildroot}%{_docdir}/%{name}