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 FILES
:=$(PKG_BUILD_DIR
)/modobj
*/ipsec.
$(LINUX_KMOD_SUFFIX
)
53 LINUX_RELEASE
="$(LINUX_RELEASE)" \
54 KERNELSRC
="$(LINUX_DIR)" \
55 ARCH
="$(LINUX_KARCH)" \
56 CROSS_COMPILE
="$(TARGET_CROSS)" \
57 USERCOMPILE
="$(TARGET_CFLAGS) -I./linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
58 IPSECDIR
="/usr/lib/ipsec" \
62 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
63 $(TARGET_CONFIGURE_OPTS
) \
65 LDFLAGS
="$(TARGET_LDFLAGS)" \
66 DESTDIR
="$(PKG_INSTALL_DIR)" \
67 programs module
install
70 define Package
/openswan
/install
71 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
72 $(INSTALL_DIR
) $(1)/etc
/init.d
73 $(CP
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
78 find
$(1) -name \
*.old | xargs
rm -rf
81 $(eval
$(call BuildPackage
,openswan
))
82 $(eval
$(call KernelPackage
,openswan
))