michael@543: ## michael@543: ## dspam.spec -- OpenPKG RPM Package Specification michael@543: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@543: ## michael@543: ## Permission to use, copy, modify, and distribute this software for michael@543: ## any purpose with or without fee is hereby granted, provided that michael@543: ## the above copyright notice and this permission notice appear in all michael@543: ## copies. michael@543: ## michael@543: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@543: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@543: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@543: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@543: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@543: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@543: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@543: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@543: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@543: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@543: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@543: ## SUCH DAMAGE. michael@543: ## michael@543: michael@543: # package version michael@543: %define V_opkg 3.10.2 michael@543: %define V_dist 3.10.2 michael@543: michael@543: # package information michael@543: Name: dspam michael@543: Summary: Statistical Anti-Spam Filter michael@543: URL: http://dspam.sourceforge.net/ michael@543: Vendor: Jonathan A. Zdziarski michael@543: Packager: OpenPKG Foundation e.V. michael@543: Distribution: OpenPKG Community michael@543: Class: BASE michael@543: Group: Mail michael@543: License: GPL michael@543: Version: %{V_opkg} michael@544: Release: 20120800 michael@543: michael@543: # list of sources michael@543: Source0: http://switch.dl.sourceforge.net/dspam/dspam-%{V_dist}.tar.gz michael@543: michael@543: # build information michael@543: BuildPreReq: OpenPKG, openpkg >= 20100101, pkgconfig michael@543: PreReq: OpenPKG, openpkg >= 20100101 michael@543: BuildPreReq: sqlite michael@543: PreReq: sqlite michael@543: michael@543: %description michael@543: DSPAM (as in De-Spam) is an extremely scalable, open-source michael@543: statistical anti-spam filter. While most commercial solutions only michael@543: claim a mere 95% accuracy (1 error in 20), a majority of DSPAM users michael@543: frequently see around 99.95% (1 error in 2000) and can sometimes michael@543: reach peaks as high as 99.991% (2 errors in 22,786). DSPAM presently michael@543: functions as both a server-side agent for UNIX email servers and a michael@543: developer's library for mail clients, other anti-spam tools, and michael@543: similar projects requiring drop-in spam filtering. DSPAM has been michael@543: implemented on many large and small scale systems. michael@543: michael@543: %track michael@543: prog dspam = { michael@543: version = %{version} michael@543: url = http://sourceforge.net/projects/dspam/files/ michael@543: regex = dspam-(\d+\.\d+\.\d+)\.tar\.gz michael@543: } michael@543: michael@543: %prep michael@543: %setup -q -n dspam-%{V_dist} michael@543: michael@543: %build michael@543: CC="%{l_cc}" \ michael@543: CFLAGS="%{l_cflags -O} `pkg-config sqlite3 --cflags-only-other`" \ michael@543: CPPFLAGS="%{l_cppflags} `pkg-config sqlite3 --cflags-only-I`" \ michael@543: LDFLAGS="%{l_ldflags} `pkg-config sqlite3 --libs-only-other`" \ michael@543: LIBS="`pkg-config sqlite3 --libs-only-l`" \ michael@543: ./configure \ michael@543: --prefix=%{l_prefix} \ michael@543: --sysconfdir=%{l_prefix}/etc/dspam \ michael@543: --with-dspam-home=%{l_prefix}/share/dspam \ michael@543: --with-dspam-home-mode=755 \ michael@543: --with-dspam-home-owner="`%{l_shtool} echo -e %u`" \ michael@543: --with-dspam-home-group="`%{l_shtool} echo -e %g`" \ michael@543: --with-dspam-mode=755 \ michael@543: --with-dspam-owner="`%{l_shtool} echo -e %u`" \ michael@543: --with-dspam-group="`%{l_shtool} echo -e %g`" \ michael@543: --with-logdir=%{l_prefix}/var/dspam \ michael@543: --with-storage-driver="sqlite3_drv" \ michael@543: --with-sqlite-includes=%{l_prefix}/include \ michael@543: --with-sqlite-libraries=%{l_prefix}/lib \ michael@543: --disable-homedir \ michael@543: --disable-shared \ michael@543: --enable-warnings=no michael@544: %{l_make} %{l_mflags} michael@543: michael@543: %install michael@543: %{l_shtool} mkdir -f -p -m 755 \ michael@543: $RPM_BUILD_ROOT%{l_prefix}/man/man3 \ michael@543: $RPM_BUILD_ROOT%{l_prefix}/var/dspam michael@543: %{l_shtool} subst -e 's;ln -s ;ln $(DESTDIR);g' Makefile michael@544: %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" michael@543: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true michael@543: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@543: %{l_files_std} \ michael@543: '%config %{l_prefix}/etc/dspam/dspam.conf' michael@543: michael@543: %files -f files michael@543: michael@543: %clean michael@543: