diff options
Diffstat (limited to 'package/openswan')
-rw-r--r-- | package/openswan/Config.in | 10 | ||||
-rw-r--r-- | package/openswan/Makefile | 59 | ||||
-rw-r--r-- | package/openswan/files/openswan.init | 27 | ||||
-rw-r--r-- | package/openswan/ipkg/openswan.conffiles | 1 | ||||
-rw-r--r-- | package/openswan/ipkg/openswan.control | 5 | ||||
-rw-r--r-- | package/openswan/ipkg/openswan.postinst | 3 | ||||
-rw-r--r-- | package/openswan/patches/patch-lib_libdns_Makefile | 10 | ||||
-rw-r--r-- | package/openswan/patches/patch-lib_libopenswan_alg_info_c | 12 | ||||
-rw-r--r-- | package/openswan/patches/patch-programs_ikeping_ikeping_c | 12 |
9 files changed, 139 insertions, 0 deletions
diff --git a/package/openswan/Config.in b/package/openswan/Config.in new file mode 100644 index 000000000..9bb43fa5c --- /dev/null +++ b/package/openswan/Config.in @@ -0,0 +1,10 @@ +config ADK_PACKAGE_OPENSWAN + prompt "openswan.......................... VPN solution using IPsec" + tristate + default n + select ADK_PACKAGE_IP + select ADK_PACKAGE_LIBGMP + help + Openswan is an implementation of IPsec for Linux. + + http://www.openswan.org/ diff --git a/package/openswan/Makefile b/package/openswan/Makefile new file mode 100644 index 000000000..372b52a4e --- /dev/null +++ b/package/openswan/Makefile @@ -0,0 +1,59 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= openswan +PKG_VERSION:= 2.6.21 +PKG_RELEASE:= 1 +PKG_MD5SUM:= ba9da6c90e0f5fe856767d7510ce371f +MASTER_SITES:= http://www.openswan.org/download/ \ + ftp://ftp.openswan.org/openswan/ + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,OPENSWAN,openswan,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +FLAGS:= ${TCFLAGS} ${TCPPFLAGS} ${TLDFLAGS} + +do-build: + ${MAKE} -C ${WRKBUILD} \ + ${TARGET_CONFIGURE_OPTS} \ + KERNELSRC="${LINUX_DIR}" \ + ARCH="${ARCH}" \ + USERCOMPILE="${FLAGS}" \ + EXTRA_INCLUDE="${TCPPFLAGS}" \ + EXTRA_LIBS="${TLDFLAGS}" \ + IPSECDIR="/usr/lib/ipsec" \ + INC_USRLOCAL="/usr" \ + MODPROBE="insmod" \ + programs + +do-install: + ${MAKE} -C ${WRKBUILD} \ + ${TARGET_CONFIGURE_OPTS} \ + DESTDIR="${IDIR_OPENSWAN}" \ + KERNELSRC="${LINUX_DIR}" \ + ARCH="${ARCH}" \ + USERCOMPILE="${FLAGS}" \ + IPSECDIR="/usr/lib/ipsec" \ + INC_USRLOCAL="/usr" \ + MODPROBE="insmod" \ + install + +post-install: + rm -rf ${IDIR_OPENSWAN}/usr/share + rm -rf ${IDIR_OPENSWAN}/usr/man + rm -rf ${IDIR_OPENSWAN}/var + mv ${IDIR_OPENSWAN}/etc/rc.d/init.d/ipsec \ + ${IDIR_OPENSWAN}/usr/libexec/ipsec/setup + rm -rf ${IDIR_OPENSWAN}/etc/rc*.d + find ${IDIR_OPENSWAN} -name \*.old -print0 | xargs -0 rm -rf + mkdir -p ${IDIR_OPENSWAN}/etc/init.d + ${INSTALL_BIN} ./files/openswan.init \ + ${IDIR_OPENSWAN}/etc/init.d/ipsec + #${IPKG_BUILD} ${IDIR_OPENSWAN} ${PACKAGE_DIR} + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/openswan/files/openswan.init b/package/openswan/files/openswan.init new file mode 100644 index 000000000..04ac52052 --- /dev/null +++ b/package/openswan/files/openswan.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${ipsec:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + /usr/libexec/ipsec/setup start + ;; +stop) + /usr/libexec/ipsec/setup stop + ;; +restart) + sh $0 stop + sleep 3 + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/openswan/ipkg/openswan.conffiles b/package/openswan/ipkg/openswan.conffiles new file mode 100644 index 000000000..ff0851c29 --- /dev/null +++ b/package/openswan/ipkg/openswan.conffiles @@ -0,0 +1 @@ +/etc/ipsec.conf diff --git a/package/openswan/ipkg/openswan.control b/package/openswan/ipkg/openswan.control new file mode 100644 index 000000000..5ff4bfe0c --- /dev/null +++ b/package/openswan/ipkg/openswan.control @@ -0,0 +1,5 @@ +Package: openswan +Section: base +Priority: optional +Depends: libgmp, ip +Description: Openswan IPSec software diff --git a/package/openswan/ipkg/openswan.postinst b/package/openswan/ipkg/openswan.postinst new file mode 100644 index 000000000..a5f8e11b2 --- /dev/null +++ b/package/openswan/ipkg/openswan.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf ipsec ipsec NO diff --git a/package/openswan/patches/patch-lib_libdns_Makefile b/package/openswan/patches/patch-lib_libdns_Makefile new file mode 100644 index 000000000..bfb17431c --- /dev/null +++ b/package/openswan/patches/patch-lib_libdns_Makefile @@ -0,0 +1,10 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- openswan-2.6.18.orig/lib/libdns/Makefile 2008-10-06 18:52:49.000000000 +0200 ++++ openswan-2.6.18/lib/libdns/Makefile 2008-10-14 13:08:03.000000000 +0200 +@@ -102,5 +102,5 @@ code.h: gen + # cross-compiled! + HOSTCC?=cc + gen: gen.c +- ${HOSTCC} ${HOSTCINCLUDES} ${LDFLAGS} -o $@ ${srcdir}gen.c ${LIBS} ++ ${HOSTCC} ${HOSTCINCLUDES} -o $@ ${srcdir}gen.c ${LIBS} + diff --git a/package/openswan/patches/patch-lib_libopenswan_alg_info_c b/package/openswan/patches/patch-lib_libopenswan_alg_info_c new file mode 100644 index 000000000..0c616e07c --- /dev/null +++ b/package/openswan/patches/patch-lib_libopenswan_alg_info_c @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- openswan-2.6.18.orig/lib/libopenswan/alg_info.c 2008-10-06 18:52:49.000000000 +0200 ++++ openswan-2.6.18/lib/libopenswan/alg_info.c 2008-10-14 13:08:49.000000000 +0200 +@@ -749,7 +749,7 @@ alg_info_discover_pfsgroup_hack(struct a + static char err_buf[256]; + int ret; + +- pfs_name=index(esp_buf, ';'); ++ pfs_name=strchr(esp_buf, ';'); + + if(pfs_name) { + *pfs_name='\0'; diff --git a/package/openswan/patches/patch-programs_ikeping_ikeping_c b/package/openswan/patches/patch-programs_ikeping_ikeping_c new file mode 100644 index 000000000..5e8bde61b --- /dev/null +++ b/package/openswan/patches/patch-programs_ikeping_ikeping_c @@ -0,0 +1,12 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- openswan-2.6.18.orig/programs/ikeping/ikeping.c 2008-10-06 18:52:49.000000000 +0200 ++++ openswan-2.6.18/programs/ikeping/ikeping.c 2008-10-14 13:09:06.000000000 +0200 +@@ -316,7 +316,7 @@ main(int argc, char **argv) + natt=0; + listen_only=0; + noDNS=0; +- bzero(&laddr, sizeof(laddr)); ++ memset(&laddr, 0, sizeof(laddr)); + + while((c = getopt_long(argc, argv, "hVnvsp:b:46E:w:", long_opts, 0))!=EOF) { + switch (c) { |