diff --git a/lib-relative-1.000.tar.gz b/lib-relative-1.000.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..446de010dfa5298c2320d2b80197413b0ea8eeb5 Binary files /dev/null and b/lib-relative-1.000.tar.gz differ diff --git a/perl-lib-relative.spec b/perl-lib-relative.spec new file mode 100644 index 0000000000000000000000000000000000000000..5eeb3749496399dc5b85f5b9eeeb3237ef5f6498 --- /dev/null +++ b/perl-lib-relative.spec @@ -0,0 +1,83 @@ +%global _empty_manifest_terminate_build 0 +%global descirption This module proposes a straightforward method for adding local directory to @INC. It takes a path relative to the current file, absolutize it, and add it to @INC. +Name: perl-lib-relative +Version: 1.000 +Release: 2 +Summary: Add paths relative to the current file to @INC +License: Artistic 2.0 +Group: Development/Libraries +URL: http://search.cpan.org/dist/lib-relative/ +Source0: http://www.cpan.org/authors/id/D/DB/DBOOK/lib-relative-%{version}.tar.gz +BuildArch: noarch +BuildRequires: perl >= 0:5.006001 +BuildRequires: perl-generators +BuildRequires: perl(Cwd) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) >= 0.19 +BuildRequires: perl(Test::More) >= 0.88 +Requires: perl(Cwd) +Requires: perl(File::Spec) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description +%{description} + +%package help +Summary : Add paths relative to the current file to @INC +Provides: perl-lib-relative-doc +%description help +%{descirption} + +%prep +%setup -q -n lib-relative-%{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 +if [ -d usr/lib64 ];then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib ];then + find usr/lib -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.md cpanfile dist.ini LICENSE META.json README +%{perl_vendorlib}/* +%files help +%{_mandir}/* + +%changelog +* Fri Jul 16 2021 Perl_Bot 1.000-1 +- Specfile autogenerated by Perl_Bot +* Fri Jul 16 2021 Lin_vy 1.000-2 +- adjusted the %description.