graphviz.spec 6.0 KB

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