##
##  perl-crypto.spec -- OpenPKG RPM Specification
##  Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
##  Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
##  Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
##
##  Permission to use, copy, modify, and distribute this software for
##  any purpose with or without fee is hereby granted, provided that
##  the above copyright notice and this permission notice appear in all
##  copies.
##
##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
##  SUCH DAMAGE.
##

#   versions of individual parts
%define       V_digest_sha1        2.02
%define       V_digest_md2         2.01
%define       V_digest_md4         1.1
%define       V_digest_md5         2.21
%define       V_digest_hmac        1.01
%define       V_crypt_ripemd160    0.04
%define       V_crypt_enigma       1.3
%define       V_crypt_unixcrypt    1.0
%define       V_crypt_passwdmd5    1.2
%define       V_crypt_des          2.03
%define       V_crypt_des_ede3     0.01
%define       V_crypt_rc4          2.02
%define       V_crypt_rc5          2.00
%define       V_crypt_rc6          1.0
%define       V_crypt_ghost        1.00
%define       V_crypt_blowfish     2.09
%define       V_crypt_twofish      2.12
%define       V_crypt_rot13        0.04
%define       V_crypt_null         1.02
%define       V_crypt_ecb          1.1
%define       V_crypt_cbc          2.02
%define       V_data_uuid          0.08
%define       V_string_crc32       1.2

#   package information
Name:         perl-crypto
Summary:      Perl Modules for use with cryptography
URL:          http://www.cpan.org/
Vendor:       Perl Community
Packager:     The OpenPKG Project
Distribution: OpenPKG [BASE]
Group:        Language
License:      GPL/Artistic
Version:      20021228
Release:      20021228

#   list of sources
Source0:      http://www.cpan.org/modules/by-module/Digest/Digest-SHA1-%{V_digest_sha1}.tar.gz
Source1:      http://www.cpan.org/modules/by-module/Digest/Digest-MD2-%{V_digest_md2}.tar.gz
Source2:      http://www.cpan.org/modules/by-module/Digest/Digest-MD4-%{V_digest_md4}.tar.gz
Source3:      http://www.cpan.org/modules/by-module/Digest/Digest-MD5-%{V_digest_md5}.tar.gz
Source4:      http://www.cpan.org/modules/by-module/Digest/Digest-HMAC-%{V_digest_hmac}.tar.gz
Source5:      http://www.cpan.org/modules/by-module/Crypt/Crypt-RIPEMD160-%{V_crypt_ripemd160}.tar.gz
Source6:      http://www.cpan.org/modules/by-module/Crypt/Crypt-Enigma-%{V_crypt_enigma}.tar.gz
Source7:      http://www.cpan.org/modules/by-module/Crypt/Crypt-UnixCrypt-%{V_crypt_unixcrypt}.tar.gz
Source8:      http://www.cpan.org/modules/by-module/Crypt/Crypt-PasswdMD5-%{V_crypt_passwdmd5}.tar.gz
Source9:      http://www.cpan.org/modules/by-module/Crypt/Crypt-DES-%{V_crypt_des}.tar.gz
Source10:     http://www.cpan.org/modules/by-module/Crypt/Crypt-DES_EDE3-%{V_crypt_des_ede3}.tar.gz
Source11:     http://www.cpan.org/modules/by-module/Crypt/Crypt-RC4-%{V_crypt_rc4}.tar.gz
Source12:     http://www.cpan.org/modules/by-module/Crypt/Crypt-RC5-%{V_crypt_rc5}.tar.gz
Source13:     http://www.cpan.org/modules/by-module/Crypt/Crypt-RC6-%{V_crypt_rc6}.tar.gz
Source14:     http://www.cpan.org/modules/by-module/Crypt/Crypt-GOST-%{V_crypt_ghost}.tar.gz
Source15:     http://www.cpan.org/modules/by-module/Crypt/Crypt-Blowfish-%{V_crypt_blowfish}.tar.gz
Source16:     http://www.cpan.org/modules/by-module/Crypt/Crypt-Twofish-%{V_crypt_twofish}.tar.gz
Source17:     http://www.cpan.org/modules/by-module/Crypt/Crypt-Rot13-%{V_crypt_rot13}.tar.gz
Source18:     http://www.cpan.org/modules/by-module/Crypt/Crypt-NULL-%{V_crypt_null}.tar.gz
Source19:     http://www.cpan.org/modules/by-module/Crypt/Crypt-ECB-%{V_crypt_ecb}.tar.gz
Source20:     http://www.cpan.org/modules/by-module/Crypt/Crypt-CBC-%{V_crypt_cbc}.tar.gz
Source21:     http://www.cpan.org/modules/by-module/Data/Data-UUID-%{V_data_uuid}.tar.gz
Source22:     http://www.cpan.org/modules/by-module/String/String-CRC32-%{V_string_crc32}.tar.gz

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 20020206, perl >= 5.8.0
PreReq:       OpenPKG, openpkg >= 20020206, perl >= 5.8.0
AutoReq:      no
AutoReqProv:  no

