perl-sys.spec 5.2 KB

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