You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.0 KiB
71 lines
2.0 KiB
#!/bin/sh |
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../nullmailer/nullmailer.conf |
|
# Copyright (C) 2006 The OpenSDE Project |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# Copyright (C) 1998 - 2003 Clifford Wolf |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This program is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; version 2 of the License. A copy of the |
|
# GNU General Public License can be found in the file COPYING. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
if [ "$SDECFG_PKG_NULLMAILER_LOCALQUEUE" == "1" ]; then |
|
nullmailer_lq_create() { |
|
mkdir -p $root/home/nullmail/mail |
|
chown -R 38:38 $root/home/nullmail |
|
add_flist $root/home/nullmail/mail |
|
} |
|
|
|
hook_add postmake 3 'nullmailer_lq_create' |
|
var_append flistroot ' ' 'home' |
|
|
|
gawk " |
|
BEGIN { FS=\"[ /\t]\" |
|
removethis=0 |
|
} |
|
/^--- / { |
|
if ( \$3 == \"nullmailer-1.00.spec\" ) |
|
removethis=1 |
|
else |
|
removethis=0 |
|
} |
|
/.*/ { |
|
if ( removethis != 1 ) |
|
print |
|
} |
|
" $( match_source_file -p nullmail-lq ) > $builddir/nullmailer-lq.patch |
|
var_append patchfiles ' ' "$builddir/nullmailer-lq.patch" |
|
|
|
fi |
|
|
|
nullmailer_fix_makefilein() { |
|
# change makefile to use uid instead of username |
|
# and to install nullmailer for beed used with setmailer_* |
|
sed -i -e 's,chown nullmail[^ ]*,chown 38,g' \ |
|
-e 's,(bindir)/mailq,(bindir)/mailq_nullmailer,' \ |
|
Makefile.in |
|
} |
|
|
|
nullmailer_postmake() { |
|
eval $MAKE DESTDIR=$root install-root |
|
add_flist $root$localstatedir/nullmailer/trigger |
|
if [ ! -f $root/etc/nullmailer/pausetime ] ; then |
|
echo "60" > $root/etc/nullmailer/pausetime |
|
fi |
|
if [ ! -f $root/etc/nullmailer/remotes ] ; then |
|
echo -e "127.0.0.1\tsmtp" > $root/etc/nullmailer/remotes |
|
fi |
|
install_setmailer nullmailer |
|
} |
|
|
|
hook_add postpatch 5 'nullmailer_fix_makefilein' |
|
hook_add postmake 5 'nullmailer_postmake' |
|
|
|
var_append INSTALL_WRAPPER_FILTER '|' "sed -e 's,\(mailq\|sendmail\),\1_nullmailer,'" |
|
|
|
|