%global upname OpenDMARC %global bigname OPENDMARC Summary: A Domain-based Message Authentication, Reporting & Conformance (DMARC) milter and library Name: opendmarc Version: 1.4.2 Release: 1 License: BSD and Sendmail URL: http://www.trusteddomain.org/%{name}.html Source0: https://github.com/trusteddomainproject/OpenDMARC/archive/refs/tags/rel-opendmarc-1-4-2.tar.gz Patch01: opendmarc-1.4.0-ticket159-179.patch Requires: lib%{name}%{?_isa} = %{version}-%{release} BuildRequires: make BuildRequires: openssl-devel, libtool, pkgconfig, libbsd, libbsd-devel Requires(pre): shadow-utils BuildRequires: libmilter BuildRequires: libmilter-devel BuildRequires: systemd BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: mariadb-connector-c-devel BuildRequires: sendmail-milter-devel %description %{upname} (Domain-based Message Authentication, Reporting & Conformance) provides an open source library that implements the DMARC verification service plus a milter-based filter application that can plug in to any milter-aware MTA, including sendmail, Postfix, or any other MTA that supports the milter protocol. The DMARC sender authentication system is still a draft standard, working towards RFC status. The database schema required for some functions is provided in %{_datadir}/%{name}/db. The rddmarc tools are provided in %{_datadir}/%{name}/contrib/rddmarc. %package -n libopendmarc Summary: An open source DMARC library %description -n libopendmarc This package contains the library files required for running services built using libopendmarc. %package -n libopendmarc-devel Summary: Development files for libopendmarc Requires: lib%{name}%{?_isa} = %{version}-%{release} %description -n lib%{name}-devel This package contains the static libraries, headers, and other support files required for developing applications against libopendmarc. %prep %autosetup -p1 -n OpenDMARC-rel-opendmarc-1-4-2 %build autoreconf -v -i %configure --with-sql-backend --with-spf -with-spf2-include=%{_prefix}/include/spf2 make DESTDIR=%{buildroot} %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %{?_smp_mflags} mkdir -p %{buildroot}%{_sysconfdir} install -d %{buildroot}%{_sysconfdir}/sysconfig mkdir -p -m 0755 %{buildroot}%{_sysconfdir}/%{name} cat > %{buildroot}%{_sysconfdir}/sysconfig/%{name} << 'EOF' # Set the necessary startup options OPTIONS="-c %{_sysconfdir}/%{name}.conf" EOF install -d -m 0755 %{buildroot}%{_unitdir} cat > %{buildroot}%{_unitdir}/%{name}.service </dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || \ useradd -r -g %{name} -G mail -d %{_rundir}/%{name} -s /sbin/nologin \ -c "%{upname} Milter" %{name} exit 0 %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %ldconfig_scriptlets -n libopendmarc %files %license LICENSE LICENSE.Sendmail %doc README RELEASE_NOTES %config(noreplace) %{_sysconfdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_datadir}/%{name} %{_sbindir}/* %{_mandir}/*/* %dir %attr(-,%{name},%{name}) %{_localstatedir}/spool/%{name} %dir %attr(710,%{name},mail) %{_rundir}/%{name} %dir %attr(-,%{name},%{name}) %{_sysconfdir}/%{name} %attr(0644,root,root) %{_unitdir}/%{name}.service %files -n libopendmarc %{_libdir}/lib%{name}.so.* %files -n libopendmarc-devel %doc lib%{name}/docs/*.html %{_includedir}/%{name} %{_libdir}/*.so %changelog * Tue Oct 18 2022 openEuler Application - 1.4.2-1 - DESC:Package init