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.

71 lines
2.0 KiB

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