Sisyphus repository
Last update: 29 november 2022 | SRPMs: 17934 | Visits: 25418800
en ru br
ALT Linux repos

Group :: System/Servers
RPM: bld

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define bld_user bld
%define bld_group bld
%define bld_home %_localstatedir/%name

%def_disable clang

Name: bld
Release: alt4

Summary: BLD stands for "blacklist daemon" and is intended to serve a blacklist.
Group: System/Servers
License: BSD
Source0: %name-%version.tar
Source1: %name.init
Source2: %name.conf
# patch from debian
Patch0: 01-fix_potential_core_dump
# patch from ALT
Patch1: bld-
Packager: Alexey Morsov <swi at>

%if_enabled clang
BuildRequires(pre): clang-devel
BuildRequires: perl-devel

BLD stands for "blacklist daemon" and is intended to serve a blacklist.
The blacklist is built by simply inserting IP addresses or by using
submission rate limits based on a maximum number of submissions of the
same IP address within a minimum time interval. You can build a BLD
cluster by configuring the daemon to notify other similar daemon(s)
every time an IP address is added to the blacklist. BLD was primarily
designed to fight against dictionary-based spams (by making the MTA
report to BLD any host that tries to send a mail to an unknown user)
but can be used by any program.

See %_defaultdocdir/%name-%version/COPYRIGHT for license.

%setup -q
%patch0 -p1
%patch1 -p2

%if_enabled clang
export CC="clang"
export CXX="clang++"
export AR="llvm-ar"
export NM="llvm-nm"
export READELF="llvm-readelf"


%make_install DESTDIR=%buildroot install
# dirs
install -d -m1711 %buildroot%_localstatedir/%name
install -d -m1755 %buildroot%_var/run/%name
install -d -m1755 %buildroot%_sysconfdir/%name

# files

install -pD -m0755 %SOURCE1 %buildroot%_initdir/%name
install -p -m0644 %SOURCE2 %buildroot%_sysconfdir
touch %buildroot%_sysconfdir/%name/bld_whitelist.conf
touch %buildroot%_sysconfdir/%name/bld_acl.conf

# docs

mkdir -p %buildroot%_defaultdocdir/%name-%version
cp COPYRIGHT ChangeLog README.postfix TODO bld.conf.sample %buildroot%_defaultdocdir/%name-%version/
rm -f %buildroot%_sbindir/ # it's broken

/usr/sbin/groupadd -r -f %bld_group ||:
/usr/sbin/useradd -g %bld_group -c 'blacklist daemon' \
       -d %bld_home -s /dev/null -r %bld_user >/dev/null 2>&1 ||:

%post_service %name

%preun_service %name

%doc COPYRIGHT ChangeLog README* TODO bld.conf.sample
%config(noreplace) %_sysconfdir/%name.conf
%config(noreplace) %_sysconfdir/%name/*
%dir %attr(1771,root,%bld_group) %_localstatedir/%name
%dir %attr(1775,root,%bld_group) %_var/run/%name


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin