perl-net.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. ##
  2. ## perl-net.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_daemon 0.36
  27. %define V_server 0.82
  28. %define V_ext 1.011
  29. %define V_libnet 1.11
  30. %define V_netmask 1.9002
  31. %define V_netftp 2.9
  32. # package information
  33. Name: perl-net
  34. Summary: Perl Modules for use with networks
  35. URL: http://www.cpan.org/
  36. Vendor: Perl Community
  37. Packager: The OpenPKG Project
  38. Distribution: OpenPKG [REL]
  39. Group: Language
  40. License: GPL/Artistic
  41. Version: 20020517
  42. Release: 20020517
  43. # list of sources
  44. Source0: http://www.cpan.org/modules/by-module/Net/Net-Daemon-%{V_daemon}.tar.gz
  45. Source1: http://www.cpan.org/modules/by-module/Net/Net-Server-%{V_server}.tar.gz
  46. Source2: http://www.cpan.org/modules/by-module/Net/Net-ext-%{V_ext}.tar.gz
  47. Source3: http://www.cpan.org/modules/by-module/Net/libnet-%{V_libnet}.tar.gz
  48. Source4: http://www.cpan.org/modules/by-module/Net/Net-Netmask-%{V_netmask}.tar.gz
  49. Source5: http://www.cpan.org/modules/by-module/Net/Net-FTP-Common-%{V_netftp}.tar.gz
  50. # build information
  51. Prefix: %{l_prefix}
  52. BuildRoot: %{l_buildroot}
  53. BuildPreReq: OpenPKG, openpkg >= 20020206, perl
  54. PreReq: OpenPKG, openpkg >= 20020206, perl
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. Perl modules for use with networks:
  59. - Net::Daemon (%{V_daemon})
  60. - Net::Server (%{V_server})
  61. - Net::Gen (%{V_ext})
  62. - Net::Inet (%{V_ext})
  63. - Net::TCP (%{V_ext})
  64. - Net::UDP (%{V_ext})
  65. - Net::UNIX (%{V_ext})
  66. - Net::TCP::Server (%{V_ext})
  67. - Net::UNIX::Server (%{V_ext})
  68. - Net::FTP (%{V_libnet})
  69. - Net::SMTP (%{V_libnet})
  70. - Net::Time (%{V_libnet})
  71. - Net::Time (%{V_libnet})
  72. - Net::NNTP (%{V_libnet})
  73. - Net::POP3 (%{V_libnet})
  74. - Net::SNPP (%{V_libnet})
  75. - Net::Netmask (%{V_netmask})
  76. - Net::FTP::Common (%{V_netftp})
  77. %prep
  78. %setup0 -q -c -n %{name}-%{version}
  79. %setup1 -q -T -D -a 1
  80. %setup2 -q -T -D -a 2
  81. %setup3 -q -T -D -a 3
  82. %setup4 -q -T -D -a 4
  83. %setup5 -q -T -D -a 5
  84. %build
  85. %install
  86. rm -rf $RPM_BUILD_ROOT
  87. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib/perl5
  88. # create a wrapper script which finds the includes
  89. eval `%{l_prefix}/bin/perl -V:version -V:archname`
  90. perl=$RPM_BUILD_ROOT/perl
  91. echo "#!/bin/sh" >$perl
  92. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  93. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
  94. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
  95. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  96. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
  97. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
  98. echo " \"\$@\"" >>$perl
  99. chmod a+x $perl
  100. # uncompress and build modules
  101. for mod in %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5}; do
  102. dir=`echo "$mod" | sed -e 's;^.*/\([^/]*\)\.tar\.gz$;\1;'`
  103. cd $dir
  104. chmod -R u+rw .
  105. cp Makefile.PL Makefile.PL.orig
  106. sed -e "s:\$^X:'$perl':g" <Makefile.PL.orig >Makefile.PL
  107. $perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
  108. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  109. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  110. cd ..
  111. done
  112. # clean up
  113. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  114. find $RPM_BUILD_ROOT%{l_prefix} -name .packlist -print | xargs rm -f
  115. find $RPM_BUILD_ROOT%{l_prefix} -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
  116. # avoid conflicts
  117. eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  118. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  119. %{l_files_std} \
  120. '%not %dir %{l_prefix}/lib/perl5' \
  121. '%not %dir %{l_prefix}/lib/perl5/*' \
  122. "%not %dir $installarchlib" \
  123. "%not %dir $installprivlib" \
  124. "%not %dir $installsitearch" \
  125. "%not %dir $installsitelib" \
  126. "%not %dir $installarchlib/auto" \
  127. "%not %dir $installprivlib/auto" \
  128. "%not %dir $installsitearch/auto" \
  129. "%not %dir $installsitelib/auto"
  130. %files -f files
  131. %clean
  132. rm -rf $RPM_BUILD_ROOT