| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- ##
- ## graphviz.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
- ##
- ## 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.6
- %define V_graphviz_perl_base 2.02
- %define V_graphviz_perl_data_structure 0.12
- # package information
- Name: graphviz
- Summary: Graph Visualization Tool
- URL: http://www.graphviz.org/
- Vendor: AT&T
- Packager: OpenPKG
- Distribution: OpenPKG
- Class: BASE
- Group: Graphics
- License: GPL
- Version: %{V_graphviz}
- Release: 20050828
- # package options
- %option with_x11 yes
- %option with_perl no
- # list of sources
- Source0: http://www.graphviz.org/pub/graphviz/ARCHIVE/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
- PreReq: OpenPKG, openpkg >= 20040130
- BuildPreReq: freetype, png, jpeg, gd
- PreReq: freetype, png, 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
- 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/ARCHIVE/
- 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} \
- --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 \
- --with-gdincludedir=%{l_prefix}/include \
- --with-gdlibdir=%{l_prefix}/lib \
- --with-zincludedir=%{l_prefix}/include \
- --with-zlibdir=%{l_prefix}/lib \
- --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
- --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`/dotneato:$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}/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
- # 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
|