2 # Copyright (C) 2006-2008 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
/
28 define Package
/openswan
/Default
/description
29 Openswan is an IPsec implementation for Linux.
32 define Package
/openswan
33 $(call Package
/openswan
/Default
)
36 DEPENDS
+= +kmod-openswan
+libgmp
+ip
38 URL
:=http
://www.openswan.org
/
41 define Package
/openswan
/description
42 $(call Package
/openswan
/Default
/description
)
43 This package contains the Openswan user-land daemon.
46 define KernelPackage
/openswan
47 $(call Package
/openswan
/Default
)
48 SUBMENU
:=Network Support
49 TITLE
+= (kernel module
)
50 FILES
:=$(PKG_BUILD_DIR
)/modobj
*/ipsec.
$(LINUX_KMOD_SUFFIX
)
53 define KernelPackage
/openswan
/description
54 $(call Package
/openswan
/Default
/description
)
55 This package contains the Openswan kernel module.
59 -I
$(STAGING_DIR
)/usr
/include \
60 -I
$(LINUX_DIR
)/include
63 -L
$(STAGING_DIR
)/usr
/lib
65 OPENSWAN_MAKE
:= $(MAKE
) -C
$(PKG_BUILD_DIR
) \
66 $(TARGET_CONFIGURE_OPTS
) \
67 LINUX_RELEASE
="$(LINUX_RELEASE)" \
68 KERNELSRC
="$(LINUX_DIR)" \
69 ARCH
="$(LINUX_KARCH)" \
70 CROSS_COMPILE
="$(TARGET_CROSS)" \
71 USERCOMPILE
="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
72 IPSECDIR
="/usr/lib/ipsec" \
74 INC_RCDEFAULT
="/etc/init.d" \
75 MODPROBE
="/sbin/insmod" \
76 LDFLAGS
="$(TARGET_LDFLAGS)" \
77 DESTDIR
="$(PKG_INSTALL_DIR)"
81 programs module
install
84 define Package
/openswan
/install
85 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
86 $(INSTALL_DIR
) $(1)/etc
/init.d
87 $(CP
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
92 find
$(1) -name \
*.old | xargs
rm -rf
95 $(eval
$(call BuildPackage
,openswan
))
96 $(eval
$(call KernelPackage
,openswan
))