8
0
Files
perl-File-pushd/perl-File-pushd.spec

76 lines
2.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package perl-File-pushd (Version 1.00)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: perl-File-pushd
%define cpan_name File-pushd
Summary: Change directory temporarily for a limited scope
Version: 1.00
Release: 1
License: Apache Software License
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/File-pushd/
Source: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/File-pushd-%{version}.tar.bz2
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl(Module::Build)
%if 0%{?suse_version} < 1120
BuildRequires: perl-macros
%endif
BuildRequires: perl(Cwd)
BuildRequires: perl(File::Path)
BuildRequires: perl(File::Spec)
BuildRequires: perl(File::Temp)
%{perl_requires}
Requires: perl(Cwd)
Requires: perl(File::Path)
Requires: perl(File::Spec)
Requires: perl(File::Temp)
%description
File::pushd does a temporary chdir that is easily and automatically
reverted, similar to pushd in some Unix command shells. It works by
creating an object that caches the original working directory. When the
object is destroyed, the destructor calls chdir to revert to the original
working directory. By storing the object in a lexical variable with a
limited scope, this happens automatically at the end of the scope.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes LICENSE README Todo
%changelog