spamassassin/rc.spamassassin

Sun, 03 Apr 2011 13:34:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 03 Apr 2011 13:34:55 +0200
changeset 337
f71e028eb3e2
parent 191
d980506f80fc
permissions
-rw-r--r--

Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.

Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.

     1 #!@l_prefix@/bin/openpkg rc
     2 ##
     3 ##  rc.spamassassin -- Run-Commands
     4 ##
     6 %config
     7     spamassassin_enable="$openpkg_rc_def"
     8     spamassassin_bind="127.0.0.1"
     9     spamassassin_port="783"
    10     spamassassin_flags="-x -u @l_rusr@ -A 127. --local --virtual-config-dir=@l_prefix@/var/spamassassin/spool/%u"
    11     spamassassin_stop_delay="2"
    12     spamassassin_log_prolog="true"
    13     spamassassin_log_epilog="true"
    14     spamassassin_log_numfiles="10"
    15     spamassassin_log_minsize="1M"
    16     spamassassin_log_complevel="9"
    18 %common
    19     spamassassin_etcdir="@l_prefix@/etc/spamassassin"
    20     spamassassin_pidfile="@l_prefix@/var/spamassassin/spamassassin.pid"
    21     spamassassin_logfile="@l_prefix@/var/spamassassin/spamassassin.log"
    22     spamassassin_signal () {
    23         [ -f $spamassassin_pidfile ] && kill -$1 `cat $spamassassin_pidfile`
    24     }
    26 %status -u @l_susr@ -o
    27     spamassassin_usable="unknown"
    28     spamassassin_active="no"
    29     rcService spamassassin enable yes && \
    30         spamassassin_signal 0 && spamassassin_active="yes"
    31     echo "spamassassin_enable=\"$spamassassin_enable\""
    32     echo "spamassassin_usable=\"$spamassassin_usable\""
    33     echo "spamassassin_active=\"$spamassassin_active\""
    35 %start -p 400 -u @l_susr@
    36     rcService spamassassin enable yes || exit 0
    37     rcService spamassassin active yes && exit 0
    38     @l_prefix@/bin/spamd \
    39         --daemonize \
    40         --siteconfigpath="${spamassassin_etcdir}" \
    41         --pidfile="${spamassassin_pidfile}" \
    42         --syslog="${spamassassin_logfile}" \
    43         --listen-ip="${spamassassin_bind}" \
    44         --port="${spamassassin_port}" \
    45         ${spamassassin_flags}
    47 %stop -p 400 -u @l_susr@
    48     rcService spamassassin enable yes || exit 0
    49     rcService spamassassin active no && exit 0
    50     spamassassin_signal TERM
    51     sleep "$spamassassin_stop_delay"
    53 %restart -p 600 -u @l_susr@
    54     rcService spamassassin enable yes || exit 0
    55     rcService spamassassin active no && exit 0
    56     rc spamassassin stop
    57     rc spamassassin start
    59 %daily -u @l_susr@
    60     rcService spamassassin enable yes || exit 0
    61     shtool rotate -f \
    62         -n ${spamassassin_log_numfiles} -s ${spamassassin_log_minsize} -d \
    63         -z ${spamassassin_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
    64         -P "${spamassassin_log_prolog}" \
    65         -E "${spamassassin_log_epilog}; rc spamassassin restart" \
    66         $spamassassin_logfile

mercurial