diff --git a/File-chdir-0.1011.tar.gz b/File-chdir-0.1011.tar.gz new file mode 100644 index 0000000..35b17b2 Binary files /dev/null and b/File-chdir-0.1011.tar.gz differ diff --git a/perl-File-chdir.spec b/perl-File-chdir.spec new file mode 100644 index 0000000..f3c483b --- /dev/null +++ b/perl-File-chdir.spec @@ -0,0 +1,74 @@ +%global _empty_manifest_terminate_build 0 +Name: perl-File-chdir +Version: 0.1011 +Release: 2 +Summary: More sensible way to change directories +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/File-chdir/ +Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/File-chdir-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: perl >= 0:5.006 perl(Carp) perl(Cwd) >= 3.16 perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) perl(File::Spec) perl(File::Spec::Functions) >= 3.27 +BuildRequires: perl(strict) perl(Test::More) perl(warnings) +Requires: perl(Carp) perl(Cwd) >= 3.16 perl(Exporter) perl(File::Spec::Functions) >= 3.27 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl(strict) + +%description +Perl's chdir() has the unfortunate problem of being very, very, very +global. If any part of your program calls chdir() or if any library you +use calls chdir(), it changes the current working directory for the +*whole* program. + +%package help +Summary: More sensible way to change directories +Provides: perl-File-chdir-doc + +%description help +Perl's chdir() has the unfortunate problem of being very, very, very +global. If any part of your program calls chdir() or if any library you +use calls chdir(), it changes the current working directory for the +*whole* program. + +%prep +%setup -q -n File-chdir-%{version} + +%build +export PERL_MM_OPT="" +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +export PERL_MM_OPT="" +rm -rf $RPM_BUILD_ROOT +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; +%{_fixperms} $RPM_BUILD_ROOT/* +pushd %{buildroot} +touch filelist.lst +if [ -d usr/bin ];then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ];then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +popd +mv %{buildroot}/filelist.lst . + +%check +make test +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f filelist.lst +%defattr(-,root,root,-) +%doc Changes CONTRIBUTING.mkdn cpanfile dist.ini LICENSE META.json perlcritic.rc README +%{perl_vendorlib}/* + +%files help +%{_mandir}/* + +%changelog +* Fri Jul 10 2020 chengzihan - 0.1011-2 +- Package init diff --git a/perl-File-chdir.yaml b/perl-File-chdir.yaml new file mode 100644 index 0000000..452d2aa --- /dev/null +++ b/perl-File-chdir.yaml @@ -0,0 +1,4 @@ +version_control: metacpan +src_repo: File-chdir +tag_prefix: "^" +seperator: "."