perl-www.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ##
  2. ## perl-www.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. # package information
  26. Name: perl-www
  27. Summary: Perl Module for WWW client and server behavior
  28. URL: http://www.cpan.org/
  29. Vendor: Perl Community
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: Language
  33. License: GPL/Artistic
  34. Version: 5.64
  35. Release: 20020306
  36. # list of sources
  37. Source0: ftp://ftp.cpan.org/pub/CPAN/modules/by-module/WWW/libwww-perl-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20020206, perl
  42. PreReq: OpenPKG, openpkg >= 20020206, perl
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. The libwww-perl collection is a set of Perl modules which provides
  47. a simple and consistent application programming interface to the
  48. World-Wide Web.
  49. #URI::Attr
  50. #URI::Escape
  51. #URI::URL
  52. #HTML::Entities
  53. #HTML::Formatter
  54. #HTML::HeadParser
  55. #HTML::LinkExtor
  56. #HTML::Parser
  57. #HTML::TokeParser
  58. #HTTP::Cookies
  59. #HTTP::Daemon
  60. #HTTP::Date
  61. #HTTP::Headers
  62. #HTTP::Message
  63. #HTTP::Negotiate
  64. #HTTP::Request
  65. #HTTP::Response
  66. #HTTP::Status
  67. #HTTP::Request::Common
  68. #WWW::RobotRules
  69. #LWP::Conn
  70. #LWP::MediaTypes
  71. #LWP::Protocol
  72. #LWP::RobotUA
  73. #LWP::Simple
  74. #LWP::UA
  75. #LWP::UserAgent
  76. %prep
  77. %setup -q -c -n %{name}-%{version}
  78. %build
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. %{l_shtool} mkdir -f -p -m 755 \
  82. $RPM_BUILD_ROOT%{l_prefix}/lib/perl5 \
  83. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  84. $RPM_BUILD_ROOT%{l_prefix}/man/man3
  85. # we only have one library and therefore one subdirectory
  86. cd `echo "%{SOURCE0}" | sed -e 's;^.*/\([^/]*\)\.tar\.gz$;\1;'`
  87. # make sure our Perl is used
  88. # FIXME, is this redundant or necessary?
  89. perl=%{l_prefix}/bin/perl
  90. %{l_shtool} subst \
  91. -e "s:\$^X:'$perl':g" \
  92. `find . -name Makefile.PL -print`
  93. # build LWP
  94. ( echo "INCLUDE = %{l_prefix}/include"
  95. echo "LIB = %{l_prefix}/lib"
  96. ) >config.in
  97. perlargs="PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl"
  98. $perl Makefile.PL $perlargs </dev/null
  99. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  100. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  101. cd ..
  102. # strip down installation tree
  103. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  104. find $RPM_BUILD_ROOT%{l_prefix} -name .packlist -print | xargs rm -f
  105. find $RPM_BUILD_ROOT%{l_prefix} -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
  106. # determine installed files
  107. eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  109. %{l_files_std} \
  110. '%not %dir %{l_prefix}/lib/perl5' \
  111. '%not %dir %{l_prefix}/lib/perl5/*' \
  112. "%not %dir $installarchlib" \
  113. "%not %dir $installprivlib" \
  114. "%not %dir $installsitearch" \
  115. "%not %dir $installsitelib" \
  116. "%not %dir $installarchlib/auto" \
  117. "%not %dir $installprivlib/auto" \
  118. "%not %dir $installsitearch/auto" \
  119. "%not %dir $installsitelib/auto"
  120. %files -f files
  121. %clean
  122. rm -rf $RPM_BUILD_ROOT