##
##  perl-devel.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_devel_callstack                 0.19
%define       V_devel_stacktrace                2.05
%define       V_devel_size                      0.85
%define       V_devel_size_report               0.13
%define       V_devel_trace                     0.12
%define       V_devel_dumpvar                   1.06
%define       V_devel_symdump                   2.18
%define       V_data_treedumper                 0.41
%define       V_data_treedumper_oo              0.07
%define       V_data_treedumper_renderer_ascii  0.03
%define       V_data_treedumper_renderer_dhtml  0.09

#   package information
Name:         perl-devel
Summary:      Perl Modules for development
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:      20250524

#   list of sources
Source0:      http://www.cpan.org/authors/id/J/JH/JHI/Devel-CallStack-%{V_devel_callstack}.tar.gz
Source1:      http://www.cpan.org/authors/id/D/DR/DROLSKY/Devel-StackTrace-%{V_devel_stacktrace}.tar.gz
Source2:      http://www.cpan.org/modules/by-module/Devel/Devel-Size-%{V_devel_size}.tar.gz
Source3:      http://www.cpan.org/modules/by-module/Devel/Devel-Size-Report-%{V_devel_size_report}.tar.gz
Source4:      http://www.cpan.org/authors/id/M/MJ/MJD/Devel-Trace-%{V_devel_trace}.tar.gz
Source5:      http://www.cpan.org/authors/id/A/AD/ADAMK/Devel-Dumpvar-%{V_devel_dumpvar}.tar.gz
Source6:      http://www.cpan.org/authors/id/A/AN/ANDK/Devel-Symdump-%{V_devel_symdump}.tar.gz
Source7:      http://www.cpan.org/authors/id/N/NK/NKH/Data-TreeDumper-%{V_data_treedumper}.tar.gz
Source8:      http://www.cpan.org/authors/id/N/NK/NKH/Data-TreeDumper-OO-%{V_data_treedumper_oo}.tar.gz
Source9:      http://www.cpan.org/authors/id/N/NK/NKH/Data-TreeDumper-Renderer-ASCII-%{V_data_treedumper_renderer_ascii}.tar.gz
Source10:     http://www.cpan.org/authors/id/N/NK/NKH/Data-TreeDumper-Renderer-DHTML-%{V_data_treedumper_renderer_dhtml}.tar.gz

#   build information
BuildPreReq:  OpenPKG, openpkg >= 20160101, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
PreReq:       OpenPKG, openpkg >= 20160101, perl >= %{V_perl}
BuildPreReq:  perl-term
PreReq:       perl-term

%description
    Perl modules for development:
    - Devel::CallStack (%{V_devel_callstack})
    - Devel::StackTrace (%{V_devel_stacktrace})
    - Devel::Size (%{V_devel_size})
    - Devel::Size::Report (%{V_devel_size_report})
    - Devel::Trace (%{V_devel_trace})
    - Devel::Dumpvar (%{V_devel_dumpvar})
    - Data::TreeDumper (%{V_data_treedumper})
    - Data::TreeDumper::OO (%{V_data_treedumper_oo})
    - Data::TreeDumper::Renderer::ASCII (%{V_data_treedumper_renderer_ascii})
    - Data::TreeDumper::Renderer::DHTML (%{V_data_treedumper_renderer_dhtml})

%track
    prog perl-devel:Devel-CallStack = {
        version   = %{V_devel_callstack}
        url       = http://www.cpan.org/authors/id/J/JH/JHI/
        regex     = Devel-CallStack-(__VER__)\.tar\.gz
    }
    prog perl-devel:Devel-StackTrace = {
        version   = %{V_devel_stacktrace}
        url       = http://www.cpan.org/authors/id/D/DR/DROLSKY/
        regex     = Devel-StackTrace-(__VER__)\.tar\.gz
    }
    prog perl-devel:Devel-Size = {
        version   = %{V_devel_size}
        url       = http://www.cpan.org/modules/by-module/Devel/
        regex     = Devel-Size-(__VER__)\.tar\.gz
    }
    prog perl-devel:Devel-Size-Report = {
        version   = %{V_devel_size_report}
        url       = http://www.cpan.org/modules/by-module/Devel/
        regex     = Devel-Size-Report-(__VER__)\.tar\.gz
    }
    prog perl-devel:Devel-Trace = {
        version   = %{V_devel_trace}
        url       = http://www.cpan.org/authors/id/M/MJ/MJD/
        regex     = Devel-Trace-(__VER__)\.tar\.gz
    }
    prog perl-devel:Devel-Dumpvar = {
        version   = %{V_devel_dumpvar}
        url       = http://www.cpan.org/authors/id/A/AD/ADAMK/
        regex     = Devel-Dumpvar-(__VER__)\.tar\.gz
    }
    prog perl-devel:Devel-Symdump = {
        version   = %{V_devel_symdump}
        url       = http://www.cpan.org/authors/id/A/AN/ANDK/
        regex     = Devel-Symdump-(__VER__)\.tar\.gz
    }
    prog perl-devel:Data-TreeDumper = {
        version   = %{V_data_treedumper}
        url       = http://www.cpan.org/authors/id/N/NK/NKH/
        regex     = Data-TreeDumper-(__VER__)\.tar\.gz
    }
    prog perl-devel:Data-TreeDumper-OO = {
        version   = %{V_data_treedumper_oo}
        url       = http://www.cpan.org/authors/id/N/NK/NKH/
        regex     = Data-TreeDumper-OO-(__VER__)\.tar\.gz
    }
    prog perl-devel:Data-TreeDumper-Renderer-ASCII = {
        version   = %{V_data_treedumper_renderer_ascii}
        url       = http://www.cpan.org/authors/id/N/NK/NKH/
        regex     = Data-TreeDumper-Renderer-ASCII-(__VER__)\.tar\.gz
    }
    prog perl-devel:Data-TreeDumper-Renderer-DHTML = {
        version   = %{V_data_treedumper_renderer_dhtml}
        url       = http://www.cpan.org/authors/id/N/NK/NKH/
        regex     = Data-TreeDumper-Renderer-DHTML-(__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

%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 -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

