perl-crypto.spec 8.7 KB

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