perl-crypto.spec 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. ##
  2. ## perl-crypto.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 P_archname i386-freebsd
  27. %define V_perl 5.6.1
  28. %define V_digest_sha1 2.01
  29. %define V_class_loader 2.02
  30. %define V_digest_md2 2.00
  31. %define V_digest_md4 1.1
  32. %define V_digest_md5 2.20
  33. %define V_digest_hmac 1.01
  34. %define V_crypt_ripemd160 0.04
  35. %define V_crypt_enigma 1.3
  36. %define V_crypt_unixcrypt 1.0
  37. %define V_crypt_passwdmd5 1.2
  38. %define V_crypt_des 2.03
  39. %define V_crypt_des_ede3 0.01
  40. %define V_crypt_rc4 2.02
  41. %define V_crypt_rc5 1.01
  42. %define V_crypt_rc6 1.0
  43. %define V_crypt_ghost 1.00
  44. %define V_crypt_blowfish 2.09
  45. %define V_crypt_twofish 2.12
  46. %define V_crypt_rot13 0.04
  47. %define V_crypt_null 1.02
  48. %define V_crypt_ecb 1.1
  49. %define V_crypt_cbc 2.02
  50. #%define V_crypt_cbceasy 0.24
  51. #%define V_crypt_random 1.11
  52. # package information
  53. Name: perl-crypto
  54. Summary: Perl Modules for use with cryptography
  55. URL: http://www.cpan.org/
  56. Vendor: Perl Community
  57. Packager: The OpenPKG Project
  58. Distribution: OpenPKG [REL]
  59. Group: Language
  60. License: GPL/Artistic
  61. Version: 20020512
  62. Release: 20020512
  63. # list of sources
  64. Source0: http://www.cpan.org/modules/by-module/Digest/Digest-SHA1-%{V_digest_sha1}.tar.gz
  65. Source1: http://www.cpan.org/modules/by-module/Class/Class-Loader-%{V_class_loader}.tar.gz
  66. Source2: http://www.cpan.org/modules/by-module/Digest/Digest-MD2-%{V_digest_md2}.tar.gz
  67. Source3: http://www.cpan.org/modules/by-module/Digest/Digest-MD4-%{V_digest_md4}.tar.gz
  68. Source4: http://www.cpan.org/modules/by-module/Digest/Digest-MD5-%{V_digest_md5}.tar.gz
  69. Source5: http://www.cpan.org/modules/by-module/Digest/Digest-HMAC-%{V_digest_hmac}.tar.gz
  70. Source6: http://www.cpan.org/modules/by-module/Crypt/Crypt-RIPEMD160-%{V_crypt_ripemd160}.tar.gz
  71. Source7: http://www.cpan.org/modules/by-module/Crypt/Crypt-Enigma-%{V_crypt_enigma}.tar.gz
  72. Source8: http://www.cpan.org/modules/by-module/Crypt/Crypt-UnixCrypt-%{V_crypt_unixcrypt}.tar.gz
  73. Source9: http://www.cpan.org/modules/by-module/Crypt/Crypt-PasswdMD5-%{V_crypt_passwdmd5}.tar.gz
  74. Source10: http://www.cpan.org/modules/by-module/Crypt/Crypt-DES-%{V_crypt_des}.tar.gz
  75. Source11: http://www.cpan.org/modules/by-module/Crypt/Crypt-DES_EDE3-%{V_crypt_des_ede3}.tar.gz
  76. Source12: http://www.cpan.org/modules/by-module/Crypt/Crypt-RC4-%{V_crypt_rc4}.tar.gz
  77. Source13: http://www.cpan.org/modules/by-module/Crypt/Crypt-RC5-%{V_crypt_rc5}.tar.gz
  78. Source14: http://www.cpan.org/modules/by-module/Crypt/Crypt-RC6-%{V_crypt_rc6}.tar.gz
  79. Source15: http://www.cpan.org/modules/by-module/Crypt/Crypt-GOST-%{V_crypt_ghost}.tar.gz
  80. Source16: http://www.cpan.org/modules/by-module/Crypt/Crypt-Blowfish-%{V_crypt_blowfish}.tar.gz
  81. Source17: http://www.cpan.org/modules/by-module/Crypt/Crypt-Twofish-%{V_crypt_twofish}.tar.gz
  82. Source18: http://www.cpan.org/modules/by-module/Crypt/Crypt-Rot13-%{V_crypt_rot13}.tar.gz
  83. Source19: http://www.cpan.org/modules/by-module/Crypt/Crypt-NULL-%{V_crypt_null}.tar.gz
  84. Source20: http://www.cpan.org/modules/by-module/Crypt/Crypt-ECB-%{V_crypt_ecb}.tar.gz
  85. Source21: http://www.cpan.org/modules/by-module/Crypt/Crypt-CBC-%{V_crypt_cbc}.tar.gz
  86. #Source22: http://www.cpan.org/modules/by-module/Crypt/Crypt-CBCeasy-%{V_crypt_cbceasy}.tar.gz
  87. #Source23: http://www.cpan.org/modules/by-module/Crypt/Crypt-Random-%{V_crypt_random}.tar.gz
  88. # build information
  89. Prefix: %{l_prefix}
  90. BuildRoot: %{l_buildroot}
  91. BuildPreReq: OpenPKG, openpkg >= 20020206, perl, gcc, gzip
  92. PreReq: OpenPKG, openpkg >= 20020206, perl
  93. AutoReq: no
  94. AutoReqProv: no
  95. %description
  96. Perl module bundle related to Cryptography.
  97. - Digest::SHA1 (%{V_digest_sha1})
  98. - Class::Loader (%{V_class_loader})
  99. - Digest::MD2 (%{V_digest_md2})
  100. - Digest::MD4 (%{V_digest_md4})
  101. - Digest::MD5 (%{V_digest_md5})
  102. - Digest::HMAC (%{V_digest_hmac})
  103. - Crypt::RIPEMD160 (%{V_crypt_ripemd160})
  104. - Crypt::Enigma (%{V_crypt_enigma})
  105. - Crypt::UnixCrypt::%{V_crypt_unixcrypt})
  106. - Crypt::PasswdMD5 (%{V_crypt_passwdmd5})
  107. - Crypt::DES (%{V_crypt_des})
  108. - Crypt::DES::EDE3 (%{V_crypt_des_ede3})
  109. - Crypt::RC4 (%{V_crypt_rc4})
  110. - Crypt::RC5 (%{V_crypt_rc5})
  111. - Crypt::RC6 (%{V_crypt_rc6})
  112. - Crypt::GOST (%{V_crypt_ghost})
  113. - Crypt::Blowfish (%{V_crypt_blowfish})
  114. - Crypt::Twofish (%{V_crypt_twofish})
  115. - Crypt::Rot13 (%{V_crypt_rot13})
  116. - Crypt::NULL (%{V_crypt_null})
  117. - Crypt::ECB (%{V_crypt_ecb})
  118. - Crypt::CBC (%{V_crypt_cbc})
  119. # - Crypt::CBCeasy (%{V_crypt_cbceasy})
  120. # - Crypt::Random (%{V_crypt_random})
  121. %prep
  122. %setup0 -q -c -n %{name}-%{version}
  123. %build
  124. %install
  125. rm -rf $RPM_BUILD_ROOT
  126. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib/perl5
  127. # create a wrapper script which finds the includes
  128. # FIXME eval `grep "^archname=" $RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{V_perl}/*/Config.pm`
  129. perl=$RPM_BUILD_ROOT/perl
  130. echo "#!/bin/sh" >$perl
  131. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  132. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{V_perl} \\" >>$perl
  133. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/%{V_perl}/%{P_archname} \\" >>$perl
  134. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  135. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/%{V_perl} \\" >>$perl
  136. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/%{V_perl}/%{P_archname} \\" >>$perl
  137. echo " \"\$@\"" >>$perl
  138. chmod a+x $perl
  139. # uncompress and build modules
  140. for mod in \
  141. %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} \
  142. %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} %{SOURCE10} %{SOURCE11} \
  143. %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} \
  144. %{SOURCE18} %{SOURCE19} %{SOURCE20} %{SOURCE21}
  145. do
  146. %{l_gzip} -dc $mod | %{l_tar} xf -
  147. dir=`echo "$mod" | sed -e 's;^.*/\([^/]*\)\.tar\.gz$;\1;'`
  148. cd $dir
  149. chmod -R u+rw .
  150. cp Makefile.PL Makefile.PL.orig
  151. sed -e "s:\$^X:'$perl':g" <Makefile.PL.orig >Makefile.PL
  152. $perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
  153. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  154. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  155. cd ..
  156. done
  157. # clean up
  158. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  159. find $RPM_BUILD_ROOT%{l_prefix} -name .packlist -print | xargs rm -f
  160. find $RPM_BUILD_ROOT%{l_prefix} -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
  161. # avoid conflicts
  162. eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  163. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  164. %{l_files_std} \
  165. '%not %dir %{l_prefix}/lib/perl5' \
  166. '%not %dir %{l_prefix}/lib/perl5/*' \
  167. "%not %dir $installarchlib" \
  168. "%not %dir $installprivlib" \
  169. "%not %dir $installsitearch" \
  170. "%not %dir $installsitelib" \
  171. "%not %dir $installarchlib/auto" \
  172. "%not %dir $installprivlib/auto" \
  173. "%not %dir $installsitearch/auto" \
  174. "%not %dir $installsitelib/auto"
  175. %files -f files
  176. %clean
  177. rm -rf $RPM_BUILD_ROOT