|
1 ## |
|
2 ## dspam.spec -- OpenPKG RPM Package Specification |
|
3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
4 ## |
|
5 ## Permission to use, copy, modify, and distribute this software for |
|
6 ## any purpose with or without fee is hereby granted, provided that |
|
7 ## the above copyright notice and this permission notice appear in all |
|
8 ## copies. |
|
9 ## |
|
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
21 ## SUCH DAMAGE. |
|
22 ## |
|
23 |
|
24 # package version |
|
25 %define V_opkg 3.10.2 |
|
26 %define V_dist 3.10.2 |
|
27 |
|
28 # package information |
|
29 Name: dspam |
|
30 Summary: Statistical Anti-Spam Filter |
|
31 URL: http://dspam.sourceforge.net/ |
|
32 Vendor: Jonathan A. Zdziarski |
|
33 Packager: OpenPKG Foundation e.V. |
|
34 Distribution: OpenPKG Community |
|
35 Class: BASE |
|
36 Group: Mail |
|
37 License: GPL |
|
38 Version: %{V_opkg} |
|
39 Release: 20120424 |
|
40 |
|
41 # list of sources |
|
42 Source0: http://switch.dl.sourceforge.net/dspam/dspam-%{V_dist}.tar.gz |
|
43 |
|
44 # build information |
|
45 BuildPreReq: OpenPKG, openpkg >= 20100101, pkgconfig |
|
46 PreReq: OpenPKG, openpkg >= 20100101 |
|
47 BuildPreReq: sqlite |
|
48 PreReq: sqlite |
|
49 |
|
50 %description |
|
51 DSPAM (as in De-Spam) is an extremely scalable, open-source |
|
52 statistical anti-spam filter. While most commercial solutions only |
|
53 claim a mere 95% accuracy (1 error in 20), a majority of DSPAM users |
|
54 frequently see around 99.95% (1 error in 2000) and can sometimes |
|
55 reach peaks as high as 99.991% (2 errors in 22,786). DSPAM presently |
|
56 functions as both a server-side agent for UNIX email servers and a |
|
57 developer's library for mail clients, other anti-spam tools, and |
|
58 similar projects requiring drop-in spam filtering. DSPAM has been |
|
59 implemented on many large and small scale systems. |
|
60 |
|
61 %track |
|
62 prog dspam = { |
|
63 version = %{version} |
|
64 url = http://sourceforge.net/projects/dspam/files/ |
|
65 regex = dspam-(\d+\.\d+\.\d+)\.tar\.gz |
|
66 } |
|
67 |
|
68 %prep |
|
69 %setup -q -n dspam-%{V_dist} |
|
70 %{l_shtool} subst \ |
|
71 -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \ |
|
72 -e 's;LIBS="-lm";LIBS="$LIBS -lm";' \ |
|
73 configure |
|
74 |
|
75 %build |
|
76 CC="%{l_cc}" \ |
|
77 CFLAGS="%{l_cflags -O} `pkg-config sqlite3 --cflags-only-other`" \ |
|
78 CPPFLAGS="%{l_cppflags} `pkg-config sqlite3 --cflags-only-I`" \ |
|
79 LDFLAGS="%{l_ldflags} `pkg-config sqlite3 --libs-only-other`" \ |
|
80 LIBS="`pkg-config sqlite3 --libs-only-l`" \ |
|
81 ./configure \ |
|
82 --prefix=%{l_prefix} \ |
|
83 --sysconfdir=%{l_prefix}/etc/dspam \ |
|
84 --with-dspam-home=%{l_prefix}/share/dspam \ |
|
85 --with-dspam-home-mode=755 \ |
|
86 --with-dspam-home-owner="`%{l_shtool} echo -e %u`" \ |
|
87 --with-dspam-home-group="`%{l_shtool} echo -e %g`" \ |
|
88 --with-dspam-mode=755 \ |
|
89 --with-dspam-owner="`%{l_shtool} echo -e %u`" \ |
|
90 --with-dspam-group="`%{l_shtool} echo -e %g`" \ |
|
91 --with-logdir=%{l_prefix}/var/dspam \ |
|
92 --with-storage-driver="sqlite3_drv" \ |
|
93 --with-sqlite-includes=%{l_prefix}/include \ |
|
94 --with-sqlite-libraries=%{l_prefix}/lib \ |
|
95 --disable-homedir \ |
|
96 --disable-shared \ |
|
97 --enable-warnings=no |
|
98 %{l_make} %{l_mflags -O} |
|
99 |
|
100 %install |
|
101 %{l_shtool} mkdir -f -p -m 755 \ |
|
102 $RPM_BUILD_ROOT%{l_prefix}/man/man3 \ |
|
103 $RPM_BUILD_ROOT%{l_prefix}/var/dspam |
|
104 %{l_shtool} subst -e 's;ln -s ;ln $(DESTDIR);g' Makefile |
|
105 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
|
106 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
107 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
108 %{l_files_std} \ |
|
109 '%config %{l_prefix}/etc/dspam/dspam.conf' |
|
110 |
|
111 %files -f files |
|
112 |
|
113 %clean |
|
114 |