perl-inline.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ##
  2. ## perl-inline.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 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. # versions of individual parts
  25. %define V_perl 5.10.0
  26. %define V_inline 0.44
  27. %define V_inline_cpp 0.25
  28. %define V_inline_struct 0.06
  29. # package information
  30. Name: perl-inline
  31. Summary: Perl Modules for Inline Programming Language Embedding
  32. URL: http://www.cpan.org/
  33. Vendor: Perl Community
  34. Packager: OpenPKG Foundation e.V.
  35. Distribution: OpenPKG Community
  36. Class: BASE
  37. Group: Perl
  38. License: GPL/Artistic
  39. Version: %{V_perl}
  40. Release: 20071219
  41. # list of sources
  42. Source0: http://www.cpan.org/modules/by-module/Inline/Inline-%{V_inline}.tar.gz
  43. Source1: http://www.cpan.org/modules/by-module/Inline/Inline-CPP-%{V_inline_cpp}.tar.gz
  44. Source2: http://www.cpan.org/modules/by-module/Inline/Inline-Struct-%{V_inline_struct}.tar.gz
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  49. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  50. BuildPreReq: perl-crypto, perl-parse
  51. PreReq: perl-crypto, perl-parse
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. Perl modules for inline programing language embedding.
  56. - Inline (%{V_inline})
  57. - Inline::CPP (%{V_inline_cpp})
  58. - Inline::Struct (%{V_inline_struct})
  59. %track
  60. prog perl-inline:Inline = {
  61. version = %{V_inline}
  62. url = http://www.cpan.org/modules/by-module/Inline/
  63. regex = Inline-(__VER__)\.tar\.gz
  64. }
  65. prog perl-inline:Inline-CPP = {
  66. version = %{V_inline_cpp}
  67. url = http://www.cpan.org/modules/by-module/Inline/
  68. regex = Inline-CPP-(__VER__)\.tar\.gz
  69. }
  70. prog perl-inline:Inline-Struct = {
  71. version = %{V_inline_struct}
  72. url = http://www.cpan.org/modules/by-module/Inline/
  73. regex = Inline-Struct-(__VER__)\.tar\.gz
  74. }
  75. %prep
  76. %setup -q -c
  77. %setup -q -T -D -a 1
  78. %setup -q -T -D -a 2
  79. %build
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. %{l_prefix}/bin/perl-openpkg prepare
  83. # build and install Inline module
  84. %{l_shtool} subst \
  85. -e 's/my $default[^;]*;/my $default = "y";/' \
  86. Inline-%{V_inline}/C/Makefile.PL
  87. %{l_prefix}/bin/perl-openpkg -d Inline-%{V_inline} configure build install
  88. # build and install Inline::CPP module
  89. %{l_shtool} subst \
  90. -e 's:$cc_guess);:"%{l_prefix}/bin/g++");:' \
  91. -e 's:$libs_guess);:"-lstdc++");:' \
  92. Inline-CPP-%{V_inline_cpp}/Makefile.PL
  93. %{l_prefix}/bin/perl-openpkg -d Inline-CPP-%{V_inline_cpp} configure build install
  94. # build and install Inline::Struct module
  95. %{l_prefix}/bin/perl-openpkg -d Inline-Struct-%{V_inline_struct} configure build install
  96. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  98. %files -f files
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT