##
##  perl-crypto.spec -- OpenPKG RPM Package Specification
##  Copyright (c) 2000-2025 OpenPKG Project <http://openpkg.org/>
##
##  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_perl                  5.22
%define       V_digest                1.17
%define       V_digest_sha1           2.13
%define       V_digest_sha            6.04
%define       V_digest_md2            2.04
%define       V_digest_md4            1.9
%define       V_digest_md5            2.55
%define       V_digest_md5_perl       1.9
%define       V_digest_hmac           1.03
%define       V_digest_emac           1.2
%define       V_digest_whirlpool      2.04
%define       V_crypt_ripemd160       0.04
%define       V_crypt_enigma          1.1
%define       V_crypt_unixcrypt       1.0
%define       V_crypt_passwdmd5       1.3
%define       V_crypt_des             2.07
%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_gost            1.00
%define       V_crypt_blowfish        2.14
%define       V_crypt_twofish         2.18
%define       V_crypt_rot13           0.6
%define       V_crypt_null            1.02
%define       V_crypt_ecb             2.23
%define       V_crypt_cbc             3.03
%define       V_crypt_openssl_bignum  0.04
%define       V_crypt_openssl_random  0.04
%define       V_crypt_openssl_guess   0.15
%define       V_crypt_openssl_dsa     0.20
%define       V_crypt_openssl_rsa     0.32
%define       V_crypt_openssl_x509    1.915
%define       V_crypt_rijndael        1.12
%define       V_crypt_twofish2        1.03
%define       V_crypt_ciphersaber     1.01
%define       V_crypt_dh              0.06
%define       V_digest_crc            0.23
%define       V_string_crc32          1.5
%define       V_data_uuid             1.226
%define       V_crypt_random          1.52
%define       V_crypt_primes          0.50

#   package information
Name:         perl-crypto
Summary:      Perl Modules for use with cryptography
URL:          http://www.cpan.org/
Vendor:       Perl Community
Packager:     OpenPKG Project
Distribution: OpenPKG Community
Class:        BASE
Group:        Perl
License:      GPL/Artistic
Version:      %{V_perl}
Release:      20240122

#   package options
%option       with_pari  no

#   list of sources
Source0:      http://www.cpan.org/authors/id/G/GA/GAAS/Digest-%{V_digest}.tar.gz
Source1:      http://www.cpan.org/authors/id/G/GA/GAAS/Digest-SHA1-%{V_digest_sha1}.tar.gz
Source2:      http://www.cpan.org/authors/id/M/MS/MSHELOR/Digest-SHA-%{V_digest_sha}.tar.gz
Source3:      http://www.cpan.org/authors/id/G/GA/GAAS/Digest-MD2-%{V_digest_md2}.tar.gz
Source4:      http://www.cpan.org/modules/by-module/Digest/Digest-MD4-%{V_digest_md4}.tar.gz
Source5:      http://www.cpan.org/authors/id/G/GA/GAAS/Digest-MD5-%{V_digest_md5}.tar.gz
Source6:      http://www.cpan.org/authors/id/G/GA/GAAS/Digest-HMAC-%{V_digest_hmac}.tar.gz
Source7:      http://www.cpan.org/authors/id/C/CH/CHGEUER/Crypt-RIPEMD160-%{V_crypt_ripemd160}.tar.gz
Source8:      http://www.cpan.org/authors/id/J/JB/JBLAKEY/Crypt-Enigma-%{V_crypt_enigma}.tar.gz
Source9:      http://www.cpan.org/authors/id/M/MV/MVORL/Crypt-UnixCrypt-%{V_crypt_unixcrypt}.tar.gz
Source10:     http://www.cpan.org/authors/id/L/LU/LUISMUNOZ/Crypt-PasswdMD5-%{V_crypt_passwdmd5}.tar.gz
Source11:     http://www.cpan.org/authors/id/D/DP/DPARIS/Crypt-DES-%{V_crypt_des}.tar.gz
Source12:     http://www.cpan.org/authors/id/B/BT/BTROTT/Crypt-DES_EDE3-%{V_crypt_des_ede3}.tar.gz
Source13:     http://www.cpan.org/authors/id/S/SI/SIFUKURT/Crypt-RC4-%{V_crypt_rc4}.tar.gz
Source14:     http://www.cpan.org/authors/id/S/SI/SIFUKURT/Crypt-RC5-%{V_crypt_rc5}.tar.gz
Source15:     http://www.cpan.org/authors/id/J/JH/JHUGHES/Crypt-RC6-%{V_crypt_rc6}.tar.gz
Source16:     http://www.cpan.org/authors/id/A/AM/AMS/Crypt-GOST-%{V_crypt_gost}.tar.gz
Source17:     http://www.cpan.org/authors/id/D/DP/DPARIS/Crypt-Blowfish-%{V_crypt_blowfish}.tar.gz
Source18:     http://www.cpan.org/authors/id/A/AM/AMS/Crypt-Twofish-%{V_crypt_twofish}.tar.gz
Source19:     http://www.cpan.org/modules/by-authors/id/A/AY/AYRNIEU/Crypt-Rot13-%{V_crypt_rot13}.tar.gz
Source20:     http://www.cpan.org/authors/id/A/AM/AMS/Crypt-NULL-%{V_crypt_null}.tar.gz
Source21:     http://www.cpan.org/authors/id/A/AP/APPEL/Crypt-ECB-%{V_crypt_ecb}.tar.gz
Source22:     http://www.cpan.org/authors/id/L/LD/LDS/Crypt-CBC-%{V_crypt_cbc}.tar.gz
Source23:     http://www.cpan.org/authors/id/I/IR/IROBERTS/Crypt-OpenSSL-Bignum-%{V_crypt_openssl_bignum}.tar.gz
Source24:     http://www.cpan.org/authors/id/I/IR/IROBERTS/Crypt-OpenSSL-Random-%{V_crypt_openssl_random}.tar.gz
Source25:     http://www.cpan.org/authors/id/A/AK/AKIYM/Crypt-OpenSSL-Guess-%{V_crypt_openssl_guess}.tar.gz
Source26:     http://www.cpan.org/authors/id/K/KM/KMX/Crypt-OpenSSL-DSA-%{V_crypt_openssl_dsa}.tar.gz
Source27:     http://www.cpan.org/authors/id/T/TO/TODDR/Crypt-OpenSSL-RSA-%{V_crypt_openssl_rsa}.tar.gz
Source28:     http://www.cpan.org/authors/id/J/JO/JONASBN/Crypt-OpenSSL-X509-%{V_crypt_openssl_x509}.tar.gz
Source29:     http://www.cpan.org/authors/id/R/RJ/RJBS/Data-UUID-%{V_data_uuid}.tar.gz
Source30:     http://www.cpan.org/authors/id/S/SO/SOENKE/String-CRC32-%{V_string_crc32}.tar.gz
Source31:     http://www.cpan.org/authors/id/B/BD/BDFOY/Crypt-Rijndael-%{V_crypt_rijndael}.tar.gz
Source32:     http://www.cpan.org/authors/id/O/OL/OLIMAUL/Digest-CRC-%{V_digest_crc}.tar.gz
Source33:     http://www.cpan.org/authors/id/J/JC/JCDUQUE/Digest-EMAC-%{V_digest_emac}.tar.gz
Source34:     http://www.cpan.org/authors/id/A/AV/AVAR/Digest-Whirlpool-%{V_digest_whirlpool}.tar.gz
Source35:     http://www.cpan.org/authors/id/M/ML/MLEHMANN/Crypt-Twofish2-%{V_crypt_twofish2}.tar.gz
Source36:     http://www.cpan.org/authors/id/C/CH/CHROMATIC/Crypt-CipherSaber-%{V_crypt_ciphersaber}.tar.gz
Source37:     http://www.cpan.org/authors/id/B/BT/BTROTT/Crypt-DH-%{V_crypt_dh}.tar.gz
Source38:     http://www.cpan.org/authors/id/V/VI/VIPUL/Crypt-Random-%{V_crypt_random}.tar.gz
Source39:     http://www.cpan.org/authors/id/V/VI/VIPUL/Crypt-Primes-%{V_crypt_primes}.tar.gz
Source40:     http://www.cpan.org/authors/id/D/DE/DELTA/Digest-Perl-MD5-%{V_digest_md5_perl}.tar.gz
Patch0:       perl-crypto.patch

#   build information
BuildPreReq:  OpenPKG, openpkg >= 20160101, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
PreReq:       OpenPKG, openpkg >= 20160101, perl >= %{V_perl}
BuildPreReq:  perl-util, perl-mail, openssl
PreReq:       perl-util, perl-mail, openssl
%if "%{with_pari}" == "yes"
BuildPreReq:  pari, pari::with_perl = yes
PreReq:       pari, pari::with_perl = yes
%endif

%description
    Perl module bundle related to Cryptography.
    - Digest (%{V_digest})
    - Digest::CRC (%{V_digest_crc})
    - Digest::SHA1 (%{V_digest_sha1})
    - Digest::SHA (%{V_digest_sha})
    - Digest::MD2 (%{V_digest_md2})
    - Digest::MD4 (%{V_digest_md4})
    - Digest::MD5 (%{V_digest_md5})
    - Digest::Perl::MD5 (%{V_digest_md5_perl})
    - Digest::HMAC (%{V_digest_hmac})
    - Digest::EMAC (%{V_digest_emac})
    - Digest::Whirlpool (%{V_digest_whirlpool})
    - 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_gost})
    - 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})
    - Crypt::OpenSSL::Bignum (%{V_crypt_openssl_bignum})
    - Crypt::OpenSSL::Random (%{V_crypt_openssl_random})
    - Crypt::OpenSSL::Guess (%{V_crypt_openssl_guess})
    - Crypt::OpenSSL::DSA (%{V_crypt_openssl_dsa})
    - Crypt::OpenSSL::RSA (%{V_crypt_openssl_rsa})
    - Crypt::OpenSSL::X509 (%{V_crypt_openssl_x509})
    - Crypt::Rijndael (%{V_crypt_rijndael})
    - Crypt::Twofish2 (%{V_crypt_twofish2})
    - Crypt::CipherSaber (%{V_crypt_ciphersaber})
    - Crypt::DH (%{V_crypt_dh})
    - String::CRC32 (%{V_string_crc32})
    - Data::UUID (%{V_data_uuid})
%if "%{with_pari}" == "yes"
    - Crypt::Random (%{V_crypt_random})
    - Crypt::Primes (%{V_crypt_primes})
%endif

%track
    prog perl-crypto:Crypt-Blowfish = {
        version   = %{V_crypt_blowfish}
        url       = http://www.cpan.org/authors/id/D/DP/DPARIS/
        regex     = Crypt-Blowfish-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-DES = {
        version   = %{V_crypt_des}
        url       = http://www.cpan.org/authors/id/D/DP/DPARIS/
        regex     = Crypt-DES-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-DES_EDE3 = {
        version   = %{V_crypt_des_ede3}
        url       = http://www.cpan.org/authors/id/B/BT/BTROTT/
        regex     = Crypt-DES_EDE3-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-Enigma = {
        version   = %{V_crypt_enigma}
        url       = http://www.cpan.org/authors/id/J/JB/JBLAKEY/
        regex     = Crypt-Enigma-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-GOST = {
        version   = %{V_crypt_gost}
        url       = http://www.cpan.org/authors/id/A/AM/AMS/
        regex     = Crypt-GOST-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-NULL = {
        version   = %{V_crypt_null}
        url       = http://www.cpan.org/authors/id/A/AM/AMS/
        regex     = Crypt-NULL-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-PasswdMD5 = {
        version   = %{V_crypt_passwdmd5}
        url       = http://www.cpan.org/authors/id/L/LU/LUISMUNOZ/
        regex     = Crypt-PasswdMD5-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-RC4 = {
        version   = %{V_crypt_rc4}
        url       = http://www.cpan.org/authors/id/S/SI/SIFUKURT/
        regex     = Crypt-RC4-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-RC5 = {
        version   = %{V_crypt_rc5}
        url       = http://www.cpan.org/authors/id/S/SI/SIFUKURT/
        regex     = Crypt-RC5-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-RC6 = {
        version   = %{V_crypt_rc6}
        url       = http://www.cpan.org/authors/id/J/JH/JHUGHES/
        regex     = Crypt-RC6-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-RIPEMD160 = {
        version   = %{V_crypt_ripemd160}
        url       = http://www.cpan.org/authors/id/C/CH/CHGEUER/
        regex     = Crypt-RIPEMD160-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-Rot13 = {
        version   = %{V_crypt_rot13}
        url       = http://www.cpan.org/modules/by-authors/id/A/AY/AYRNIEU/
        regex     = Crypt-Rot13-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-Twofish = {
        version   = %{V_crypt_twofish}
        url       = http://www.cpan.org/authors/id/A/AM/AMS/
        regex     = Crypt-Twofish-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-UnixCrypt = {
        version   = %{V_crypt_unixcrypt}
        url       = http://www.cpan.org/authors/id/M/MV/MVORL/
        regex     = Crypt-UnixCrypt-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-ECB = {
        version   = %{V_crypt_ecb}
        url       = http://www.cpan.org/authors/id/A/AP/APPEL/
        regex     = Crypt-ECB-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-CBC = {
        version   = %{V_crypt_cbc}
        url       = http://www.cpan.org/authors/id/L/LD/LDS/
        regex     = Crypt-CBC-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Data-UUID = {
        version   = %{V_data_uuid}
        url       = http://www.cpan.org/authors/id/R/RJ/RJBS/
        regex     = Data-UUID-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest = {
        version   = %{V_digest}
        url       = http://www.cpan.org/authors/id/G/GA/GAAS/
        regex     = Digest-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-HMAC = {
        version   = %{V_digest_hmac}
        url       = http://www.cpan.org/authors/id/G/GA/GAAS/
        regex     = Digest-HMAC-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-MD2 = {
        version   = %{V_digest_md2}
        url       = http://www.cpan.org/authors/id/G/GA/GAAS/
        regex     = Digest-MD2-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-MD4 = {
        version   = %{V_digest_md4}
        url       = http://www.cpan.org/modules/by-module/Digest/
        regex     = Digest-MD4-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-MD5 = {
        version   = %{V_digest_md5}
        url       = http://www.cpan.org/authors/id/G/GA/GAAS/
        regex     = Digest-MD5-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-Perl-MD5 = {
        version   = %{V_digest_md5_perl}
        url       = http://www.cpan.org/authors/id/D/DE/DELTA/
        regex     = Digest-Perl-MD5-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-SHA = {
        version   = %{V_digest_sha}
        url       = http://www.cpan.org/authors/id/M/MS/MSHELOR/
        regex     = Digest-SHA-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-SHA1 = {
        version   = %{V_digest_sha1}
        url       = http://www.cpan.org/authors/id/G/GA/GAAS/
        regex     = Digest-SHA1-(__VER__)\.tar\.gz
    }
    prog perl-crypto:String-CRC32 = {
        version   = %{V_string_crc32}
        url       = http://www.cpan.org/authors/id/S/SO/SOENKE/
        regex     = String-CRC32-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-OpenSSL-Bignum = {
        version   = %{V_crypt_openssl_bignum}
        url       = http://www.cpan.org/authors/id/I/IR/IROBERTS/
        regex     = Crypt-OpenSSL-Bignum-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-OpenSSL-Random = {
        version   = %{V_crypt_openssl_random}
        url       = http://www.cpan.org/authors/id/I/IR/IROBERTS/
        regex     = Crypt-OpenSSL-Random-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-OpenSSL-Guess = {
        version   = %{V_crypt_openssl_guess}
        url       = http://www.cpan.org/authors/id/A/AK/AKIYM/
        regex     = Crypt-OpenSSL-Guess-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-OpenSSL-DSA = {
        version   = %{V_crypt_openssl_dsa}
        url       = http://www.cpan.org/authors/id/K/KM/KMX/
        regex     = Crypt-OpenSSL-DSA-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-OpenSSL-RSA = {
        version   = %{V_crypt_openssl_rsa}
        url       = http://www.cpan.org/authors/id/T/TO/TODDR/
        regex     = Crypt-OpenSSL-RSA-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-OpenSSL-X509 = {
        version   = %{V_crypt_openssl_x509}
        url       = https://www.cpan.org/authors/id/J/JO/JONASBN/
        regex     = Crypt-OpenSSL-X509-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-Rijndael = {
        version   = %{V_crypt_rijndael}
        url       = http://www.cpan.org/authors/id/B/BD/BDFOY/
        regex     = Crypt-Rijndael-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-CRC = {
        version   = %{V_digest_crc}
        url       = http://www.cpan.org/authors/id/O/OL/OLIMAUL/
        regex     = Digest-CRC-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-EMAC = {
        version   = %{V_digest_emac}
        url       = http://www.cpan.org/authors/id/J/JC/JCDUQUE/
        regex     = Digest-EMAC-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Digest-Whirlpool = {
        version   = %{V_digest_whirlpool}
        url       = http://www.cpan.org/authors/id/A/AV/AVAR/
        regex     = Digest-Whirlpool-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-Twofish2 = {
        version   = %{V_crypt_twofish2}
        url       = http://www.cpan.org/authors/id/M/ML/MLEHMANN/
        regex     = Crypt-Twofish2-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-CipherSaber = {
        version   = %{V_crypt_ciphersaber}
        url       = http://www.cpan.org/authors/id/C/CH/CHROMATIC/
        regex     = Crypt-CipherSaber-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-DH = {
        version   = %{V_crypt_dh}
        url       = http://www.cpan.org/authors/id/B/BT/BTROTT/
        regex     = Crypt-DH-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-Random = {
        version   = %{V_crypt_random}
        url       = http://www.cpan.org/authors/id/V/VI/VIPUL/
        regex     = Crypt-Random-(__VER__)\.tar\.gz
    }
    prog perl-crypto:Crypt-Primes = {
        version   = %{V_crypt_primes}
        url       = http://www.cpan.org/authors/id/V/VI/VIPUL/
        regex     = Crypt-Primes-(__VER__)\.tar\.gz
    }

%prep
    %setup -q -c
    %setup -q -T -D -a 1
    %setup -q -T -D -a 2
    %setup -q -T -D -a 3
    %setup -q -T -D -a 4
    %setup -q -T -D -a 5
    %setup -q -T -D -a 6
    %setup -q -T -D -a 7
    %setup -q -T -D -a 8
    %setup -q -T -D -a 9
    %setup -q -T -D -a 10
    %setup -q -T -D -a 11
    %setup -q -T -D -a 12
    %setup -q -T -D -a 13
    %setup -q -T -D -a 14
    %setup -q -T -D -a 15
    %setup -q -T -D -a 16
    %setup -q -T -D -a 17
    %setup -q -T -D -a 18
    %setup -q -T -D -a 19
    %setup -q -T -D -a 20
    %setup -q -T -D -a 21
    %setup -q -T -D -a 22
    %setup -q -T -D -a 23
    %setup -q -T -D -a 24
    %setup -q -T -D -a 25
    %setup -q -T -D -a 26
    %setup -q -T -D -a 27
    %setup -q -T -D -a 28
    %setup -q -T -D -a 29
    %setup -q -T -D -a 30
    %setup -q -T -D -a 31
    %setup -q -T -D -a 32
    %setup -q -T -D -a 33
    %setup -q -T -D -a 34
    %setup -q -T -D -a 35
    %setup -q -T -D -a 36
    %setup -q -T -D -a 37
%if "%{with_pari}" == "yes"
    %setup -q -T -D -a 38
    %setup -q -T -D -a 39
%endif
    %setup -q -T -D -a 40
    %patch -p0

%build

%install
    %{l_prefix}/bin/perl-openpkg prepare
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE0}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE1}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE2}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE3}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE4}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE5}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE6}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE7}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE8}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE9}  configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE22} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE23} -A "INC='%{l_cflags}'" -A "LIBS='%{l_ldflags} -lssl -lcrypto'" configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE24} -A "INC='%{l_cflags}'" -A "LIBS='%{l_ldflags} -lssl -lcrypto'" configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE25} -A "INC='%{l_cflags}'" -A "LIBS='%{l_ldflags} -lssl -lcrypto'" configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE26} -A "INC='%{l_cflags}'" -A "LIBS='%{l_ldflags} -lssl -lcrypto'" configure build install
    #   FIXME: %{l_prefix}/bin/perl-openpkg -d %{SOURCE27} -A "INC='%{l_cflags}'" -A "LIBS='%{l_ldflags} -lssl -lcrypto'" configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE28} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE29} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE30} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE31} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE32} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE33} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE34} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE35} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE36} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE37} configure build install
%if "%{with_pari}" == "yes"
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE38} configure build install
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE39} configure build install
%endif
    %{l_prefix}/bin/perl-openpkg -d %{SOURCE40} configure build install
    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`

%files -f files

%clean

