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
:=70f22e8adc39e07a165f75eccb7cd079
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/openswan
/Default
29 Openswan is an IPsec implementation for Linux.
30 URL
:=http
://www.openswan.org
/
33 define Package
/openswan
34 $(call Package
/openswan
/Default
)
37 DEPENDS
:=+kmod-openswan
+libgmp
41 This package contains the Openswan user-land daemon.
42 URL
:=http
://www.openswan.org
/
45 define KernelPackage
/openswan
46 SUBMENU
:=Network Support
47 $(call Package
/openswan
/Default
)
48 TITLE
+= (kernel module
)
51 This package contains the Openswan kernel module.
52 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
53 FILES
:=$(PKG_BUILD_DIR
)/modobj
*/ipsec.
$(LINUX_KMOD_SUFFIX
)
57 LINUX_RELEASE
="$(LINUX_RELEASE)" \
58 KERNELSRC
="$(LINUX_DIR)" \
59 ARCH
="$(LINUX_KARCH)" \
60 CROSS_COMPILE
="$(TARGET_CROSS)" \
61 USERCOMPILE
="$(TARGET_CFLAGS) -I./linux/include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
62 IPSECDIR
="/usr/lib/ipsec" \
66 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
67 $(TARGET_CONFIGURE_OPTS
) \
69 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
70 DESTDIR
="$(PKG_INSTALL_DIR)" \
71 programs module
install
74 define Package
/openswan
/install
75 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
76 $(INSTALL_DIR
) $(1)/etc
/init.d
77 $(CP
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
82 find
$(1) -name \
*.old | xargs
rm -rf
85 $(eval
$(call BuildPackage
,openswan
))
86 $(eval
$(call KernelPackage
,openswan
))