forked from pool/graphviz
474 lines
14 KiB
RPMSpec
474 lines
14 KiB
RPMSpec
#
|
|
# spec file for package graphviz-plugins
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define mname graphviz
|
|
|
|
%ifarch aarch64
|
|
%bcond_with java
|
|
%bcond_with graphviz_ocaml
|
|
%else
|
|
%bcond_without java
|
|
%bcond_without graphviz_ocaml
|
|
%endif
|
|
%bcond_without mono
|
|
|
|
Name: graphviz-plugins
|
|
BuildRequires: autoconf
|
|
BuildRequires: automake
|
|
BuildRequires: bison
|
|
BuildRequires: flex
|
|
BuildRequires: freetype2-devel >= 2
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gd-devel
|
|
BuildRequires: ghostscript
|
|
BuildRequires: gmp-devel
|
|
BuildRequires: graphviz
|
|
BuildRequires: guile-devel
|
|
BuildRequires: libexpat-devel
|
|
BuildRequires: libgnomeui-devel
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: libstdc++-devel
|
|
BuildRequires: m4
|
|
%ifnarch aarch64
|
|
%if 0%suse_version > 1220
|
|
BuildRequires: gtkglext-devel
|
|
%endif
|
|
%endif
|
|
%if %{with java}
|
|
#BuildRequires: gcc-java
|
|
#BuildRequires: libgcj-devel
|
|
BuildRequires: java-devel >= 1.6.0
|
|
%endif
|
|
%if %{with mono}
|
|
BuildRequires: mono-core
|
|
%endif
|
|
%if %{with graphviz_ocaml}
|
|
BuildRequires: ocaml
|
|
%endif
|
|
BuildRequires: perl
|
|
BuildRequires: php5-devel
|
|
BuildRequires: python-devel
|
|
BuildRequires: ruby-devel
|
|
BuildRequires: swig
|
|
BuildRequires: tk-devel >= 8.3
|
|
BuildRequires: xorg-x11-devel
|
|
BuildRequires: xorg-x11-libICE-devel
|
|
BuildRequires: xorg-x11-libSM-devel
|
|
BuildRequires: xorg-x11-libX11-devel
|
|
BuildRequires: xorg-x11-libXext-devel
|
|
BuildRequires: xorg-x11-libXmu-devel
|
|
BuildRequires: xorg-x11-libXpm-devel
|
|
BuildRequires: xorg-x11-libXt-devel
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: pkgconfig(cairo)
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
BuildRequires: pkgconfig(libglade-2.0)
|
|
BuildRequires: pkgconfig(lua) < 5.2
|
|
BuildRequires: pkgconfig(lua) >= 5.1
|
|
BuildRequires: pkgconfig(pango)
|
|
%if 0%{?suse_version} > 1020
|
|
BuildRequires: fdupes
|
|
%endif
|
|
Version: 2.36.0
|
|
Release: 0
|
|
Summary: Graph Visualization Tools
|
|
License: IPL-1.0
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Url: http://www.graphviz.org/
|
|
Source: http://www.graphviz.org/pub/graphviz/ARCHIVE/%{mname}-%{version}.tar.gz
|
|
#PATCH-FIX-UPSTREAM There are too many type-punnings in the vmalloc sources
|
|
Patch3: graphviz-no_strict_aliasing.patch
|
|
#Patches from 100 up are for graphviz-plugin only
|
|
Patch100: graphviz-plugins-fix_install_dirs.patch
|
|
Patch102: graphviz-plugins-tcl_install_dir.patch
|
|
Patch103: graphviz-2.20.2-interpreter_names.patch
|
|
Patch106: graphviz-fix-pkgIndex.patch
|
|
#PATCH-FIX-UPSTREAM Don't warn about harmless issues with swig generated code
|
|
Patch108: graphviz-useless_warnings.patch
|
|
Patch109: graphviz-ppc64le_lib64_support.patch
|
|
Requires(pre): coreutils
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%define rb_libdir %{_libdir}/ruby
|
|
%define rb_sitedir %{rb_libdir}/site_ruby/%{rb_ver}
|
|
%define rb_vendordir %{rb_libdir}/vendor_ruby/%{rb_ver}
|
|
%define lua_libdir %{_libdir}/lua/%(pkg-config --variable=V lua)
|
|
%define debug_package_requires graphviz_plugin = %{version}-%{release}
|
|
|
|
%description
|
|
A collection of tools and tcl packages for the manipulation and layout
|
|
of graphs (as in nodes and edges, not as in bar charts).
|
|
|
|
%package -n graphviz-gnome
|
|
Summary: Graphviz plugins that use gtk/GNOME
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires(pre): coreutils
|
|
Requires(pre): graphviz = %{version}
|
|
Requires: xorg-x11-fonts
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-gnome
|
|
Graphviz plugins that use gtk/GNOME.
|
|
|
|
%package -n graphviz-gd
|
|
Summary: Graphviz plugin for renderers based on gd
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires(pre): coreutils
|
|
Requires(pre): gd
|
|
Requires(pre): graphviz = %{version}
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-gd
|
|
The graphviz-gd package contains the gd extensions for the graphviz
|
|
tools.
|
|
|
|
%package -n graphviz-guile
|
|
Summary: Graph Visualization Tools
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: guile
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-guile
|
|
A collection of tools and tcl packages for the manipulation and layout
|
|
of graphs (as in nodes and edges, not as in bar charts).
|
|
|
|
%if %{with java}
|
|
%package -n graphviz-java
|
|
Summary: Graph Visualization Tools
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: java
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-java
|
|
A collection of tools and tcl packages for the manipulation and layout
|
|
of graphs (as in nodes and edges, not as in bar charts).
|
|
%endif
|
|
|
|
%package -n graphviz-lua
|
|
Summary: Lua extension for graphviz
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: lua
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-lua
|
|
The graphviz-lua package contains the lua extension for the graphviz
|
|
tools.
|
|
|
|
%if %{with graphviz_ocaml}
|
|
%package -n graphviz-ocaml
|
|
Summary: OCAML extension for graphviz
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: ocaml
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-ocaml
|
|
The graphviz-ocaml package contains the Objective Caml extension for
|
|
the graphviz tools.
|
|
%endif
|
|
|
|
%package -n graphviz-perl
|
|
Summary: Perl extension for Graphviz
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: perl = %{perl_version}
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%perl_requires
|
|
|
|
%description -n graphviz-perl
|
|
The graphviz-perl package contains the Perl extension for the graphviz
|
|
tools.
|
|
|
|
%package -n graphviz-php
|
|
Summary: PHP Extension for Graphviz
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: php5
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-php
|
|
The graphviz-php package contains the PHP extension for the graphviz
|
|
tools.
|
|
|
|
%package -n graphviz-python
|
|
Summary: Python Extension for Graphviz
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: python
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-python
|
|
The graphviz-python package contains the Python extension for the
|
|
graphviz tools.
|
|
|
|
%package -n graphviz-ruby
|
|
Summary: Ruby Extension for Graphviz
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: ruby
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-ruby
|
|
The graphviz-ruby package contains the ruby extension for the graphviz
|
|
tools.
|
|
|
|
%if %{with mono}
|
|
%package -n graphviz-sharp
|
|
Summary: C# Extension for Graphviz
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
Requires: graphviz = %{version}
|
|
Requires: mono-core
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-sharp
|
|
The graphviz-sharp package contains the C# extension for the graphviz
|
|
tools.
|
|
%endif
|
|
|
|
%package -n graphviz-tcl
|
|
Summary: Tcl extension tools for graphviz
|
|
Group: Development/Libraries/Tcl
|
|
Requires: graphviz = %{version}
|
|
Requires: tcl >= 8.3
|
|
Requires: tk
|
|
Provides: graphviz_plugin = %{version}
|
|
|
|
%description -n graphviz-tcl
|
|
The graphviz-tcl package contains the various tcl packages (extensions)
|
|
for the graphviz tools.
|
|
|
|
%package -n graphviz-doc
|
|
Summary: Documentation for graphviz
|
|
Group: Productivity/Graphics/Visualization/Graph
|
|
|
|
%description -n graphviz-doc
|
|
Provides some additional PDF and HTML documentation for graphviz.
|
|
|
|
%prep
|
|
%setup -q -n %{mname}-%{version}
|
|
%patch3
|
|
%patch100
|
|
%patch102
|
|
%patch103
|
|
%patch106
|
|
%patch108
|
|
%patch109
|
|
rm -f contrib/gprof2dot.awk
|
|
|
|
# Fix path in generated man pages
|
|
sed -e 's$@LIB_DIR@$%{_libdir}$g' tclpkg/gv/gv_doc_langs.tcl >tclpkg/gv/gv_doc_langs.tcl.new && mv tclpkg/gv/gv_doc_langs.tcl.new tclpkg/gv/gv_doc_langs.tcl
|
|
|
|
%build
|
|
autoreconf -fi
|
|
WARN_FLAGS="-W -Wall -Wno-unused-parameter -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith"
|
|
CFLAGS="%{optflags} $WARN_FLAGS"
|
|
%ifarch %ix86 x86_64
|
|
CFLAGS="$CFLAGS -ffast-math"
|
|
%endif
|
|
%if %suse_version > 1210
|
|
rubyflags=$(pkg-config --cflags ruby-$(echo %rb_ver | sed 's|\.[^.]*$||'))
|
|
CFLAGS="$CFLAGS $rubyflags"
|
|
CXXFLAGS="$CXXFLAGS $rubyflags"
|
|
%endif
|
|
|
|
export CFLAGS
|
|
export CXXFLAGS="$CXXFLAGS -fpermissive"
|
|
export CPPFLAGS="%{optflags}"
|
|
%configure \
|
|
--with-x \
|
|
--disable-static \
|
|
--disable-dependency-tracking \
|
|
--with-ipsepcola \
|
|
--without-ming \
|
|
--disable-silent-rules \
|
|
--enable-ltdl-install=no \
|
|
%if %{without mono}
|
|
--enable-sharp=no \
|
|
%endif
|
|
--disable-io
|
|
make DESTDIR=%{buildroot} %{?_smp_mflags}
|
|
|
|
%install
|
|
make install DESTDIR=%{buildroot} \
|
|
docdir=%{buildroot}%{_docdir}/%{mname} \
|
|
pkgconfigdir=%{_libdir}/pkgconfig
|
|
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
|
|
mkdir -p %{buildroot}/%{_docdir}
|
|
mkdir -p %{buildroot}%{_datadir}/%{mname}
|
|
mkdir -p %{buildroot}%{_datadir}/tcl/%{mname}
|
|
chmod -x %{buildroot}%{_datadir}/%{mname}/lefty/*
|
|
cp -a %{buildroot}%{_datadir}/%{mname}/doc __doc
|
|
rm -rf %{buildroot}%{_datadir}/%{mname}/doc
|
|
mkdir -p %{buildroot}%{_libdir}/graphviz
|
|
touch %{buildroot}%{_libdir}/graphviz/config
|
|
#Correct the path to the shared library
|
|
for manfile in $(find %{buildroot} -name \*.man); do
|
|
sed -e 's$/usr/lib/graphviz$%{_libdir}/%{mname}$g' $manfile > ${manfile}.new && mv ${manfile}.new ${manfile}
|
|
done
|
|
rm -f %{buildroot}%{_bindir}/*
|
|
rm -rf %{buildroot}%{_includedir}/graphviz
|
|
rm -f %{buildroot}%{_libdir}/graphviz/config
|
|
rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_core*
|
|
rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_dot_layout*
|
|
rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_neato_layout*
|
|
rm -f %{buildroot}%{_libdir}/lib*
|
|
rm -rf %{buildroot}%{_libdir}/pkgconfig
|
|
rm -rf %{buildroot}%{_datadir}/graphviz/graphs
|
|
rm -rf %{buildroot}%{_datadir}/graphviz/lefty
|
|
rm -rf %{buildroot}%{_mandir}/man1
|
|
rm -f %{buildroot}%{_mandir}/man3/*.3.gz
|
|
rm -f %{buildroot}%{_mandir}/man3/*.3
|
|
rm -f %{buildroot}%{_mandir}/man7/*.7
|
|
rm -f %{buildroot}%{_mandir}/man7/*.7.gz
|
|
rm -rf %{buildroot}%{_datadir}/%{mname}/gvpr
|
|
rm -rf %{buildroot}%{_datadir}/%{mname}/gvedit
|
|
for lib in libgdtclft* libgv_tcl.so libtcldot* libtclplan* libtkspline*; do
|
|
mv %{buildroot}%{_libdir}/%{mname}/tcl/${lib} %{buildroot}%{_libdir}
|
|
done
|
|
%if 0%{?suse_version} > 1020
|
|
%fdupes -s %{buildroot}%{_defaultdocdir}/%{mname}
|
|
%endif
|
|
rm -rf %{buildroot}/%{_libdir}/%{mname}/%{_lib}
|
|
|
|
%files -n graphviz-gd
|
|
%defattr(-,root,root)
|
|
%{_libdir}/graphviz/libgvplugin_gd.so*
|
|
|
|
%post -n graphviz-gd
|
|
%{_bindir}/dot -c
|
|
|
|
%postun -n graphviz-gd
|
|
%{_bindir}/dot -c
|
|
|
|
%post -n graphviz-gnome
|
|
%{_bindir}/dot -c
|
|
|
|
%postun -n graphviz-gnome
|
|
%{_bindir}/dot -c
|
|
|
|
%files -n graphviz-gnome
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/graphviz/libgvplugin_pango*
|
|
%{_libdir}/graphviz/libgvplugin_gdk_pixbuf*
|
|
%{_libdir}/graphviz/libgvplugin_gtk*
|
|
%{_libdir}/graphviz/libgvplugin_xlib*
|
|
|
|
%post -n graphviz-tcl -p /sbin/ldconfig
|
|
|
|
%postun -n graphviz-tcl -p /sbin/ldconfig
|
|
|
|
%files -n graphviz-guile
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/graphviz/guile
|
|
%doc %{_mandir}/man3/gv.3guile.gz
|
|
|
|
%if %{with java}
|
|
%files -n graphviz-java
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/graphviz/java
|
|
%{_mandir}/man3/gv.3java.gz
|
|
%endif
|
|
|
|
%if %{with mono}
|
|
%files -n graphviz-sharp
|
|
%defattr(-,root,root)
|
|
%{_libdir}/graphviz/sharp
|
|
%doc %{_mandir}/man3/gv.3sharp.gz
|
|
%endif
|
|
|
|
%files -n graphviz-lua
|
|
%defattr(-,root,root,-)
|
|
%{_datadir}/%{mname}/demo/modgraph.lua
|
|
%dir %{_libdir}/lua
|
|
%dir %lua_libdir
|
|
%{_libdir}/graphviz/lua
|
|
%{lua_libdir}/gv.so
|
|
%doc %{_mandir}/man3/gv.3lua.gz
|
|
|
|
%if %{with graphviz_ocaml}
|
|
%files -n graphviz-ocaml
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/graphviz/ocaml
|
|
%doc %{_mandir}/man3/gv.3ocaml.gz
|
|
%endif
|
|
|
|
%files -n graphviz-perl
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/graphviz/perl
|
|
%{perl_vendorarch}/gv.pm
|
|
%{perl_vendorarch}/gv.so
|
|
%{_datadir}/%{mname}/demo/modgraph.pl
|
|
%doc %{_mandir}/man3/gv.3perl.gz
|
|
|
|
%files -n graphviz-php
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/php5/extensions/gv.so
|
|
%{_datadir}/php5/gv.php
|
|
%doc %{_mandir}/man3/gv.3php.gz
|
|
%dir %{_libdir}/%{mname}/php
|
|
%{_libdir}/%{mname}/php/gv.php
|
|
%{_libdir}/%{mname}/php/gv.so
|
|
%{_libdir}/%{mname}/php/libgv_php.so
|
|
%{_datadir}/%{mname}/demo/modgraph.php
|
|
|
|
%files -n graphviz-python
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/graphviz/python
|
|
%{py_sitedir}/_gv.so
|
|
%{py_sitedir}/gv.py
|
|
%doc %{_mandir}/man3/gv.3python.gz
|
|
%{_datadir}/%{mname}/demo/modgraph.py
|
|
|
|
%files -n graphviz-ruby
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/graphviz/ruby
|
|
%{rb_vendorarchdir}/gv.so
|
|
%doc %{_mandir}/man3/gv.3ruby.gz
|
|
%{_datadir}/%{mname}/demo/modgraph.rb
|
|
|
|
%files -n graphviz-tcl
|
|
%defattr(-,root,root)
|
|
%dir %{_datadir}/tcl/%{mname}
|
|
%{_libdir}/tcl[0-9].[0-9]
|
|
%{_libdir}/libgdtclft*
|
|
%{_libdir}/libgv_tcl.so
|
|
%{_libdir}/libtcldot*
|
|
%{_libdir}/libtclplan*
|
|
%{_libdir}/libtkspline*
|
|
%{_datadir}/tcl/%{mname}/pkgIndex.tcl
|
|
%{_datadir}/graphviz/demo
|
|
%doc %{_mandir}/man3/*.3tcl*
|
|
%doc %{_mandir}/man3/*.3tk*
|
|
%exclude %{_datadir}/%{mname}/demo/modgraph.rb
|
|
%exclude %{_datadir}/%{mname}/demo/modgraph.php
|
|
%exclude %{_datadir}/%{mname}/demo/modgraph.py
|
|
%exclude %{_datadir}/%{mname}/demo/modgraph.lua
|
|
%exclude %{_datadir}/%{mname}/demo/modgraph.pl
|
|
|
|
%files -n graphviz-doc
|
|
%defattr(-,root,root,-)
|
|
%docdir %{_defaultdocdir}/%{mname}
|
|
%doc __doc/*
|
|
|
|
%changelog
|