perl-mail.spec 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. ##
  2. ## perl-mail.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_base64 2.12
  27. %define V_sendmail 0.78
  28. %define V_mailtools 1.48
  29. %define V_mimetools 5.411
  30. %define V_mimelite 2.117
  31. # package information
  32. Name: perl-mail
  33. Summary: Perl Modules for use with email
  34. URL: http://www.cpan.org/
  35. Vendor: Perl Community
  36. Packager: The OpenPKG Project
  37. Distribution: OpenPKG [REL]
  38. Group: Language
  39. License: GPL/Artistic
  40. Version: 20020808
  41. Release: 20020808
  42. # list of sources
  43. Source0: http://www.cpan.org/modules/by-module/MIME/MIME-Base64-%{V_base64}.tar.gz
  44. Source1: http://www.cpan.org/modules/by-module/Mail/Mail-Sendmail-%{V_sendmail}.tar.gz
  45. Source2: http://www.cpan.org/modules/by-module/Mail/MailTools-%{V_mailtools}.tar.gz
  46. Source3: http://www.cpan.org/modules/by-module/MIME/MIME-tools-%{V_mimetools}.tar.gz
  47. Source4: http://www.cpan.org/modules/by-module/MIME/MIME-Lite-%{V_mimelite}.tar.gz
  48. # build information
  49. Prefix: %{l_prefix}
  50. BuildRoot: %{l_buildroot}
  51. BuildPreReq: OpenPKG, openpkg >= 20020206, perl, perl-ds
  52. PreReq: OpenPKG, openpkg >= 20020206, perl, perl-ds
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. Perl modules for use with email:
  57. - MIME::Base64 (%{V_base64})
  58. - Mail::Sendmail (%{V_sendmail})
  59. - Mail::Address (%{V_mailtools})
  60. - Mail::Cap (%{V_mailtools})
  61. - Mail::Field (%{V_mailtools})
  62. - Mail::Filter (%{V_mailtools})
  63. - Mail::Header (%{V_mailtools})
  64. - Mail::Internet (%{V_mailtools})
  65. - Mail::Mailer (%{V_mailtools})
  66. - Mail::Send (%{V_mailtools})
  67. - Mail::Util (%{V_mailtools})
  68. - Mail::Field::AddrList (%{V_mailtools})
  69. - Mail::Field::Date (%{V_mailtools})
  70. - Mail::Mailer::mail (%{V_mailtools})
  71. - Mail::Mailer::qmail (%{V_mailtools})
  72. - Mail::Mailer::rfc822 (%{V_mailtools})
  73. - Mail::Mailer::sendmail (%{V_mailtools})
  74. - Mail::Mailer::smtp (%{V_mailtools})
  75. - Mail::Mailer::test (%{V_mailtools})
  76. - MIME::Body (%{V_mimetools})
  77. - MIME::Entity (%{V_mimetools})
  78. - MIME::Head (%{V_mimetools})
  79. - MIME::Parser (%{V_mimetools})
  80. - MIME::Tools (%{V_mimetools})
  81. - MIME::WordDecoder (%{V_mimetools})
  82. - MIME::Words (%{V_mimetools})
  83. - MIME::Decoder::Base64 (%{V_mimetools})
  84. - MIME::Decoder::Binary (%{V_mimetools})
  85. - MIME::Decoder::Gzip64 (%{V_mimetools})
  86. - MIME::Decoder::NBit (%{V_mimetools})
  87. - MIME::Decoder::QuotedPrint (%{V_mimetools})
  88. - MIME::Decoder::UU (%{V_mimetools})
  89. - MIME::Field::ConTraEnc (%{V_mimetools})
  90. - MIME::Field::ContDisp (%{V_mimetools})
  91. - MIME::Field::ContType (%{V_mimetools})
  92. - MIME::Field::ParamVal (%{V_mimetools})
  93. - MIME::Parser::Filer (%{V_mimetools})
  94. - MIME::Parser::Reader (%{V_mimetools})
  95. - MIME::Parser::Results (%{V_mimetools})
  96. - MIME::Lite (%{V_mimelite})
  97. %prep
  98. %setup0 -q -c -n %{name}-%{version}
  99. %setup1 -q -T -D -a 1
  100. %setup2 -q -T -D -a 2
  101. %setup3 -q -T -D -a 3
  102. %setup4 -q -T -D -a 4
  103. %build
  104. %install
  105. rm -rf $RPM_BUILD_ROOT
  106. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib/perl5
  107. # create a wrapper script which finds the includes
  108. eval `%{l_prefix}/bin/perl -V:version -V:archname`
  109. perl=$RPM_BUILD_ROOT/perl
  110. echo "#!/bin/sh" >$perl
  111. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  112. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
  113. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
  114. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  115. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
  116. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
  117. echo " \"\$@\"" >>$perl
  118. chmod a+x $perl
  119. # uncompress and build modules
  120. for mod in %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4}; do
  121. dir=`echo "$mod" | sed -e 's;^.*/\([^/]*\)\.tar\.gz$;\1;'`
  122. cd $dir
  123. chmod -R u+rw .
  124. cp Makefile.PL Makefile.PL.orig
  125. sed -e "s:\$^X:'$perl':g" <Makefile.PL.orig >Makefile.PL
  126. $perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
  127. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  128. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  129. cd ..
  130. done
  131. # clean up
  132. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  133. find $RPM_BUILD_ROOT%{l_prefix} -name .packlist -print | xargs rm -f
  134. find $RPM_BUILD_ROOT%{l_prefix} -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
  135. # avoid conflicts
  136. eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  137. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  138. %{l_files_std} \
  139. '%not %dir %{l_prefix}/lib/perl5' \
  140. '%not %dir %{l_prefix}/lib/perl5/*' \
  141. "%not %dir $installarchlib" \
  142. "%not %dir $installprivlib" \
  143. "%not %dir $installsitearch" \
  144. "%not %dir $installsitelib" \
  145. "%not %dir $installarchlib/auto" \
  146. "%not %dir $installprivlib/auto" \
  147. "%not %dir $installsitearch/auto" \
  148. "%not %dir $installsitelib/auto"
  149. %files -f files
  150. %clean
  151. rm -rf $RPM_BUILD_ROOT