|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../strongswan/strongswan.conf
|
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
|
|
|
#
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
|
|
# GNU General Public License can be found in the file COPYING.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
if [ $prefix_auto = 1 ] ; then
|
|
|
|
if [ "$ROCKCFG_PKG_STRONGSWAN_PREFIX" ] ; then
|
|
|
|
prefix="$ROCKCFG_PKG_STRONGSWAN_PREFIX"
|
|
|
|
else
|
|
|
|
prefix="opt/strongswan"
|
|
|
|
fi
|
|
|
|
set_confopt
|
|
|
|
fi
|
|
|
|
|
|
|
|
var_append makeopt " " "programs"
|
|
|
|
|
|
|
|
strongswan_premake () {
|
|
|
|
|
|
|
|
# 2005-06-17: Christian Wiese <jeru@ixplanet.org>
|
|
|
|
# it seems that strongswan doesn't like the appending of certain makeopt's
|
|
|
|
# so we've to use sed for now for tweaking the Makefiles.
|
|
|
|
# Any ideas for solving this issue are higly appreciated ;)
|
|
|
|
|
|
|
|
PLUTO_MAKEFILE="programs/pluto/Makefile"
|
|
|
|
|
|
|
|
# setting install prefix
|
|
|
|
# var_append makeopt ' ' "DESTDIR=/"
|
|
|
|
# var_append makeopt ' ' "INC_USRLOCAL=/$prefix"
|
|
|
|
sed -i "/INC_USRLOCAL=/s,/.*,/$prefix," Makefile.inc
|
|
|
|
|
|
|
|
# setting config file location
|
|
|
|
var_append makeopt ' ' "FINALCONFDIR=$sysconfdir"
|
|
|
|
|
|
|
|
# checking if we can enable CRL fetching using HTTP
|
|
|
|
if pkginstalled curl; then
|
|
|
|
# var_append makeopt ' ' "LIBCURL=1"
|
|
|
|
sed -i 's/^#\(LIBCURL\)/\1/' $PLUTO_MAKEFILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
# checking if we can enable CRL fetching using LDAP
|
|
|
|
if pkginstalled openldap; then
|
|
|
|
pkgprefix -t openldap
|
|
|
|
var_append CFLAGS ' ' "-I$( pkgprefix includedir openldap )"
|
|
|
|
var_append CPPFLAGS ' ' "-I$( pkgprefix includedir openldap )"
|
|
|
|
var_append LDFLAGS ' ' "-L$( pkgprefix libdir openldap )"
|
|
|
|
export CPPFLAGS CFLAGS LDFLAGS
|
|
|
|
|
|
|
|
# var_append makeopt ' ' "LDAP_VERSION=3"
|
|
|
|
sed -i 's/^#\(LDAP_VERSION=3\)/\1/' $PLUTO_MAKEFILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
var_append makeopt ' ' "USERCOMPILE=$CFLAGS"
|
|
|
|
}
|
|
|
|
|
|
|
|
hook_add premake 5 "strongswan_premake"
|