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.

85 lines
2.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../ezmlm/ezmlm.conf
  5. # Copyright (C) 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. ezmlm_idx_prepatch() {
  16. pkg_idx_ver=`echo $ver | sed -n 's,.*idx-\(.*\),\1,p'`
  17. pkg_idx_src=`match_source_file -p ezmlm-idx-$pkg_idx_ver ezmlm`
  18. # tempdir
  19. pkg_idx_tempdir=`mktemp -d`
  20. # extract ezmlm-idx sources to temp directory
  21. tar -C $pkg_idx_tempdir $taropt $pkg_idx_src
  22. # directory name of extracted sources
  23. pkg_idx_tempsrc="$pkg_idx_tempdir/ezmlm-idx-$pkg_idx_ver"
  24. # original idx patch distributed with the sources
  25. pkg_idx_srcpatch="$pkg_idx_tempsrc/idx.patch"
  26. # patch file we'll include
  27. pkg_idx_patch="$pkg_idx_tempdir/ezmlm-idx.patch"
  28. # fix original idx.patch and include it as ezmlm-idx.patch
  29. cat $pkg_idx_srcpatch | sed \
  30. -e "/^diff/d" \
  31. -e "s/^\(---\|+++\) /\1 \.\//g" > $pkg_idx_patch
  32. var_append patchfiles ' ' "$pkg_idx_patch"
  33. # copy content of ezmlm-idx tarball to ezmlm builddir
  34. cp -av $pkg_idx_tempsrc/* $builddir/$xsrcdir
  35. }
  36. ezmlm_idx_sub_db_conf() {
  37. echo_status "Configuring ezmlm to use $SDECFG_PKG_EZMLM_SUB for storing subscribers"
  38. echo "-I$root/$sub_incdir" > sub_$sub_db/conf-sqlcc
  39. echo "-L$root/$sub_libdir $sub_db_ld" > sub_$sub_db/conf-sqlld
  40. sed -i "s/^std/$sub_db/" conf-sub
  41. }
  42. ezmlm_conf() {
  43. pkgprefix -t qmail
  44. echo $bindir > conf-bin
  45. echo $mandir > conf-man
  46. echo /$( pkgprefix qmail ) > conf-qmail
  47. }
  48. case "$SDECFG_PKG_EZMLM_SUB" in
  49. postgresql)
  50. pkgprefix -t postgresql
  51. sub_db="pgsql"
  52. sub_db_ld="-lpq"
  53. sub_incdir="$( pkgprefix includedir postgresql )"
  54. sub_libdir="$( pkgprefix libdir postgresql )"
  55. hook_add preconf 5 "ezmlm_idx_sub_db_conf"
  56. ;;
  57. mysql)
  58. pkgprefix -t mysql
  59. sub_db="mysql"
  60. sub_db_ld="-lmysqlclient"
  61. sub_incdir="$( pkgprefix includedir mysql )/mysql"
  62. sub_libdir="$( pkgprefix libdir mysql )/mysql"
  63. hook_add preconf 5 "ezmlm_idx_sub_db_conf"
  64. ;;
  65. esac
  66. hook_add prepatch 5 "ezmlm_idx_prepatch"
  67. hook_add preconf 5 'ezmlm_conf'
  68. makeinstopt="$makeopt setup"