dspam/dspam.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 543
5e1f47ec716e
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     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 ##
    24 #   package version
    25 %define       V_opkg 3.10.2
    26 %define       V_dist 3.10.2
    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:      20120800
    41 #   list of sources
    42 Source0:      http://switch.dl.sourceforge.net/dspam/dspam-%{V_dist}.tar.gz
    44 #   build information
    45 BuildPreReq:  OpenPKG, openpkg >= 20100101, pkgconfig
    46 PreReq:       OpenPKG, openpkg >= 20100101
    47 BuildPreReq:  sqlite
    48 PreReq:       sqlite
    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.
    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     }
    68 %prep
    69     %setup -q -n dspam-%{V_dist}
    71 %build
    72     CC="%{l_cc}" \
    73     CFLAGS="%{l_cflags -O} `pkg-config sqlite3 --cflags-only-other`" \
    74     CPPFLAGS="%{l_cppflags} `pkg-config sqlite3 --cflags-only-I`" \
    75     LDFLAGS="%{l_ldflags} `pkg-config sqlite3 --libs-only-other`" \
    76     LIBS="`pkg-config sqlite3 --libs-only-l`" \
    77     ./configure \
    78         --prefix=%{l_prefix} \
    79         --sysconfdir=%{l_prefix}/etc/dspam \
    80         --with-dspam-home=%{l_prefix}/share/dspam \
    81         --with-dspam-home-mode=755 \
    82         --with-dspam-home-owner="`%{l_shtool} echo -e %u`" \
    83         --with-dspam-home-group="`%{l_shtool} echo -e %g`" \
    84         --with-dspam-mode=755 \
    85         --with-dspam-owner="`%{l_shtool} echo -e %u`" \
    86         --with-dspam-group="`%{l_shtool} echo -e %g`" \
    87         --with-logdir=%{l_prefix}/var/dspam \
    88         --with-storage-driver="sqlite3_drv" \
    89         --with-sqlite-includes=%{l_prefix}/include \
    90         --with-sqlite-libraries=%{l_prefix}/lib \
    91         --disable-homedir \
    92         --disable-shared \
    93         --enable-warnings=no
    94     %{l_make} %{l_mflags}
    96 %install
    97     %{l_shtool} mkdir -f -p -m 755 \
    98         $RPM_BUILD_ROOT%{l_prefix}/man/man3 \
    99         $RPM_BUILD_ROOT%{l_prefix}/var/dspam
   100     %{l_shtool} subst -e 's;ln -s ;ln $(DESTDIR);g' Makefile
   101     %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
   102     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   103     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   104         %{l_files_std} \
   105         '%config %{l_prefix}/etc/dspam/dspam.conf'
   107 %files -f files
   109 %clean

mercurial