File perl-Mail-DKIM.spec of Package perl-Mail-DKIM

#
# spec file for package perl-Mail-DKIM
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           perl-Mail-DKIM
Version:        0.40
Release:        0
%define cpan_name Mail-DKIM
Summary:        Signs/verifies Internet mail with DKIM/DomainKey signatures
License:        GPL-2.0+
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Mail-DKIM/
#Source:         http://www.cpan.org/authors/id/J/JA/JASLONG/Mail-DKIM-0.39.tar.gz
Source:         %{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
%if 0%{?suse_version} && 0%{?suse_version} <= 1210
BuildRequires:  perl-macros
%endif
BuildRequires:  perl(Test::Simple)
#
BuildRequires:  perl(Crypt::OpenSSL::RSA) >= 0.24
BuildRequires:  perl(Digest::SHA)
BuildRequires:  perl(MIME::Base64)
BuildRequires:  perl(Mail::Address)
BuildRequires:  perl(Net::DNS)
#
Requires:       perl(Crypt::OpenSSL::RSA) >= 0.24
Requires:       perl(Digest::SHA)
Requires:       perl(MIME::Base64)
Requires:       perl(Mail::Address)
Requires:       perl(Net::DNS)
%{perl_requires}

%description
This module implements the various components of the DKIM and DomainKeys
message-signing and verifying standards for Internet mail. It currently
tries to implement these specifications:

* RFC4871, for DKIM

* RFC4870, for DomainKeys

The module uses an object-oriented interface. You use one of two different
classes, depending on whether you are signing or verifying a message. To
sign, use the the Mail::DKIM::Signer manpage class. To verify, use the the
Mail::DKIM::Verifier manpage class. Simple, eh?

%prep
%setup -q -n %{cpan_name}-%{version}
# disble policy.t, public_key.t in obs
%if ! %{with test}
%{__rm} t/policy.t
%{__rm} t/public_key.t
%endif

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
for script in dkimsign.pl dkimverify.pl; do
  %{__install} -D -m 0755 scripts/$script \
  %{buildroot}%{_bindir}/$script
done

%clean
%{__rm} -rf %{buildroot}

%files -f %{name}.files
%defattr(644,root,root,755)
%doc ChangeLog Changes HACKING.DKIM README TODO scripts
%defattr(-,root,root)
%{_bindir}/*

%changelog
openSUSE Build Service is sponsored by