perl-gfx.spec 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. ##
  2. ## perl-gfx.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # versions of individual parts
  24. %define V_perl 5.10
  25. %define V_image_info 1.29
  26. %define V_image_size 3.2
  27. %define V_postscript 0.06
  28. %define V_postscript_simple 0.07
  29. %define V_postscript_simple_table 1.02
  30. %define V_graph_easy 0.64
  31. %define V_graph_easy_as_svg 0.23
  32. %define V_pdf_api3 3.001
  33. %define V_pdf_api2 0.73
  34. %define V_pdf_api2_simple 1.1.4u
  35. %define V_pdf_extract 3.04b
  36. %define V_pdf_create 1.04
  37. %define V_pdf_reuse 0.35
  38. %define V_pdf_table 0.9.3
  39. # package information
  40. Name: perl-gfx
  41. Summary: Perl Modules for use with Graphics
  42. URL: http://www.cpan.org/
  43. Vendor: Perl Community
  44. Packager: OpenPKG Foundation e.V.
  45. Distribution: OpenPKG Community
  46. Class: BASE
  47. Group: Perl
  48. License: GPL/Artistic
  49. Version: %{V_perl}
  50. Release: 20090904
  51. # list of sources
  52. Source0: http://www.cpan.org/modules/by-module/Image/Image-Info-%{V_image_info}.tar.gz
  53. Source1: http://www.cpan.org/modules/by-module/Image/Image-Size-%{V_image_size}.tar.gz
  54. Source2: http://www.cpan.org/modules/by-module/PostScript/PostScript-%{V_postscript}.tar.gz
  55. Source3: http://www.cpan.org/modules/by-module/PostScript/PostScript-Simple-%{V_postscript_simple}.tar.gz
  56. Source4: http://www.cpan.org/modules/by-module/PostScript/PostScript-Simple-Table-%{V_postscript_simple_table}.tar.gz
  57. Source5: http://www.cpan.org/modules/by-module/Graph/Graph-Easy-%{V_graph_easy}.tar.gz
  58. Source6: http://www.cpan.org/modules/by-module/Graph/Graph-Easy-As_svg-%{V_graph_easy_as_svg}.tar.gz
  59. Source7: http://www.cpan.org/modules/by-module/PDF/PDF-API2-%{V_pdf_api2}.tar.gz
  60. Source8: http://www.cpan.org/modules/by-module/PDF/PDF-API2-Simple-%{V_pdf_api2_simple}.tar.gz
  61. Source9: http://www.cpan.org/modules/by-module/PDF/PDF-Extract-%{V_pdf_extract}.tar.gz
  62. Source10: http://www.cpan.org/modules/by-module/PDF/PDF-Create-%{V_pdf_create}.tar.gz
  63. Source11: http://www.cpan.org/modules/by-module/PDF/PDF-Reuse-%{V_pdf_reuse}.tar.gz
  64. Source12: http://www.cpan.org/modules/by-module/PDF/PDF-Table-%{V_pdf_table}.tar.gz
  65. Source13: http://www.cpan.org/modules/by-module/PDF/PDF-API3-%{V_pdf_api3}.tar.gz
  66. Patch0: perl-gfx.patch
  67. # build information
  68. Prefix: %{l_prefix}
  69. BuildRoot: %{l_buildroot}
  70. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  71. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  72. BuildPreReq: perl-ds, perl-comp, perl-crypto
  73. PreReq: perl-ds, perl-comp, perl-crypto
  74. AutoReq: no
  75. AutoReqProv: no
  76. %description
  77. Perl modules for use with Graphics:
  78. - Image::Info (%{V_image_info})
  79. - Image::Size (%{V_image_size})
  80. - Postscript (%{V_postscript})
  81. - Postscript::Simple (%{V_postscript_simple})
  82. - Postscript::Simple::Table (%{V_postscript_simple_table})
  83. - Graph::Easy (%{V_graph_easy})
  84. - Graph::Easy::As_svg (%{V_graph_easy_as_svg})
  85. - PDF::API3 (%{V_pdf_api3})
  86. - PDF::API2 (%{V_pdf_api2})
  87. - PDF::API2::Simple (%{V_pdf_api2_simple})
  88. - PDF::Extract (%{V_pdf_extract})
  89. - PDF::Create (%{V_pdf_create})
  90. - PDF::Reuse (%{V_pdf_reuse})
  91. - PDF::Table (%{V_pdf_table})
  92. %track
  93. prog perl-gfx:Image-Info = {
  94. version = %{V_image_info}
  95. url = http://www.cpan.org/modules/by-module/Image/
  96. regex = Image-Info-(__VER__)\.tar\.gz
  97. }
  98. prog perl-gfx:Image-Size = {
  99. version = %{V_image_size}
  100. url = http://www.cpan.org/modules/by-module/Image/
  101. regex = Image-Size-(__VER__)\.tar\.gz
  102. }
  103. prog perl-gfx:Postscript = {
  104. version = %{V_postscript}
  105. url = http://www.cpan.org/modules/by-module/PostScript/
  106. regex = PostScript-(\d+\.\d+)\.tar\.gz
  107. }
  108. prog perl-gfx:Postscript-Simple = {
  109. version = %{V_postscript_simple}
  110. url = http://www.cpan.org/modules/by-module/PostScript/
  111. regex = PostScript-Simple-(\d+\.\d+)\.tar\.gz
  112. }
  113. prog perl-gfx:Postscript-Simple-Table = {
  114. version = %{V_postscript_simple_table}
  115. url = http://www.cpan.org/modules/by-module/PostScript/
  116. regex = PostScript-Simple-Table-(\d+\.\d+)\.tar\.gz
  117. }
  118. prog perl-gfx:Graph-Easy = {
  119. version = %{V_graph_easy}
  120. url = http://www.cpan.org/modules/by-module/Graph/
  121. regex = Graph-Easy-(__VER__)\.tar\.gz
  122. }
  123. prog perl-gfx:Graph-Easy-As-SVG = {
  124. version = %{V_graph_easy_as_svg}
  125. url = http://www.cpan.org/modules/by-module/Graph/
  126. regex = Graph-Easy-As_svg-(__VER__)\.tar\.gz
  127. }
  128. prog perl-gfx:PDF-API3 = {
  129. version = %{V_pdf_api3}
  130. url = http://www.cpan.org/modules/by-module/PDF/
  131. regex = PDF-API3-(__VER__)\.tar\.gz
  132. }
  133. prog perl-gfx:PDF-API2 = {
  134. version = %{V_pdf_api2}
  135. url = http://www.cpan.org/modules/by-module/PDF/
  136. regex = PDF-API2-(__VER__)\.tar\.gz
  137. }
  138. prog perl-gfx:PDF-API2-Simple = {
  139. version = %{V_pdf_api2_simple}
  140. url = http://www.cpan.org/modules/by-module/PDF/
  141. regex = PDF-API2-Simple-(__VER__)\.tar\.gz
  142. }
  143. prog perl-gfx:PDF-Extract = {
  144. version = %{V_pdf_extract}
  145. url = http://www.cpan.org/modules/by-module/PDF/
  146. regex = PDF-Extract-(__VER__)\.tar\.gz
  147. }
  148. prog perl-gfx:PDF-Create = {
  149. version = %{V_pdf_create}
  150. url = http://www.cpan.org/modules/by-module/PDF/
  151. regex = PDF-Create-(__VER__)\.tar\.gz
  152. }
  153. prog perl-gfx:PDF-Reuse = {
  154. version = %{V_pdf_reuse}
  155. url = http://www.cpan.org/modules/by-module/PDF/
  156. regex = PDF-Reuse-(__VER__)\.tar\.gz
  157. }
  158. prog perl-gfx:PDF-Table = {
  159. version = %{V_pdf_table}
  160. url = http://www.cpan.org/modules/by-module/PDF/
  161. regex = PDF-Table-(__VER__)\.tar\.gz
  162. }
  163. %prep
  164. %setup -q -c
  165. %setup -q -T -D -a 1
  166. %setup -q -T -D -a 2
  167. %setup -q -T -D -a 3
  168. %setup -q -T -D -a 4
  169. %setup -q -T -D -a 5
  170. %setup -q -T -D -a 6
  171. %setup -q -T -D -a 7
  172. %setup -q -T -D -a 8
  173. %setup -q -T -D -a 9
  174. %setup -q -T -D -a 10
  175. %setup -q -T -D -a 11
  176. %setup -q -T -D -a 12
  177. %setup -q -T -D -a 13
  178. %patch -p0
  179. %{l_shtool} subst \
  180. -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
  181. PostScript-Simple-%{V_postscript_simple}/lib/PostScript/Simple.pm \
  182. PostScript-Simple-%{V_postscript_simple}/lib/PostScript/Simple/EPS.pm
  183. cp -rp Image-Info-*/inc PDF-API2-Simple-*/
  184. %build
  185. %install
  186. rm -rf $RPM_BUILD_ROOT
  187. %{l_prefix}/bin/perl-openpkg prepare
  188. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  189. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  190. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  191. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  192. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  193. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  194. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  195. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  196. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  197. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  198. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  199. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  200. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  201. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  202. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  203. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  204. %files -f files
  205. %clean
  206. rm -rf $RPM_BUILD_ROOT