init package
This commit is contained in:
parent
689f109d0c
commit
05b4daf9f7
24
Do-not-use-ExtUtils-MakeMaker-CPANfile.patch
Normal file
24
Do-not-use-ExtUtils-MakeMaker-CPANfile.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From 3043ea077f82b8e6adc7d752d50384c1fd754404 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wangqing <wangqing@uniontech.com>
|
||||||
|
Date: Fri, 2 Jul 2021 22:09:53 +0800
|
||||||
|
Subject: [PATCH] Do not use ExtUtils::MakeMaker::CPANfile
|
||||||
|
|
||||||
|
The Makefile.PL works as well as with plain ExtUtils::MakeMaker.
|
||||||
|
rpmbuild does not read dependencies from META, thus cpanfile content
|
||||||
|
is irrelevant when building an RPM package.
|
||||||
|
|
||||||
|
diff --git a/Makefile.PL b/Makefile.PL
|
||||||
|
index a4faee1..b4bb0d8 100644
|
||||||
|
--- a/Makefile.PL
|
||||||
|
+++ b/Makefile.PL
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
-use ExtUtils::MakeMaker::CPANfile;
|
||||||
|
+use ExtUtils::MakeMaker;
|
||||||
|
|
||||||
|
my %params = (
|
||||||
|
NAME => 'Parse::PMFile',
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
BIN
Parse-PMFile-0.43.tar.gz
Normal file
BIN
Parse-PMFile-0.43.tar.gz
Normal file
Binary file not shown.
91
perl-Parse-PMFile.spec
Normal file
91
perl-Parse-PMFile.spec
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
%global _empty_manifest_terminate_build 0
|
||||||
|
Name: perl-Parse-PMFile
|
||||||
|
Version: 0.43
|
||||||
|
Release: 1
|
||||||
|
Summary: Parses .pm file as PAUSE does
|
||||||
|
License: GPL-2.0
|
||||||
|
Group: Development/Libraries
|
||||||
|
URL: http://search.cpan.org/dist/Parse-PMFile/
|
||||||
|
Source0: http://www.cpan.org/authors/id/I/IS/ISHIGAKI/Parse-PMFile-%{version}.tar.gz
|
||||||
|
Patch0: Do-not-use-ExtUtils-MakeMaker-CPANfile.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
BuildRequires: perl-generators
|
||||||
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||||
|
BuildRequires: perl(File::Spec)
|
||||||
|
BuildRequires: perl(File::Temp) >= 0.19
|
||||||
|
BuildRequires: perl(JSON::PP) >= 2.00
|
||||||
|
BuildRequires: perl(Test::More) >= 0.88
|
||||||
|
BuildRequires: perl(version) >= 0.83
|
||||||
|
Requires: perl(File::Spec)
|
||||||
|
Requires: perl(JSON::PP) >= 2.00
|
||||||
|
Requires: perl(version) >= 0.83
|
||||||
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||||
|
|
||||||
|
%description
|
||||||
|
The most of the code of this module is taken from the PAUSE code as of
|
||||||
|
April 2013 almost verbatim. Thus, the heart of this module should be quite
|
||||||
|
stable. However, I made it not to use pipe ("-|") as well as I stripped database-
|
||||||
|
related code. If you encounter any issue, that's most probably because of
|
||||||
|
my modification.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary : provides perl-Parse-PMFile documents
|
||||||
|
Provides: perl-Parse-PMFile-doc
|
||||||
|
|
||||||
|
%description help
|
||||||
|
Man pages and other related documents.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n Parse-PMFile-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
export PERL_MM_OPT=""
|
||||||
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
export PERL_MM_OPT=""
|
||||||
|
|
||||||
|
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 cpanfile META.json README
|
||||||
|
%{perl_vendorlib}/*
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%{_mandir}/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Jul 02 2021 wangqing <wangqing@uniontech.com> 0.43-1
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user