Package init

This commit is contained in:
zhu-yuncheng 2021-05-24 12:08:06 +08:00
parent 2228fe2b06
commit f8ebac6081
2 changed files with 96 additions and 0 deletions

BIN
Variable-Magic-0.62.tar.gz Normal file

Binary file not shown.

96
perl-Variable-Magic.spec Normal file
View File

@ -0,0 +1,96 @@
%global _empty_manifest_terminate_build 0
Name: perl-Variable-Magic
Version: 0.62
Release: 1
Summary: Associate user-defined magic to variables from Perl
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Variable-Magic/
Source0: http://www.cpan.org/authors/id/V/VP/VPIT/Variable-Magic-%{version}.tar.gz
BuildRequires: perl >= 0:5.008
BuildRequires: perl-generators
BuildRequires: perl(base)
BuildRequires: perl(Carp)
BuildRequires: perl(Config)
BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(IO::Handle)
BuildRequires: perl(IO::Select)
BuildRequires: perl(IPC::Open3)
BuildRequires: perl(lib)
BuildRequires: perl(POSIX)
BuildRequires: perl(Socket)
BuildRequires: perl(Test::More)
BuildRequires: perl(XSLoader)
Requires: perl(base)
Requires: perl(Carp)
Requires: perl(Exporter)
Requires: perl(XSLoader)
%description
Magic is Perl's way of enhancing variables. This mechanism lets the user
add extra data to any variable and hook syntactical operations (such as
access, assignment or destruction) that can be applied to it. With this
module, you can add your own magic to any variable without having to write
a single line of XS.
%package help
Summary : Associate user-defined magic to variables from Perl
Provides: perl-Variable-Magic-doc
%description help
Magic is Perl's way of enhancing variables. This mechanism lets the user
add extra data to any variable and hook syntactical operations (such as
access, assignment or destruction) that can be applied to it. With this
module, you can add your own magic to any variable without having to write
a single line of XS.
%prep
%setup -q -n Variable-Magic-%{version}
%build
export PERL_MM_OPT=""
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/' Makefile
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 -type f -name '*.bs' -size 0 -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 META.json README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Variable*
%files help
%{_mandir}/*
%changelog
* Sun May 23 2021 Perl_Bot <Perl_Bot@openeuler.org> 0.62-1
- Specfile autogenerated by Perl_Bot