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.

64 lines
2.2 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../strongswan/strongswan.conf
  5. # Copyright (C) 2004 - 2006 The T2 SDE 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. # --- T2-COPYRIGHT-NOTE-END ---
  14. if [ $prefix_auto = 1 ] ; then
  15. if [ "$ROCKCFG_PKG_STRONGSWAN_PREFIX" ] ; then
  16. prefix="$ROCKCFG_PKG_STRONGSWAN_PREFIX"
  17. else
  18. prefix="opt/strongswan"
  19. fi
  20. set_confopt
  21. fi
  22. var_append makeopt " " "programs"
  23. strongswan_premake () {
  24. # 2005-06-17: Christian Wiese <jeru@ixplanet.org>
  25. # it seems that strongswan doesn't like the appending of certain makeopt's
  26. # so we've to use sed for now for tweaking the Makefiles.
  27. # Any ideas for solving this issue are higly appreciated ;)
  28. PLUTO_MAKEFILE="programs/pluto/Makefile"
  29. # setting install prefix
  30. # var_append makeopt ' ' "DESTDIR=/"
  31. # var_append makeopt ' ' "INC_USRLOCAL=/$prefix"
  32. sed -i "/INC_USRLOCAL=/s,/.*,/$prefix," Makefile.inc
  33. # setting config file location
  34. var_append makeopt ' ' "FINALCONFDIR=$sysconfdir"
  35. # checking if we can enable CRL fetching using HTTP
  36. if pkginstalled curl; then
  37. # var_append makeopt ' ' "LIBCURL=1"
  38. sed -i 's/^#\(LIBCURL\)/\1/' $PLUTO_MAKEFILE
  39. fi
  40. # checking if we can enable CRL fetching using LDAP
  41. if pkginstalled openldap; then
  42. pkgprefix -t openldap
  43. var_append CFLAGS ' ' "-I$( pkgprefix includedir openldap )"
  44. var_append CPPFLAGS ' ' "-I$( pkgprefix includedir openldap )"
  45. var_append LDFLAGS ' ' "-L$( pkgprefix libdir openldap )"
  46. export CPPFLAGS CFLAGS LDFLAGS
  47. # var_append makeopt ' ' "LDAP_VERSION=3"
  48. sed -i 's/^#\(LDAP_VERSION=3\)/\1/' $PLUTO_MAKEFILE
  49. fi
  50. var_append makeopt ' ' "USERCOMPILE=$CFLAGS"
  51. }
  52. hook_add premake 5 "strongswan_premake"