Specify all dependencies; Use make_build and make_install macros

This commit is contained in:
Jitka Plesnikova 2020-02-13 11:00:38 +01:00
parent 12c66ba31c
commit fa388be020

View File

@ -1,14 +1,27 @@
Name: perl-NTLM
Version: 1.09
Release: 23%{?dist}
Release: 24%{?dist}
Summary: NTLM Perl module
License: GPL+ or Artistic
URL: https://metacpan.org/release/NTLM
Source0: https://cpan.metacpan.org/authors/id/N/NB/NBEBOUT/NTLM-%{version}.tar.gz
BuildArch: noarch
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker) perl(Digest::HMAC_MD5)
BuildRequires: perl(Test::More) perl(Test::Pod)
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
# Run-time
BuildRequires: perl(constant)
BuildRequires: perl(Digest::HMAC_MD5)
BuildRequires: perl(Exporter)
BuildRequires: perl(MIME::Base64)
BuildRequires: perl(strict)
BuildRequires: perl(vars)
# Tests
BuildRequires: perl(Test::More)
BuildRequires: perl(warnings)
# Optional tests
BuildRequires: perl(Test::Pod)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
@ -21,17 +34,11 @@ on its own for NTLM authentication with other protocols (eg. HTTP).
%setup -q -n NTLM-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%{__perl} Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
%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 \;
%{make_install}
%{_fixperms} $RPM_BUILD_ROOT/*
%check
@ -43,6 +50,10 @@ make test
%{_mandir}/man3/*
%changelog
* Thu Feb 13 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.09-24
- Specify all dependencies
- Modernize spec file
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.09-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild