File perl-Sub-Uplevel.spec of Package perl-Sub-Uplevel

#
# spec file for package perl-Sub-Uplevel
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


# decimal versioning as used by perl
%define d_ver   0.24
# decimal dotted versioning as used by rpm
%if 0%{?suse_version} > 1010
%define dd_ver  %(perl -e "print version->new(%{d_ver})->normal" | sed "s/v//")
%else
%define dd_ver  0.240.0
%endif

Name:           perl-Sub-Uplevel
Version:        %{dd_ver}
Release:        0
%define cpan_name Sub-Uplevel
Summary:        Apparently run a function in a higher stack frame
License:        GPL-1.0+ or Artistic-1.0
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Sub-Uplevel/
Source:         http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-%{d_ver}.tar.gz
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Carp)
BuildRequires:  perl(Module::Build)
BuildRequires:  perl(Test::More) >= 0.47
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%{perl_requires}

%description
Like Tcl's uplevel() function, but not quite so dangerous. The idea is
just to fool caller(). All the really naughty bits of Tcl's uplevel()
are avoided.

%prep
%setup -q -n %{cpan_name}-%{d_ver}

%build

%check
make test

%install
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags} -Wall"
make %{?_smp_mflags}
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%clean
rm -rf %{buildroot}

%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes examples LICENSE README xt

%changelog
openSUSE Build Service is sponsored by