graphviz.spec 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. ##
  2. ## graphviz.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package versions
  26. %define V_graphviz 2.0
  27. %define V_graphviz_perl_base 2.02
  28. %define V_graphviz_perl_data_structure 0.12
  29. # package information
  30. Name: graphviz
  31. Summary: Graph Visualization Tool
  32. URL: http://www.graphviz.org/
  33. Vendor: AT&T
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG
  36. Class: BASE
  37. Group: Graphics
  38. License: GPL
  39. Version: %{V_graphviz}
  40. Release: 20050114
  41. # package options
  42. %option with_x11 yes
  43. %option with_perl no
  44. # list of sources
  45. Source0: http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-%{V_graphviz}.tar.gz
  46. Source1: http://www.cpan.org/modules/by-module/GraphViz/GraphViz-%{V_graphviz_perl_base}.tar.gz
  47. Source2: http://www.cpan.org/modules/by-module/GraphViz/GraphViz-Data-Structure-%{V_graphviz_perl_data_structure}.tar.gz
  48. Patch0: graphviz.patch
  49. # build information
  50. Prefix: %{l_prefix}
  51. BuildRoot: %{l_buildroot}
  52. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, flex, bison
  53. PreReq: OpenPKG, openpkg >= 20040130
  54. BuildPreReq: freetype, fontconfig, png, jpeg, gd
  55. PreReq: freetype, fontconfig, png, jpeg, gd
  56. %if "%{with_x11}" == "yes"
  57. BuildPreReq: X11
  58. PreReq: X11
  59. %endif
  60. %if "%{with_perl}" == "yes"
  61. BuildPreReq: perl, perl-sys, perl-openpkg
  62. PreReq: perl, perl-sys
  63. %endif
  64. AutoReq: no
  65. AutoReqProv: no
  66. %description
  67. Graphviz is a set of graph drawing tools. Graph drawing addresses
  68. the problem of visualizing structural information by constructing
  69. geometric representations of abstract graphs and networks.
  70. Automatic generation of graph drawings has important applications
  71. in key technologies such as database design, software engineering,
  72. VLSI and network design and visual interfaces in other domains.
  73. %track
  74. prog graphviz = {
  75. version = %{V_graphviz}
  76. url = http://www.graphviz.org/pub/graphviz/ARCHIVE/
  77. regex = graphviz-(\d+\.\d+(\.\d+)*)\.tar.gz
  78. }
  79. prog graphviz:GraphViz = {
  80. version = %{V_graphviz_perl_base}
  81. url = http://www.cpan.org/modules/by-module/GraphViz/
  82. regex = GraphViz-(__VER__)\.tar\.gz
  83. }
  84. prog graphviz:GraphViz-Data-Structure = {
  85. version = %{V_graphviz_perl_data_structure}
  86. url = http://www.cpan.org/modules/by-module/GraphViz/
  87. regex = GraphViz-Data-Structure-(__VER__)\.tar\.gz
  88. }
  89. %prep
  90. %setup -q
  91. %setup -q -D -T -a 1
  92. %setup -q -D -T -a 2
  93. %patch -p0
  94. %build
  95. # configure program
  96. CC="%{l_cc}" \
  97. CFLAGS="%{l_cflags -O}" \
  98. LDFLAGS="%{l_ldflags}" \
  99. ./configure \
  100. --prefix=%{l_prefix} \
  101. --with-extraincludedir=%{l_prefix}/include \
  102. --with-extralibdir=%{l_prefix}/lib \
  103. --with-fontconfigincludedir=%{l_prefix}/include \
  104. --with-fontconfiglibdir=%{l_prefix}/lib \
  105. --with-freetypeincludedir=%{l_prefix}/include \
  106. --with-freetypelibdir=%{l_prefix}/lib \
  107. --with-pngincludedir=%{l_prefix}/include \
  108. --with-pnglibdir=%{l_prefix}/lib \
  109. --with-jpegincludedir=%{l_prefix}/include \
  110. --with-jpeglibdir=%{l_prefix}/lib \
  111. --with-gdincludedir=%{l_prefix}/include \
  112. --with-gdlibdir=%{l_prefix}/lib \
  113. --with-zincludedir=%{l_prefix}/include \
  114. --with-zlibdir=%{l_prefix}/lib \
  115. --without-tclsh \
  116. --without-wish \
  117. %if "%{with_x11}" == "yes"
  118. --with-x \
  119. --x-includes=`%{l_rc} --query x11_incdir` \
  120. --x-libraries=`%{l_rc} --query x11_libdir` \
  121. %else
  122. --without-x \
  123. %endif
  124. --disable-shared \
  125. --enable-static
  126. # build program
  127. %{l_make} %{l_mflags}
  128. %if "%{with_perl}" == "yes"
  129. # build Perl API
  130. %{l_prefix}/bin/perl-openpkg prepare
  131. PATH="`pwd`/dotneato:$PATH"
  132. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build
  133. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build
  134. %endif
  135. %install
  136. # install program
  137. rm -rf $RPM_BUILD_ROOT
  138. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  139. %if "%{with_perl}" == "yes"
  140. # install Perl API
  141. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} install
  142. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} install
  143. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  144. %endif
  145. # post-adjust installation
  146. mv $RPM_BUILD_ROOT%{l_prefix}/lib/graphviz/pkgconfig \
  147. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
  148. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/graphviz/*.tcl
  149. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/graphviz/doc/html
  150. %if "%{with_x11}" != "yes"
  151. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/graphviz/lefty
  152. %endif
  153. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  154. # determine installation files
  155. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  156. %{l_files_std} \
  157. %if "%{with_perl}" == "yes"
  158. `cat perl-openpkg-files` \
  159. %endif
  160. '%doc %{l_prefix}/share/graphviz/doc/pdf/*'
  161. %files -f files
  162. %clean
  163. rm -rf $RPM_BUILD_ROOT