1 |
### RPM external graphviz 2.16.1-CMS19
|
2 |
Source: http://www.graphviz.org/pub/%{n}/ARCHIVE/%{n}-%{realversion}.tar.gz
|
3 |
Requires: expat zlib libjpg libpng
|
4 |
|
5 |
%prep
|
6 |
%setup -n %{n}-%{realversion}
|
7 |
|
8 |
%build
|
9 |
case %cmsplatf in
|
10 |
*_ia32_*)
|
11 |
export LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | sed -e 's|lib64|lib|g'`
|
12 |
;;
|
13 |
esac
|
14 |
./configure \
|
15 |
--with-expatlibdir=$EXPAT_ROOT/lib \
|
16 |
--with-expatincludedir=$EXPAT_ROOT/include \
|
17 |
--with-zincludedir=$ZLIB_ROOT/include \
|
18 |
--with-zlibdir=$ZLIB_ROOT/lib \
|
19 |
--with-pngincludedir=$LIBJPG_ROOT/include \
|
20 |
--with-pnglibdir=$LIBJPG_ROOT/lib \
|
21 |
--with-jpegincludedir=$LIBPNG_ROOT/include \
|
22 |
--with-jpeglibdir=$LIBPNG_ROOT/lib \
|
23 |
--without-x \
|
24 |
--without-tclsh \
|
25 |
--without-tcl \
|
26 |
--without-fontconfig \
|
27 |
--without-tk \
|
28 |
--without-perl \
|
29 |
--without-python \
|
30 |
--without-ruby \
|
31 |
--disable-ruby \
|
32 |
--disable-perl \
|
33 |
--without-pangocairo \
|
34 |
--without-freetype \
|
35 |
--without-fontconfig \
|
36 |
--without-gdk-pixbuf \
|
37 |
--disable-sharp \
|
38 |
--disable-guile \
|
39 |
--disable-java \
|
40 |
--disable-lua \
|
41 |
--disable-ocaml \
|
42 |
--disable-perl \
|
43 |
--disable-php \
|
44 |
--disable-python \
|
45 |
--prefix=%{i}
|
46 |
# This is a workaround for the fact that sort from coreutils 5.96 doesn't
|
47 |
# like "sort +0 -1", not really something specific to ppc64/ydl5.0
|
48 |
if [ "$(uname -m)" == "ppc64" ]
|
49 |
then
|
50 |
perl -p -i -e "s|\+0 \-1|-k1,1|g" dotneato/common/Makefile
|
51 |
fi
|
52 |
# Probably the configure should just be remade on Darwin, but it builds
|
53 |
# as-is with this small cleanup
|
54 |
%ifos darwin
|
55 |
perl -p -i -e "s|-lexpat||g" configure
|
56 |
%endif
|
57 |
make
|
58 |
|
59 |
%install
|
60 |
make install
|
61 |
# SCRAM ToolBox toolfile
|
62 |
mkdir -p %i/etc/scram.d
|
63 |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
|
64 |
<doc type=BuildSystem::ToolDoc version=1.0>
|
65 |
<Tool name=%n version=%v>
|
66 |
<info url="http://www.research.att.com/sw/tools/graphviz/"></info>
|
67 |
<Client>
|
68 |
<Environment name=GRAPHVIZ_BASE default="%i"></Environment>
|
69 |
<Environment name=GRAPHVIZ_BINDIR default="$GRAPHVIZ_BASE/bin"></Environment>
|
70 |
<Environment name=LIBDIR default="$GRAPHVIZ_BASE/lib/graphviz"></Environment>
|
71 |
</Client>
|
72 |
<Runtime name=PATH value="$GRAPHVIZ_BINDIR" type=path>
|
73 |
<Use name=expat>
|
74 |
<Use name=zlib>
|
75 |
<Use name=libjpg>
|
76 |
<use name=libpng>
|
77 |
</Tool>
|
78 |
EOF_TOOLFILE
|
79 |
|
80 |
%post
|
81 |
# It appears one needs to list at least one explicitly as the macro adds
|
82 |
# the prefix, but then the find can add it and the others (also with the
|
83 |
# prefix)
|
84 |
%{relocateConfig}/lib/libgraph.la `find $RPM_INSTALL_PREFIX/%pkgrel/lib -name *.la`
|
85 |
%{relocateConfig}etc/scram.d/%n
|