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.

110 lines
3.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../qmail/qmail.conf
  5. # Copyright (C) 2006 - 2007 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. controldir="${controldir:-var/qmail/control}"
  16. sysconfdir="${sysconfdir:-var/qmail/supervise}"
  17. queuedir="${queuedir:-var/qmail/queue}"
  18. logdir="${logdir:-var/qmail/log}"
  19. if [ "$prefix_auto" == "1" ]; then
  20. prefix="var/qmail"
  21. set_confopt
  22. sysconfdir=var/qmail/supervise
  23. fi
  24. pkg_qmail_symlinks() {
  25. if [ "$1" != "$2" -a ! -e "$root/$2" ]; then
  26. set -x
  27. mkdir -vp "$root/$1"
  28. ln -vs $( echo $2 | sed -e 's,[^/]*/,../,g' | tr -d [a-z] )$1 $root/$2
  29. set +x
  30. fi
  31. }
  32. # compatibility symlinks if needed
  33. #
  34. hook_add preconf 2 'pkg_qmail_symlinks "$prefix" "var/qmail"'
  35. hook_add preconf 4 'pkg_qmail_symlinks "$controldir" "var/qmail/control"'
  36. hook_add preconf 4 'pkg_qmail_symlinks "$sysconfdir" "var/qmail/supervise"'
  37. hook_add preconf 4 'pkg_qmail_symlinks "$queuedir" "var/qmail/queue"'
  38. hook_add preconf 4 'pkg_qmail_symlinks "$logdir" "var/qmail/log"'
  39. # the author loves to use head -1 and tail -1
  40. #
  41. hook_add preconf 5 "sed -i \
  42. -e 's,head -,head -n ,g' \
  43. -e 's,tail -,tail -n ,g' Makefile"
  44. # make setup
  45. #
  46. hook_add inmake 5 'eval "$MAKE $makeopt man"'
  47. makeinstopt=""
  48. hook_add postmake 1 './install'
  49. # install qmail's 'sendmail' wrappers
  50. #
  51. pkg_qmail_sendmailwrappers() {
  52. ln -sf /$prefix/bin/sendmail $root/usr/bin/sendmail_qmail
  53. ln -sf /$prefix/bin/qmail-qread $root/usr/bin/mailq_qmail
  54. # this is part of fastforward but fits better here
  55. ln -sf /$prefix/bin/newaliases $root/usr/bin/newaliases_qmail
  56. install_setmailer qmail
  57. }
  58. hook_add postinstall 5 'pkg_qmail_sendmailwrappers'
  59. # profile.d
  60. #
  61. pkg_qmail_profiled() {
  62. local rc=$root/var/qmail/boot/multi
  63. cat <<- EOT > $root/etc/profile.d/qmail
  64. export MANPATH=\$MANPATH:$mandir
  65. #export PATH=\$PATH:$bindir
  66. EOT
  67. if [ ! -e $rc ]; then
  68. # and multilog rc
  69. cat <<- EOT > $rc
  70. #!/bin/sh
  71. # Without logger, to use multilog outside
  72. # Using qmail-local to deliver messages according to control/defaultdelivery
  73. exec env - PATH="/$prefix/bin:\$PATH" \\
  74. qmail-start \$( cat /$controldir/defaultdelivery )
  75. EOT
  76. chmod +x $rc
  77. fi
  78. [ ! -e $root/var/qmail/rc ] && \
  79. ln -vs boot/multi $root/var/qmail/rc || true
  80. }
  81. hook_add postmake 5 'pkg_qmail_profiled'
  82. # fifo is not flisted
  83. hook_add postmake 6 'add_flist $prefix/queue/lock/trigger'
  84. createdoc=0
  85. # WARNING! Patched copies of qmail can't be re-distributed and they are unsupported
  86. #
  87. [ "$SDECFG_PKG_QMAIL_LDAP" == "1" ] && . $confdir/qmail-ldap.conf
  88. [ "$SDECFG_PKG_QMAIL_QUEUE" == "1" ] && var_append patchfiles ' ' "$( match_source_file -p qmailqueue )"
  89. [ "$SDECFG_PKG_QMAIL_QMTP" == "1" ] && var_append patchfiles ' ' "$( match_source_file -p qmtpc )"
  90. [ "$SDECFG_PKG_QMAIL_HOLD" == "1" ] && var_append patchfiles ' ' "$( match_source_file -p hold )"