%description
    Perl module bundle related to Cryptography.
    - Digest::SHA1 (%{V_digest_sha1})
    - Digest::MD2 (%{V_digest_md2})
    - Digest::MD4 (%{V_digest_md4})
    - Digest::MD5 (%{V_digest_md5})
    - Digest::HMAC (%{V_digest_hmac})
    - Crypt::RIPEMD160 (%{V_crypt_ripemd160})
    - Crypt::Enigma (%{V_crypt_enigma})
    - Crypt::UnixCrypt::%{V_crypt_unixcrypt})
    - Crypt::PasswdMD5 (%{V_crypt_passwdmd5})
    - Crypt::DES (%{V_crypt_des})
    - Crypt::DES::EDE3 (%{V_crypt_des_ede3})
    - Crypt::RC4 (%{V_crypt_rc4})
    - Crypt::RC5 (%{V_crypt_rc5})
    - Crypt::RC6 (%{V_crypt_rc6})
    - Crypt::GOST (%{V_crypt_ghost})
    - Crypt::Blowfish (%{V_crypt_blowfish})
    - Crypt::Twofish (%{V_crypt_twofish})
    - Crypt::Rot13 (%{V_crypt_rot13})
    - Crypt::NULL (%{V_crypt_null})
    - Crypt::ECB (%{V_crypt_ecb})
    - Crypt::CBC (%{V_crypt_cbc})
    - Data::UUID (%{V_data_uuid})
    - String::CRC32 (%{V_string_crc32})

%prep
    %setup0  -q -c
    %setup1  -q -T -D -a 1
    %setup2  -q -T -D -a 2
    %setup3  -q -T -D -a 3
    %setup4  -q -T -D -a 4
    %setup5  -q -T -D -a 5
    %setup6  -q -T -D -a 6
    %setup7  -q -T -D -a 7
    %setup8  -q -T -D -a 8
    %setup9  -q -T -D -a 9
    %setup10 -q -T -D -a 10
    %setup11 -q -T -D -a 11
    %setup12 -q -T -D -a 12
    %setup13 -q -T -D -a 13
    %setup14 -q -T -D -a 14
    %setup15 -q -T -D -a 15
    %setup16 -q -T -D -a 16
    %setup17 -q -T -D -a 17
    %setup18 -q -T -D -a 18
    %setup19 -q -T -D -a 19
    %setup20 -q -T -D -a 20
    %setup21 -q -T -D -a 21
    %setup22 -q -T -D -a 22

%build

%install
    #   perform common prolog operations
    %{l_prefix}/bin/perl-openpkg prolog

    #   build and install individual modules
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE0}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE1}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE2}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE3}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE4}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE5}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE6}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE7}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE8}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE9}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE10}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE11}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE12}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE13}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE14}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE15}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE16}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE17}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE18}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE19}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE20}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE21}
    %{l_prefix}/bin/perl-openpkg install -d %{SOURCE22}

    #   perform common epilog operations
    %{l_prefix}/bin/perl-openpkg epilog

%files -f files

%clean
    rm -rf $RPM_BUILD_ROOT

