%define homedir /var/lib/dcc %define cgibin %{_localstatedir}/dcc/cgibin %define libexecdir %{_libexecdir}/dcc Summary: a clients-server system for collecting checksums of mail messages. Name: dcc Version: 1.3.163 Release: 1%{?dist} URL: https://www.dcc-servers.net/ Source0: https://www.dcc-servers.net/dcc/source/old/dcc-%{version}.tar.Z Source1: dcc_conf License: distributable for non-commercial use Group: Networking/Mail BuildRoot: %{_tmppath}/%{name}-root BuildRequires: sendmail-devel %description The DCC or Distributed Checksum Clearinghouse is currently a system of many clients and more than 120 servers that collects and count checksums related to several million mail messages per day, most as seen by Internet Service Providers. The counts can be used by SMTP servers and mail user agents to detect and reject or filter spam or unsolicited bulk mail. DCC servers exchange or "flood" common checksums. The checksums include values that are constant across common variations in bulk messages, including "personalizations." %prep %setup -q -n dcc-%{version} %build export CFLAGS="%{optflags}" ./configure \ --with-installroot=%{buildroot} \ %{?_without_dccm:--disable-dccm} \ --homedir=%{homedir} \ --with-cgibin=%{cgibin} \ --libexecdir=%{libexecdir} \ --bindir=%{_bindir} \ --disable-sys-inst \ --mandir=%{_mandir} make %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} grep -lr /usr/local/bin/ %{buildroot} | xargs sed -i "s|/usr/local/bin/|/usr/bin/|g" install -m755 -p %{SOURCE1} %{buildroot}/%{homedir}/ %clean rm -rf %{buildroot} %pre getent group dcc >/dev/null || \ groupadd -r dcc getent passwd dcc >/dev/null || \ useradd -r -g dcc -d %{homedir} \ -s /sbin/nologin -c "dcc" dcc exit 0 %files %defattr(-,root,root,-) %doc LICENSE FAQ.html CHANGES %dir %{homedir} %config(noreplace) %{homedir}/dcc_conf %config(noreplace) %{homedir}/flod %config(noreplace) %{homedir}/grey_flod %config(noreplace) %{homedir}/grey_whitelist %config(noreplace) %{homedir}/ids %config(noreplace) %{homedir}/log %config(noreplace) %{homedir}/map %config(noreplace) %{homedir}/map.txt %config(noreplace) %{homedir}/whiteclnt %config(noreplace) %{homedir}/whitecommon %config(noreplace) %{homedir}/whitelist %attr(4555,root,root) %{_bindir}/cdcc %attr(4555,root,root) %{_bindir}/dccproc %attr(0555,root,root) %{_bindir}/dccif-test %{libexecdir} %{cgibin} %changelog * Fri Mar 09 2018 josef radinger - 1.3.163-1 - bump version * Sat Dec 09 2017 josef radinger - 1.3.162-1 - bump version - remove FAQ.html.in - move homedir to /var/lib/dcc - add custom dcc_conf * Tue Nov 28 2017 josef radinger - 1.3.160-2 - use %%{dist} - add user dcc during installation - use optimization for make * Sat Nov 18 2017 josef radinger - 1.3.160-1 - bump version - transform /usr/local/bin to /usr/bin - small fix to spec-file * Sat Feb 18 2017 josef radinger - 1.3.159-1 - initial version - %%configure cannot be used