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
:=2b36785342c74d524d8d86bde89a445f
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/openswan
/Default
24 URL
:=http
://www.openswan.org
/
27 define Package
/openswan
/Default
/description
28 Openswan is an IPsec implementation for Linux.
31 define Package
/openswan
32 $(call Package
/openswan
/Default
)
35 DEPENDS
:=+kmod-openswan
+libgmp
+ip
37 URL
:=http
://www.openswan.org
/
40 define Package
/openswan
/description
41 $(call Package
/openswan
/Default
/description
)
42 This package contains the Openswan user-land daemon.
45 define KernelPackage
/openswan
46 $(call Package
/openswan
/Default
)
47 SUBMENU
:=Network Support
48 TITLE
+= (kernel module
)
49 FILES
:=$(PKG_BUILD_DIR
)/modobj
*/ipsec.
$(LINUX_KMOD_SUFFIX
)
52 define KernelPackage
/openswan
/description
53 $(call Package
/openswan
/Default
/description
)
54 This package contains the Openswan kernel module.
58 -I
$(STAGING_DIR
)/usr
/include \
59 -I
$(LINUX_DIR
)/include
62 -L
$(STAGING_DIR
)/usr
/lib
64 OPENSWAN_MAKE
:= $(MAKE
) -C
$(PKG_BUILD_DIR
) \
65 $(TARGET_CONFIGURE_OPTS
) \
66 LINUX_RELEASE
="$(LINUX_RELEASE)" \
67 KERNELSRC
="$(LINUX_DIR)" \
68 ARCH
="$(LINUX_KARCH)" \
69 CROSS_COMPILE
="$(TARGET_CROSS)" \
70 USERCOMPILE
="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
71 IPSECDIR
="/usr/lib/ipsec" \
73 INC_RCDEFAULT
="/etc/init.d" \
74 MODPROBE
="/sbin/insmod" \
75 LDFLAGS
="$(TARGET_LDFLAGS)" \
76 DESTDIR
="$(PKG_INSTALL_DIR)"
80 programs module
install
83 define Package
/openswan
/install
84 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
85 $(INSTALL_DIR
) $(1)/etc
/init.d
86 $(CP
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
91 find
$(1) -name \
*.old | xargs
rm -rf
94 $(eval
$(call BuildPackage
,openswan
))
95 $(eval
$(call KernelPackage
,openswan
))