summaryrefslogtreecommitdiff
path: root/perl-Event.spec
blob: 025757ddf1ae6753771de86537350577fe435d26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
%global _empty_manifest_terminate_build 0
Name:           perl-Event
Version:        1.28
Release:        2
Summary:        Event loop processing
License:        GPL-1.0-only or Artistic-1.0-Perl
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Event/
Source0:        http://www.cpan.org/authors/id/E/ET/ETJ/Event-%{version}.tar.gz
BuildRequires:  perl >= 0:5.008000
BuildRequires:  perl-devel
BuildRequires:  perl-generators
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test) >= 1
%description
This extension aims to provide an simple and optimized event loop for a
broad class of application.
%package help
Summary : Event loop processing
Provides: perl-Event-doc
%description help
This extension aims to provide an simple and optimized event loop for a
broad class of application.This package provides help docs for perl-Event.
%prep
%setup -q -n Event-%{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 ANNOUNCE Changes META.json README README.EV TODO Tutorial.pdf Tutorial.pdf-errata.txt
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Event*
%files help
%{_mandir}/*

%changelog
* Wed Feb 15 2023 lichaoran <pkwarcraft@hotmail.com> 1.28-2
- add perl-devel as BuildRequires

* Sun May 23 2021 Perl_Bot <Perl_Bot@openeuler.org> 1.28-1
- Specfile autogenerated by Perl_Bot