perl-parse.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ##
  2. ## perl-parse.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_config_inifiles 2.29
  27. %define V_config_general 2.08
  28. %define V_config_simple 2.82
  29. %define V_parse_recdescent 1.80
  30. %define V_parse_lex 2.15
  31. # package information
  32. Name: perl-parse
  33. Summary: Perl Modules for use with parsing algorythms
  34. URL: http://www.cpan.org/
  35. Vendor: Perl Community
  36. Packager: The OpenPKG Project
  37. Distribution: OpenPKG [BASE]
  38. Group: Language
  39. License: GPL/Artistic
  40. Version: 20020919
  41. Release: 20020919
  42. # list of sources
  43. Source0: http://www.cpan.org/modules/by-module/Config/Config-IniFiles-%{V_config_inifiles}.tar.gz
  44. Source1: http://www.cpan.org/modules/by-module/Config/Config-General-%{V_config_general}.tar.gz
  45. Source2: http://www.cpan.org/modules/by-module/Config/Config-Simple-%{V_config_simple}.tar.gz
  46. Source3: http://www.cpan.org/modules/by-module/Parse/Parse-RecDescent-%{V_parse_recdescent}.tar.gz
  47. Source4: http://www.cpan.org/modules/by-module/Parse/ParseLex-%{V_parse_lex}.tar.gz
  48. # build information
  49. Prefix: %{l_prefix}
  50. BuildRoot: %{l_buildroot}
  51. BuildPreReq: OpenPKG, openpkg >= 20020206, perl
  52. PreReq: OpenPKG, openpkg >= 20020206, perl
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. Perl modules for use with parsing algorythms:
  57. - Config::IniFiles (%{V_config_inifiles})
  58. - Config::General (%{V_config_general})
  59. - Parse::RecDescent (%{V_parse_recdescent})
  60. - Parse::Nibbler (%{V_parse_nibbler})
  61. %prep
  62. %setup0 -q -c -n %{name}-%{version}
  63. %setup1 -q -T -D -a 1
  64. %setup2 -q -T -D -a 2
  65. %setup3 -q -T -D -a 3
  66. %setup4 -q -T -D -a 4
  67. %build
  68. %install
  69. rm -rf $RPM_BUILD_ROOT
  70. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib/perl5
  71. # create a wrapper script which finds the includes
  72. eval `%{l_prefix}/bin/perl -V:version -V:archname`
  73. perl=$RPM_BUILD_ROOT/perl
  74. echo "#!/bin/sh" >$perl
  75. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  76. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
  77. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
  78. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  79. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
  80. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
  81. echo " \"\$@\"" >>$perl
  82. chmod a+x $perl
  83. # uncompress and build modules
  84. for mod in %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4}; do
  85. dir=`echo "$mod" | sed -e 's;^.*/\([^/]*\)\.tar\.gz$;\1;'`
  86. cd $dir
  87. chmod -R u+rw .
  88. cp Makefile.PL Makefile.PL.orig
  89. sed -e "s:\$^X:'$perl':g" <Makefile.PL.orig >Makefile.PL
  90. $perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
  91. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  92. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  93. cd ..
  94. done
  95. # clean up
  96. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  97. find $RPM_BUILD_ROOT%{l_prefix} -name .packlist -print | xargs rm -f
  98. find $RPM_BUILD_ROOT%{l_prefix} -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
  99. # avoid conflicts
  100. eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  101. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  102. %{l_files_std} \
  103. '%not %dir %{l_prefix}/lib/perl5' \
  104. '%not %dir %{l_prefix}/lib/perl5/*' \
  105. "%not %dir $installarchlib" \
  106. "%not %dir $installprivlib" \
  107. "%not %dir $installsitearch" \
  108. "%not %dir $installsitelib" \
  109. "%not %dir $installarchlib/auto" \
  110. "%not %dir $installprivlib/auto" \
  111. "%not %dir $installsitearch/auto" \
  112. "%not %dir $installsitelib/auto"
  113. %files -f files
  114. %clean
  115. rm -rf $RPM_BUILD_ROOT