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.

84 lines
2.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../jabberd2/jabberd2.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. # Unfortunately jabberd uses different package names for the same
  16. # packages. So we need a way to convert T2 package names to jabberd
  17. # package names. Just pass the T2 package name and the jabberd
  18. # packaage name will be returned.
  19. get_jabberd_package_name() {
  20. case "$1" in
  21. postgresql) echo "pgsql" ;;
  22. bdb) echo "db" ;;
  23. openldap) echo "ldap" ;;
  24. openssl) echo "ssl" ;;
  25. libidn) echo "idn" ;;
  26. *) echo "$1" ;;
  27. esac
  28. }
  29. # Jabber wants its own directory with the proper group rights.
  30. prefix=opt/jabber
  31. set_confopt
  32. extraincdir="$(pkgprefix includedir glibc)"
  33. extralibdir="$(pkgprefix libdir glibc)"
  34. # Add support for the following packages if they are available.
  35. for pkgname in openssl libidn postgresql mysql bdb pam openldap; do
  36. # unfortunately the configure option sometimes uses different names.
  37. confpkgname=$(get_jabberd_package_name $pkgname)
  38. # Is this package available?
  39. if pkginstalled $pkgname; then
  40. # Yuck, mysql header files and libs can not be found in the
  41. # normal include and lib dir, but in include dir / mysql.
  42. include_dir=$(pkgprefix includedir $pkgname)
  43. library_dir=$(pkgprefix libdir $pkgname)
  44. if [ "$pkgname" == mysql ]; then
  45. include_dir="$include_dir/mysql"
  46. library_dir="$library_dir/mysql"
  47. fi
  48. # Include this package properly in the configure options.
  49. var_append extraconfopt " " "--enable-$confpkgname"
  50. var_append extraincdir ":" "$include_dir"
  51. var_append extralibdir ":" "$library_dir"
  52. else
  53. var_append extraconfopt " " "--disable-$confpkgname"
  54. fi
  55. done
  56. # Add additional include dirs if available.
  57. if [ -n $extraincdir ]; then
  58. # Now add the extra include dirs to the configure options.
  59. var_append extraconfopt " " "--with-extra_include_path=$extraincdir"
  60. fi
  61. # Same for additional library dirs.
  62. if [ -n $extralibdir ]; then
  63. # Now add the extra library dirs to the configure options.
  64. var_append extraconfopt " " "--with-extra_library_path=$extralibdir"
  65. fi
  66. jabber_preconf() {
  67. # Make sure the prefix directory has the proper access rights.
  68. chgrp jabber $root/$prefix
  69. chmod a+rx,g+ws $root/$prefix
  70. # Also ensure the state dir has the proper access rights.
  71. chgrp jabber $localstatedir
  72. chmod a+rx,g+ws $localstatedir
  73. }
  74. hook_add preconf 5 "jabber_preconf"