graphviz/graphviz.spec
Ismail Dönmez a9efec4330 - Fix compilation with new guile
- Update to version 2.28.0
    - incremented library api version:
        libcdt, libgraph, libcgraph, libgvpr, libgvc
    - Add gvmap, cluster and gvmap.sh
    - Deprecate dotty; prefer gvedit
    - Add patchwork supporting squarified tree maps
    - Add ordering as a node attribute
    - Fix problems with font resolution
    - Fix problems with text placement
    - Fix twopi to set root attribute
    - Make available layouts and formats available via the API
    - Fix error message system so that an application can capture the messages
    - New attributes and features for sfdp
    - gvgen now allows the user to specify graph name and node name template
    - Make overlap=false denote overlap=prism
    - More efficient xdot library
    - HTML-like labels provide ID
    - Fixed bugs: 1480 1980 2044 2087 2088 2089 2091 2093 2094 
        2095 2101 2102 2103 2104 2112 2113 2118 2128 2129 2139 2149 
        2157 2113 2159 2160 2161 2163
    - Add scale attribute to twopi
    - Add <B>,<I>,<U> to html strings
    - migrated to 2005 version of cdt 

- Update to version 2.28.0
    - incremented library api version:
        libcdt, libgraph, libcgraph, libgvpr, libgvc
    - Add gvmap, cluster and gvmap.sh
    - Deprecate dotty; prefer gvedit

OBS-URL: https://build.opensuse.org/package/show/graphics/graphviz?expand=0&rev=28
2011-09-28 19:14:00 +00:00

191 lines
5.7 KiB
RPMSpec

#
# spec file for package graphviz
#
# Copyright (c) 2011 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/
#
#name of the plugin config file that dot creates
%define config_file config6
Name: graphviz
Version: 2.28.0
Release: 1
License: IBM Public License ..
Summary: Graph Visualization Tools
Url: http://www.graphviz.org/
Group: Productivity/Graphics/Visualization/Graph
Source: http://www.graphviz.org/pub/graphviz/ARCHIVE/%{name}-%{version}.tar.gz
Source2: graphviz-rpmlintrc
Patch1: graphviz-gd_png_check_sig.patch
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: freetype2-devel >= 2
BuildRequires: gcc-c++
BuildRequires: libexpat-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool
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(glib-2.0)
Requires(pre): /bin/cat
Requires(pre): /bin/rm
Recommends: graphviz-gd = %{version}
Recommends: graphviz-gnome = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: /usr
%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 devel
License: IBM Public License ..
Summary: Graphiviz development package
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: expat
Requires: fontconfig-devel
Requires: freetype2-devel
Requires: glibc-devel
Requires: libjpeg-devel
Requires: libpng-devel
Requires: libstdc++-devel
Requires: libtool
Requires: perl
Requires: tcl-devel
Requires: tk-devel
Requires: zlib-devel
%description devel
The graphviz-devel package contains all that's necessary for developing
programs that use the graphviz libraries including man3 pages.
Note: If you need output in png format you also need to install
graphviz-gnome.
%prep
%setup -q
%patch1
# 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
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
export CFLAGS="$CFLAGS"
export CPPFLAGS="%{optflags}"
%configure \
--with-x \
--with-mylibgd \
--disable-static \
--enable-ltdl-install=no \
--with-ipsepcola \
--without-ming \
--disable-io
make %{?_smp_mflags} DESTDIR=%{buildroot}
%install
make install \
DESTDIR=%{buildroot} \
docdir=%{buildroot}%{_docdir}/%{name} \
pkgconfigdir=%{_libdir}/pkgconfig
find %{buildroot} -type f -name "*.la" -print0 | xargs -0 rm -f
mkdir -p %{buildroot}/%{_docdir}
mkdir -p %{buildroot}%{_datadir}/%{name}
rm -f %{buildroot}/%{_libdir}/%{name}/pkgIndex.tcl
chmod -x %{buildroot}%{_datadir}/%{name}/lefty/*
cp -a %{buildroot}%{_datadir}/%{name}/doc __doc
rm -rf %{buildroot}%{_datadir}/%{name}/doc
mkdir -p %{buildroot}%{_libdir}/graphviz
touch %{buildroot}%{_libdir}/graphviz/config
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
cat <<EOF >%{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}.conf
%{_libdir}/%{name}
%{_libdir}/%{name}/sharp
%{_libdir}/%{name}/java
%{_libdir}/%{name}/perl
%{_libdir}/%{name}/php
%{_libdir}/%{name}/ocaml
%{_libdir}/%{name}/python
%{_libdir}/%{name}/lua
%{_libdir}/%{name}/tcl
%{_libdir}/%{name}/guile
%{_libdir}/%{name}/ruby
EOF
#Correct the path to the shared library
for manfile in $(find %{buildroot} -name \*.man); do
sed -e 's$/usr/lib/graphviz$%{_libdir}/%{name}$g' $manfile > ${manfile}.new && mv ${manfile}.new ${manfile}
done
rm -f %{buildroot}%{_libdir}/graphviz/libgvplugin_gd.*
rm -f %{_libdir}/graphviz/libgvplugin_pango*
rm -f %{_libdir}/graphviz/libgvplugin_gdk_pixbuf*
rm -f %{_libdir}/graphviz/libgvplugin_gtk*
%post
/sbin/ldconfig
# run "dot -c" to generate plugin config %{_libdir}/graphviz/config
dot -c
test -s %{_libdir}/graphviz/%{config_file} || echo "%{_libdir}/graphviz/%{config_file} doesn't exist! Check installation."
%postun
/sbin/ldconfig
if ! test -x $RPM_INSTALL_PREFIX0/bin/dot; then rm -f $RPM_INSTALL_PREFIX0/%{_lib}/graphviz/%{config_file}; fi
%files
%defattr(-,root,root)
%doc doc/FAQ.html AUTHORS COPYING README NEWS ChangeLog
%attr(755,root,root) %{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/lefty
%{_datadir}/%{name}/graphs
%doc %{_mandir}/man1/*.1*
%doc %{_mandir}/man7/*.7*
%dir %{_libdir}/%{name}
%{_libdir}/*.so.*
%{_libdir}/graphviz/*.so*
%{_sysconfdir}/ld.so.conf.d/graphviz.conf
%ghost %{_libdir}/graphviz/config
%files devel
%defattr(-,root,root)
%{_includedir}/graphviz
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*.3.gz
%changelog