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

# 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//")
%define dd_ver  0.240.0

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

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.

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


make test

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

rm -rf %{buildroot}

%files -f %{name}.files
%doc Changes examples LICENSE README xt

openSUSE Build Service is sponsored by