perl-gd.spec 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. ##
  2. ## perl-gd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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. # versions of individual parts
  26. %define V_gd 1.38
  27. %define V_gdtextutil 0.82
  28. %define V_gdbarcode 1.13
  29. %define V_gdgraph 1.33
  30. %define V_gdgraph3d 0.56
  31. %define V_gdgraphmap 1.05
  32. %define V_chart 1.0.1
  33. %define V_chartpnggraph 1.21
  34. %define V_chartthreed 0.01
  35. %define V_chartplot 0.11
  36. %define V_imagetimeline 0.05
  37. # package information
  38. Name: perl-gd
  39. Summary: Perl Modules for use with GD
  40. URL: http://www.cpan.org/
  41. Vendor: Perl Community
  42. Packager: The OpenPKG Project
  43. Distribution: OpenPKG [REL]
  44. Group: Language
  45. License: GPL/Artistic
  46. Version: 20020227
  47. Release: 20020227
  48. # list of sources
  49. Source0: http://www.cpan.org/modules/by-module/GD/GD-%{V_gd}.tar.gz
  50. Source1: http://www.cpan.org/modules/by-module/GD/GDTextUtil-%{V_gdtextutil}.tar.gz
  51. Source2: http://www.cpan.org/modules/by-module/GD/GD-Barcode-%{V_gdbarcode}.tar.gz
  52. Source3: http://www.cpan.org/modules/by-module/GD/GDGraph-%{V_gdgraph}.tar.gz
  53. Source4: http://www.cpan.org/modules/by-module/GD/GDGraph3d-%{V_gdgraph3d}.tar.gz
  54. Source5: http://www.cpan.org/modules/by-module/GD/GDGraph-Map-%{V_gdgraphmap}.tgz
  55. Source6: http://www.cpan.org/modules/by-module/Chart/Chart-%{V_chart}.tar.gz
  56. Source7: http://www.cpan.org/modules/by-module/Chart/Chart-PNGgraph-%{V_chartpnggraph}.tar.gz
  57. Source8: http://www.cpan.org/modules/by-module/Chart/Chart-ThreeD-%{V_chartthreed}.tar.gz
  58. Source9: http://www.cpan.org/modules/by-module/Chart/Chart-Plot-%{V_chartplot}.tar.gz
  59. Source10: http://www.cpan.org/modules/by-module/Image/Image-Timeline-%{V_imagetimeline}.tar.gz
  60. # build information
  61. Prefix: %{l_prefix}
  62. BuildRoot: %{l_buildroot}
  63. BuildPreReq: OpenPKG, openpkg >= 20020206, perl, gd, gcc
  64. PreReq: OpenPKG, openpkg >= 20020206, perl, gd
  65. AutoReq: no
  66. AutoReqProv: no
  67. %description
  68. Various modules for using the GD library from within the Perl
  69. language plus additional functionality for drawing various types of
  70. charts and graphs.
  71. - GD (%{V_gd})
  72. - GD::TextUtil (%{V_gdtextutil})
  73. - GD::Barcode (%{V_gdbarcode})
  74. - GD::Graph (%{V_gdgraph})
  75. - GD::Graph::3d (%{V_gdgraph3d})
  76. - GD::Graph::Map (%{V_gdgraphmap})
  77. - Chart (%{V_chart})
  78. - Chart::PNGgraph (%{V_chartpnggraph})
  79. - Chart::ThreeD (%{V_chartthreed})
  80. - Chart::Plot (%{V_chartplot})
  81. - Image::Timeline (%{V_imagetimeline})
  82. %prep
  83. %setup0 -q -c -n %{name}-%{version}
  84. %setup1 -q -T -D -a 1
  85. %setup2 -q -T -D -a 2
  86. %setup3 -q -T -D -a 3
  87. %setup4 -q -T -D -a 4
  88. %setup5 -q -T -D -a 5
  89. %setup6 -q -T -D -a 6
  90. %setup7 -q -T -D -a 7
  91. %setup8 -q -T -D -a 8
  92. %setup9 -q -T -D -a 9
  93. %setup10 -q -T -D -a 10
  94. %build
  95. %install
  96. rm -rf $RPM_BUILD_ROOT
  97. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib/perl5
  98. # create a wrapper script which finds the includes
  99. eval `$perl -V:archname`
  100. perl=$RPM_BUILD_ROOT/perl
  101. echo "#!/bin/sh" >$perl
  102. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  103. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version} \\" >>$perl
  104. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{version}/${archname} \\" >>$perl
  105. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  106. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/%{version} \\" >>$perl
  107. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/%{version}/${archname} \\" >>$perl
  108. echo " \"\$@\"" >>$perl
  109. chmod a+x $perl
  110. # determine general tools and arguments
  111. perlargs="PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl"
  112. make="%{l_make} %{l_mflags}"
  113. makeargs="PERL=$perl FULLPERL=$perl"
  114. # make sure our Perl is used
  115. %{l_shtool} subst \
  116. -e "s:\$^X:'$perl':g" \
  117. `find . -name Makefile.PL -print`
  118. # build and install GD glue module
  119. ( cd GD-%{V_gd}
  120. (echo "y"; echo "y") |\
  121. GD_INC="-I%{l_prefix}/include/freetype2 -I%{l_prefix}/include" \
  122. GD_LIBS="-L%{l_prefix}/lib -lfreetype" \
  123. $perl Makefile.PL $perlargs
  124. $make $makeargs all
  125. $make $makeargs install
  126. )
  127. # build add-on modules
  128. for module in \
  129. GDTextUtil-%{V_gdtextutil} \
  130. GD-Barcode-%{V_gdbarcode} \
  131. GDGraph-%{V_gdgraph} \
  132. GDGraph3d-%{V_gdgraph3d} \
  133. GDGraph-Map-%{V_gdgraphmap} \
  134. Chart-%{V_chart} \
  135. Chart-PNGgraph-%{V_chartpnggraph} \
  136. Chart-ThreeD-%{V_chartthreed} \
  137. Chart-Plot-%{V_chartplot} \
  138. Image-Timeline-%{V_imagetimeline} \
  139. ; do
  140. cd $module
  141. $perl Makefile.PL $perlargs
  142. $make $makeargs all
  143. $make $makeargs install
  144. cd ..
  145. done
  146. # strip down installation tree
  147. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  148. find $RPM_BUILD_ROOT%{l_prefix} -name .packlist -print | xargs rm -f
  149. find $RPM_BUILD_ROOT%{l_prefix} -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
  150. # determine installed files
  151. eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  152. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  153. %{l_files_std} \
  154. '%not %dir %{l_prefix}/lib/perl5' \
  155. '%not %dir %{l_prefix}/lib/perl5/*' \
  156. "%not %dir $installarchlib" \
  157. "%not %dir $installprivlib" \
  158. "%not %dir $installsitearch" \
  159. "%not %dir $installsitelib" \
  160. "%not %dir $installarchlib/auto" \
  161. "%not %dir $installprivlib/auto" \
  162. "%not %dir $installsitearch/auto" \
  163. "%not %dir $installsitelib/auto"
  164. %files -f files
  165. %clean
  166. rm -rf $RPM_BUILD_ROOT