Package rspamd: Specfile

Name: rspamd
Version: 0.3.14
Release: alt1

Summary: Fast and modular antispam system written in C

License: BSD
Group: Networking/Other
Url: http://bitbucket.org/vstakhov/rspamd/

Packager: Vitaly Lipatov <lav@altlinux.ru>

# Original repo cloning instruction:
# $ hg clone http://bitbucket.org/vstakhov/rspamd rspamd.hg
# $ mkdir rspamd && cd mkdir rspamd
# $ hg-fast-export -r ../rspamd.hg [--force]
# $ git branch

# For update hg:
# $ hg pull ; hg update
# $ cd rspamd (branch hg)
# $ hg-fast-export -r ../rspamd.hg [--force]

Source: %name-%version.tar

# Automatically added by buildreq on Sun Oct 17 2010
BuildRequires: ccmake dpkg glibc-devel libevent1.4-devel libgmime-devel liblua5-devel perl-devel

BuildRequires: perl-XML-Parser
BuildRequires: perl-Term-Cap

%description
Rspamd filtering system is created as a replacement of popular
spamassassin spamd and is designed to be fast, modular and easily
extendable system. Rspamd core is written in C language using event
driven paradigma. Plugins for rspamd can be written in lua. Rspamd is
designed to process connections completely asynchronous and do not block
anywhere in code.

%prep
%setup

%build
%__subst "s|/init.d|/rc.d/init.d|g" CMakeLists.txt
%__subst "s|.*/lib/init.*||g" linux/%name
%__subst 's|SET(ETC_PREFIX "\${CMAKE_INSTALL_PREFIX}/etc")|SET(ETC_PREFIX "/etc")|g' CMakeLists.txt
%cmake_insource
# SMP incompatible build
%make

%install
%makeinstall_std
mkdir -p %buildroot%_runtimedir/%name/

mkdir -p %buildroot%_datadir/
mv -f %buildroot/usr/man/ %buildroot/%_datadir/
mv -f %buildroot/usr/etc/ %buildroot/
test -d %buildroot%_libdir/ || mv -f %buildroot/usr/lib/ %buildroot%_libdir/

mv -f %buildroot%_sysconfdir/%name.xml.sample %buildroot%_sysconfdir/%name.xml

# TODO
rm -f %buildroot%_includedir/librspamdclient.h
rm -f %buildroot%_libdir/librspamdclient_static.a


%files
%config(noreplace) %_initdir/%name
%_sysconfdir/%name/
%config(noreplace) %_sysconfdir/%name.xml
%_bindir/rspamc*
%_bindir/rspamd*
%_libdir/librspamdclient.so.*
%_libdir/*.so
%_man1dir/*
%_man8dir/*
%attr(0710,root,root) %dir %_runtimedir/%name/

%changelog
* Wed Jun 15 2011 Vitaly Lipatov <lav@altlinux.ru> 0.3.14-alt1
- new build 0.3.14

* Sun Nov 07 2010 Vladimir Lettiev <crux@altlinux.ru> 0.3.2-alt1.1
- rebuilt with perl 5.12

* Sun Oct 17 2010 Vitaly Lipatov <lav@altlinux.ru> 0.3.2-alt1
- initial build for ALT Linux Sisyphus