OpenSDE Packages Database (without history before r20070)
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.

70 lines
2.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../nullmailer/nullmailer.conf
  5. # Copyright (C) 2006 - 2007 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. if [ "$SDECFG_PKG_NULLMAILER_LOCALQUEUE" == "1" ]; then
  17. nullmailer_lq_create() {
  18. mkdir -p $root/home/nullmail/mail
  19. chown -R 38:38 $root/home/nullmail
  20. add_flist $root/home/nullmail/mail
  21. }
  22. hook_add postmake 3 'nullmailer_lq_create'
  23. var_append flistroot ' ' 'home'
  24. gawk "
  25. BEGIN { FS=\"[ /\t]\"
  26. removethis=0
  27. }
  28. /^--- / {
  29. if ( \$3 == \"nullmailer-1.00.spec\" )
  30. removethis=1
  31. else
  32. removethis=0
  33. }
  34. /.*/ {
  35. if ( removethis != 1 )
  36. print
  37. }
  38. " $( match_source_file -p nullmail-lq ) > $builddir/nullmailer-lq.patch
  39. var_append patchfiles ' ' "$builddir/nullmailer-lq.patch"
  40. fi
  41. nullmailer_fix_makefilein() {
  42. # change makefile to use uid instead of username
  43. # and to install nullmailer for beed used with setmailer_*
  44. sed -i -e 's,chown nullmail[^ ]*,chown 38,g' \
  45. -e 's,(bindir)/mailq,(bindir)/mailq_nullmailer,' \
  46. Makefile.in
  47. }
  48. nullmailer_postmake() {
  49. eval $MAKE DESTDIR=$root install-root
  50. add_flist $root$localstatedir/nullmailer/trigger
  51. if [ ! -f $root/etc/nullmailer/pausetime ] ; then
  52. echo "60" > $root/etc/nullmailer/pausetime
  53. fi
  54. if [ ! -f $root/etc/nullmailer/remotes ] ; then
  55. echo -e "127.0.0.1\tsmtp" > $root/etc/nullmailer/remotes
  56. fi
  57. install_setmailer nullmailer
  58. }
  59. hook_add postpatch 5 'nullmailer_fix_makefilein'
  60. hook_add postmake 5 'nullmailer_postmake'
  61. var_append INSTALL_WRAPPER_FILTER '|' "sed -e 's,\(mailq\|sendmail\),\1_nullmailer,'"