|
|
|
|
##
|
|
|
|
|
## graphviz.spec -- OpenPKG RPM Package Specification
|
|
|
|
|
## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
|
|
|
|
|
##
|
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
|
## copies.
|
|
|
|
|
##
|
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
# package versions
|
|
|
|
|
%define V_graphviz 2.20.3
|
|
|
|
|
%define V_graphviz_perl_base 2.03
|
|
|
|
|
%define V_graphviz_perl_data_structure 0.17
|
|
|
|
|
|
|
|
|
|
# package information
|
|
|
|
|
Name: graphviz
|
|
|
|
|
Summary: Graph Visualization Tool
|
|
|
|
|
URL: http://www.graphviz.org/
|
|
|
|
|
Vendor: AT&T
|
|
|
|
|
Packager: OpenPKG Foundation e.V.
|
|
|
|
|
Distribution: OpenPKG Community
|
|
|
|
|
Class: BASE
|
|
|
|
|
Group: Diagram
|
|
|
|
|
License: GPL
|
|
|
|
|
Version: %{V_graphviz}
|
|
|
|
|
Release: 20081008
|
|
|
|
|
|
|
|
|
|
# package options
|
|
|
|
|
%option with_x11 no
|
|
|
|
|
%option with_perl no
|
|
|
|
|
%option with_pango no
|
|
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
|
Source0: http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-%{V_graphviz}.tar.gz
|
|
|
|
|
Source1: http://www.cpan.org/modules/by-module/GraphViz/GraphViz-%{V_graphviz_perl_base}.tar.gz
|
|
|
|
|
Source2: http://www.cpan.org/modules/by-module/GraphViz/GraphViz-Data-Structure-%{V_graphviz_perl_data_structure}.tar.gz
|
|
|
|
|
Patch0: graphviz.patch
|
|
|
|
|
|
|
|
|
|
# build information
|
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, flex, bison, autoconf, automake
|
|
|
|
|
PreReq: OpenPKG, openpkg >= 20040130
|
|
|
|
|
BuildPreReq: freetype, png, zlib, jpeg, gd
|
|
|
|
|
PreReq: freetype, png, zlib, jpeg, gd
|
|
|
|
|
%if "%{with_x11}" == "yes"
|
|
|
|
|
BuildPreReq: X11, fontconfig
|
|
|
|
|
PreReq: X11, fontconfig
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{with_perl}" == "yes"
|
|
|
|
|
BuildPreReq: perl, perl-sys, perl-openpkg
|
|
|
|
|
PreReq: perl, perl-sys
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{with_pango}" == "yes"
|
|
|
|
|
BuildPreReq: pango, cairo
|
|
|
|
|
PreReq: pango, cairo
|
|
|
|
|
%endif
|
|
|
|
|
AutoReq: no
|
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Graphviz is a set of graph drawing tools. Graph drawing addresses
|
|
|
|
|
the problem of visualizing structural information by constructing
|
|
|
|
|
geometric representations of abstract graphs and networks.
|
|
|
|
|
Automatic generation of graph drawings has important applications
|
|
|
|
|
in key technologies such as database design, software engineering,
|
|
|
|
|
VLSI and network design and visual interfaces in other domains.
|
|
|
|
|
|
|
|
|
|
%track
|
|
|
|
|
prog graphviz = {
|
|
|
|
|
version = %{V_graphviz}
|
|
|
|
|
url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/
|
|
|
|
|
regex = graphviz-(\d+\.\d+(\.\d+)*)\.tar.gz
|
|
|
|
|
}
|
|
|
|
|
prog graphviz:GraphViz = {
|
|
|
|
|
version = %{V_graphviz_perl_base}
|
|
|
|
|
url = http://www.cpan.org/modules/by-module/GraphViz/
|
|
|
|
|
regex = GraphViz-(__VER__)\.tar\.gz
|
|
|
|
|
}
|
|
|
|
|
prog graphviz:GraphViz-Data-Structure = {
|
|
|
|
|
version = %{V_graphviz_perl_data_structure}
|
|
|
|
|
url = http://www.cpan.org/modules/by-module/GraphViz/
|
|
|
|
|
regex = GraphViz-Data-Structure-(__VER__)\.tar\.gz
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%setup -q -D -T -a 1
|
|
|
|
|
%setup -q -D -T -a 2
|
|
|
|
|
%patch -p0
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# configure program
|
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
|
LDFLAGS="%{l_ldflags}" \
|
|
|
|
|
./configure \
|
|
|
|
|
--prefix=%{l_prefix} \
|
|
|
|
|
--mandir=%{l_prefix}/man \
|
|
|
|
|
--with-extraincludedir=%{l_prefix}/include \
|
|
|
|
|
--with-extralibdir=%{l_prefix}/lib \
|
|
|
|
|
--with-freetypeincludedir=%{l_prefix}/include \
|
|
|
|
|
--with-freetypelibdir=%{l_prefix}/lib \
|
|
|
|
|
--with-pngincludedir=%{l_prefix}/include \
|
|
|
|
|
--with-pnglibdir=%{l_prefix}/lib \
|
|
|
|
|
--with-jpegincludedir=%{l_prefix}/include \
|
|
|
|
|
--with-jpeglibdir=%{l_prefix}/lib \
|
|
|
|
|
--without-mylibgd \
|
|
|
|
|
--with-libgd \
|
|
|
|
|
--with-gdincludedir=%{l_prefix}/include \
|
|
|
|
|
--with-gdlibdir=%{l_prefix}/lib \
|
|
|
|
|
--with-zincludedir=%{l_prefix}/include \
|
|
|
|
|
--with-zlibdir=%{l_prefix}/lib \
|
|
|
|
|
--without-gtk \
|
|
|
|
|
--disable-swig \
|
|
|
|
|
--disable-sharp \
|
|
|
|
|
--disable-guile \
|
|
|
|
|
--disable-io \
|
|
|
|
|
--disable-java \
|
|
|
|
|
--disable-lua \
|
|
|
|
|
--disable-ocaml \
|
|
|
|
|
--disable-perl \
|
|
|
|
|
--disable-php \
|
|
|
|
|
--disable-python \
|
|
|
|
|
--disable-ruby \
|
|
|
|
|
--disable-tcl \
|
|
|
|
|
--without-tclsh \
|
|
|
|
|
--without-wish \
|
|
|
|
|
%if "%{with_x11}" == "yes"
|
|
|
|
|
--with-x \
|
|
|
|
|
--x-includes=`%{l_rc} --query x11_incdir` \
|
|
|
|
|
--x-libraries=`%{l_rc} --query x11_libdir` \
|
|
|
|
|
--with-fontconfigincludedir=%{l_prefix}/include \
|
|
|
|
|
--with-fontconfiglibdir=%{l_prefix}/lib \
|
|
|
|
|
%else
|
|
|
|
|
--without-x \
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{with_pango}" == "yes"
|
|
|
|
|
--with-pangocairo \
|
|
|
|
|
%else
|
|
|
|
|
--without-pangocairo \
|
|
|
|
|
%endif
|
|
|
|
|
--disable-shared \
|
|
|
|
|
--enable-static
|
|
|
|
|
|
|
|
|
|
# build program
|
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
|
|
|
|
|
|
%if "%{with_perl}" == "yes"
|
|
|
|
|
# build Perl API
|
|
|
|
|
%{l_prefix}/bin/perl-openpkg prepare
|
|
|
|
|
PATH="`pwd`/cmd/dot:$PATH"
|
|
|
|
|
%{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build
|
|
|
|
|
%{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
# install program
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
|
|
|
|
|
|
|
|
|
|
%if "%{with_perl}" == "yes"
|
|
|
|
|
# install Perl API
|
|
|
|
|
%{l_prefix}/bin/perl-openpkg -d %{SOURCE1} install
|
|
|
|
|
%{l_prefix}/bin/perl-openpkg -d %{SOURCE2} install
|
|
|
|
|
%{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# post-adjust installation
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/graphviz/*.tcl
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/graphviz/python*
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/graphviz/doc/html
|
|
|
|
|
%if "%{with_x11}" != "yes"
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/graphviz/lefty
|
|
|
|
|
%endif
|
|
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
|
|
|
for lang in lua ocaml perl php python ruby sharp tcl guile io java; do
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/graphviz/$lang 2>/dev/null || true
|
|
|
|
|
done
|
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/bin/dot_static \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/dot
|
|
|
|
|
|
|
|
|
|
# determine installation files
|
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
|
|
%{l_files_std} \
|
|
|
|
|
%if "%{with_perl}" == "yes"
|
|
|
|
|
`cat perl-openpkg-files` \
|
|
|
|
|
%endif
|
|
|
|
|
'%doc %{l_prefix}/share/graphviz/doc/pdf/*'
|
|
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|