%global _empty_manifest_terminate_build 0

Name:           perl-HTTP-CookieMonster
Version:        0.11
Release:        2
Summary:        Easy read/write access to your jar of HTTP::Cookies
License:        GPL+ or Artistic-1.0-Perl
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/HTTP-CookieMonster/
Source0:        http://www.cpan.org/authors/id/O/OA/OALDERS/HTTP-CookieMonster-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  perl >= 0:5.006
BuildRequires:  perl-generators
BuildRequires:  perl(Carp)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(File::Spec)
BuildRequires:  perl(HTTP::Cookies)
BuildRequires:  perl(Moo) >= 1.000003
BuildRequires:  perl(Safe::Isa)
BuildRequires:  perl(Scalar::Util)
BuildRequires:  perl(strict)
BuildRequires:  perl(Sub::Exporter)
BuildRequires:  perl(Test::Fatal)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(URI::Escape)
BuildRequires:  perl(warnings)

Requires:       perl(Carp)
Requires:       perl(HTTP::Cookies)
Requires:       perl(Moo) >= 1.000003
Requires:       perl(Safe::Isa)
Requires:       perl(Scalar::Util)
Requires:       perl(strict)
Requires:       perl(Sub::Exporter)
Requires:       perl(URI::Escape)
Requires:       perl(warnings)

%description
This module was created because messing around with HTTP::Cookies is non-
trivial. HTTP::Cookies a very useful module, but using it is not always as
easy and clean as it could be. For instance, if you want to find a
particular cookie, you can't just ask for it by name. Instead, you have to
use a callback:

%package help
Summary : Easy read/write access to your jar of HTTP::Cookies
Provides: perl-HTTP-CookieMonster-doc

%description help
This module was created because messing around with HTTP::Cookies is non-
trivial. HTTP::Cookies a very useful module, but using it is not always as
easy and clean as it could be. For instance, if you want to find a
particular cookie, you can't just ask for it by name. Instead, you have to
use a callback:

%prep
%setup -q -n HTTP-CookieMonster-%{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 CONTRIBUTORS cpanfile dist.ini LICENSE META.json perlcriticrc perltidyrc README.md tidyall.ini
%{perl_vendorlib}/*

%files help
%{_mandir}/*

%changelog
* Fri Feb 07 2025 sqfu <dev01203@linx-info.com> - 0.11-2
- drop useless perl(:MODULE_COMPAT) requirement

* Tue Jul 26 2022 wangshuo <wangshuo@kylinos.cn> 0.11-1
- Specfile autogenerated by Perl_Bot