Import package vendor original specs for necessary manipulations.

Tue, 28 Aug 2012 18:30:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:30:55 +0200
changeset 543
5e1f47ec716e
parent 542
a9edd9452022
child 544
b7947b261c13

Import package vendor original specs for necessary manipulations.

dspam/dspam.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dspam/dspam.spec	Tue Aug 28 18:30:55 2012 +0200
     1.3 @@ -0,0 +1,114 @@
     1.4 +##
     1.5 +##  dspam.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package version
    1.28 +%define       V_opkg 3.10.2
    1.29 +%define       V_dist 3.10.2
    1.30 +
    1.31 +#   package information
    1.32 +Name:         dspam
    1.33 +Summary:      Statistical Anti-Spam Filter
    1.34 +URL:          http://dspam.sourceforge.net/
    1.35 +Vendor:       Jonathan A. Zdziarski
    1.36 +Packager:     OpenPKG Foundation e.V.
    1.37 +Distribution: OpenPKG Community
    1.38 +Class:        BASE
    1.39 +Group:        Mail
    1.40 +License:      GPL
    1.41 +Version:      %{V_opkg}
    1.42 +Release:      20120424
    1.43 +
    1.44 +#   list of sources
    1.45 +Source0:      http://switch.dl.sourceforge.net/dspam/dspam-%{V_dist}.tar.gz
    1.46 +
    1.47 +#   build information
    1.48 +BuildPreReq:  OpenPKG, openpkg >= 20100101, pkgconfig
    1.49 +PreReq:       OpenPKG, openpkg >= 20100101
    1.50 +BuildPreReq:  sqlite
    1.51 +PreReq:       sqlite
    1.52 +
    1.53 +%description
    1.54 +    DSPAM (as in De-Spam) is an extremely scalable, open-source
    1.55 +    statistical anti-spam filter. While most commercial solutions only
    1.56 +    claim a mere 95% accuracy (1 error in 20), a majority of DSPAM users
    1.57 +    frequently see around 99.95% (1 error in 2000) and can sometimes
    1.58 +    reach peaks as high as 99.991% (2 errors in 22,786). DSPAM presently
    1.59 +    functions as both a server-side agent for UNIX email servers and a
    1.60 +    developer's library for mail clients, other anti-spam tools, and
    1.61 +    similar projects requiring drop-in spam filtering. DSPAM has been
    1.62 +    implemented on many large and small scale systems.
    1.63 +
    1.64 +%track
    1.65 +    prog dspam = {
    1.66 +        version   = %{version}
    1.67 +        url       = http://sourceforge.net/projects/dspam/files/
    1.68 +        regex     = dspam-(\d+\.\d+\.\d+)\.tar\.gz
    1.69 +    }
    1.70 +
    1.71 +%prep
    1.72 +    %setup -q -n dspam-%{V_dist}
    1.73 +    %{l_shtool} subst \
    1.74 +        -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
    1.75 +        -e 's;LIBS="-lm";LIBS="$LIBS -lm";' \
    1.76 +        configure
    1.77 +
    1.78 +%build
    1.79 +    CC="%{l_cc}" \
    1.80 +    CFLAGS="%{l_cflags -O} `pkg-config sqlite3 --cflags-only-other`" \
    1.81 +    CPPFLAGS="%{l_cppflags} `pkg-config sqlite3 --cflags-only-I`" \
    1.82 +    LDFLAGS="%{l_ldflags} `pkg-config sqlite3 --libs-only-other`" \
    1.83 +    LIBS="`pkg-config sqlite3 --libs-only-l`" \
    1.84 +    ./configure \
    1.85 +        --prefix=%{l_prefix} \
    1.86 +        --sysconfdir=%{l_prefix}/etc/dspam \
    1.87 +        --with-dspam-home=%{l_prefix}/share/dspam \
    1.88 +        --with-dspam-home-mode=755 \
    1.89 +        --with-dspam-home-owner="`%{l_shtool} echo -e %u`" \
    1.90 +        --with-dspam-home-group="`%{l_shtool} echo -e %g`" \
    1.91 +        --with-dspam-mode=755 \
    1.92 +        --with-dspam-owner="`%{l_shtool} echo -e %u`" \
    1.93 +        --with-dspam-group="`%{l_shtool} echo -e %g`" \
    1.94 +        --with-logdir=%{l_prefix}/var/dspam \
    1.95 +        --with-storage-driver="sqlite3_drv" \
    1.96 +        --with-sqlite-includes=%{l_prefix}/include \
    1.97 +        --with-sqlite-libraries=%{l_prefix}/lib \
    1.98 +        --disable-homedir \
    1.99 +        --disable-shared \
   1.100 +        --enable-warnings=no
   1.101 +    %{l_make} %{l_mflags -O}
   1.102 +
   1.103 +%install
   1.104 +    %{l_shtool} mkdir -f -p -m 755 \
   1.105 +        $RPM_BUILD_ROOT%{l_prefix}/man/man3 \
   1.106 +        $RPM_BUILD_ROOT%{l_prefix}/var/dspam
   1.107 +    %{l_shtool} subst -e 's;ln -s ;ln $(DESTDIR);g' Makefile
   1.108 +    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   1.109 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   1.110 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   1.111 +        %{l_files_std} \
   1.112 +        '%config %{l_prefix}/etc/dspam/dspam.conf'
   1.113 +
   1.114 +%files -f files
   1.115 +
   1.116 +%clean
   1.117 +

mercurial