File perl-spamassassin-dmarc.spec of Package perl-spamassassin-dmarc

Name:           perl-spamassassin-dmarc
Version:        1.0.0
Release:        0
Summary:        SpamAssassin DMARC plugin
License:        Apache-2.0
Group:          Productivity/Networking/Email/Utilities
URL:            https://github.com/bigio/spamassassin-dmarc
Source:         %{name}-%{version}.tar.gz
Source1:        dmarc.cf
Source2:        mail-dmarc.ini
BuildArch:      noarch
PreReq:         %fillup_prereq
%{perl_requires}
BuildRequires:  man-pages-posix
BuildRequires:  perl-macros
BuildRequires:  perl-Mail-SpamAssassin
Requires:       perl
Requires:       perl-Mail-DMARC
Requires:       perl-Mail-SpamAssassin

%description
SpamAssassin DMARC plugin

%prep

%setup

%build

%install
install -D -m 0644 dmarc.pm %{buildroot}%{perl_vendorlib}/Mail/SpamAssassin/Plugin/dmarc.pm
install -D -m 0644 dmarc.pre %{buildroot}%{_sysconfdir}/mail/spamassassin/dmarc.pre
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/mail/spamassassin/dmarc.cf
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/mail-dmarc.ini
install -D -m 0644 man/man3p/Mail::SpamAssassin::Plugin::Dmarc.3p %{buildroot}%{_mandir}/man3p/Mail::SpamAssassin::Plugin::Dmarc.3p
gzip %{buildroot}%{_mandir}/man3p/Mail::SpamAssassin::Plugin::Dmarc.3p
echo "loadplugin Mail::SpamAssassin::Plugin::Dmarc %{perl_vendorlib}/Mail/SpamAssassin/Plugin/dmarc.pm" > %{buildroot}%{_sysconfdir}/mail/spamassassin/dmarc.pre


%files

%config(noreplace) %{_sysconfdir}/mail/spamassassin/dmarc.pre
%config(noreplace) %{_sysconfdir}/mail/spamassassin/dmarc.cf
%config(noreplace) %{_sysconfdir}/mail-dmarc.ini
%attr(0644, root, root) %{perl_vendorlib}/Mail/SpamAssassin/Plugin/dmarc.pm
%{_mandir}/*/*
%doc LICENSE README.md

%changelog