perl-WWW-CSRF/perl-WWW-CSRF.spec

65 lines
2.0 KiB
RPMSpec

Name: perl-WWW-CSRF
Version: 1.00
Release: 1%{?dist}
Summary: Generate and check tokens to protect against CSRF attacks
License: CHECK(Distributable)
Group: Development/Libraries
URL: http://search.cpan.org/dist/WWW-CSRF/
Source0: http://www.cpan.org/authors/id/S/SE/SESSE/WWW-CSRF-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(Bytes::Random::Secure)
BuildRequires: perl(Digest::HMAC_SHA1)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::ParseXS)
BuildRequires: perl(ExtUtils::Manifest)
BuildRequires: perl(Test::More)
Requires: perl(Bytes::Random::Secure)
Requires: perl(Digest::HMAC_SHA1)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
This module generates tokens to help protect against a website attack known
as Cross-Site Request Forgery (CSRF, also known as XSRF). CSRF is an attack
where an attacker fools a browser into make a request to a web server for
which that browser will automatically include some form of credentials
(cookies, cached HTTP Basic authentication, etc.), thus abusing the web
server's trust in the user for malicious use.
%prep
%setup -q -n WWW-CSRF-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
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/*
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes META.json
%{perl_vendorlib}/*
%{_mandir}/man3/*
%changelog
* Fri Jul 14 2023 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Mon Oct 08 2018 Daniel Berteaud <daniel@firewall-services.com> - 1.00-1
- First build using cpanspec