2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=http
://www.openswan.org
/download
18 PKG_MD5SUM
:=918cc56ccf8e5d14cd2047e47450b34a
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/openswan
/Default
25 Openswan is an IPsec implementation for Linux.
26 URL
:=http
://www.openswan.org
/
29 define Package
/openswan
30 $(call Package
/openswan
/Default
)
33 DEPENDS
:=@LINUX_2_4
+kmod-openswan
+libgmp
+ip
37 This package contains the Openswan user-land daemon.
38 URL
:=http
://www.openswan.org
/
41 define KernelPackage
/openswan
42 SUBMENU
:=Network Support
43 $(call Package
/openswan
/Default
)
45 TITLE
+= (kernel module
)
48 This package contains the Openswan kernel module.
49 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
50 FILES
:=$(PKG_BUILD_DIR
)/modobj
*/ipsec.
$(LINUX_KMOD_SUFFIX
)
54 LINUX_RELEASE
="$(LINUX_RELEASE)" \
55 KERNELSRC
="$(LINUX_DIR)" \
56 ARCH
="$(LINUX_KARCH)" \
57 CROSS_COMPILE
="$(TARGET_CROSS)" \
58 USERCOMPILE
="$(TARGET_CFLAGS) -I./linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
59 IPSECDIR
="/usr/lib/ipsec" \
63 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
64 $(TARGET_CONFIGURE_OPTS
) \
66 LDFLAGS
="$(TARGET_LDFLAGS)" \
67 DESTDIR
="$(PKG_INSTALL_DIR)" \
68 programs module
install
71 define Package
/openswan
/install
72 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
73 $(INSTALL_DIR
) $(1)/etc
/init.d
74 $(CP
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
79 find
$(1) -name \
*.old | xargs
rm -rf
82 $(eval
$(call BuildPackage
,openswan
))
83 $(eval
$(call KernelPackage
,openswan
))