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.

59 lines
1.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../openvpn/openvpn.conf
  5. # Copyright (C) 2007 - 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. plugin_libdir="${libdir}/openvpn"
  15. plugins_enabled=''
  16. build_plugin() {
  17. local plugin=$1; shift
  18. echo "Building openvpn plugin $plugin..."
  19. cd plugin/$plugin
  20. eval $MAKE $makeopt
  21. cp *.so ${root}${plugin_libdir}
  22. cd ../..
  23. }
  24. build_plugins() {
  25. install -d ${root}${plugin_libdir}
  26. for plugin in $plugins_enabled; do
  27. build_plugin $plugin
  28. done
  29. }
  30. # allow passwords to be read from a file
  31. var_append confopt ' ' "--enable-password-save"
  32. # where openvpn should search for plugins
  33. var_append CFLAGS ' ' "-DPLUGIN_LIBDIR${plugin_libdir}"
  34. # iproute2 support
  35. pkginstalled iproute2 && var_append confopt ' ' "--enable-iproute2"
  36. if ! pkginstalled lzo ; then
  37. var_append confopt ' ' "--disable-lzo"
  38. echo_warning "LZO Compression Support disabled! (lzo package not installed)"
  39. fi
  40. # pam authentication plugin
  41. pkginstalled -f pam && var_append plugins_enabled ' ' "auth-pam"
  42. # build plugins when $plugins_enabled is not empty
  43. if [ ! -z "$plugins_enabled" ]; then
  44. echo_warning "Enabling OpenVPN plugins: $plugins_enabled"
  45. hook_add postmake 3 build_plugins
  46. fi