perl-inline.spec 4.1 KB

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