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
:=b34d71ca49dedad017879b0e912d40dd
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/openswan
/Default
30 Openswan is an IPsec implementation for Linux.
31 URL
:=http
://www.openswan.org
/
34 define Package
/openswan
35 $(call Package
/openswan
/Default
)
38 DEPENDS
:=+kmod-openswan
+libgmp
42 This package contains the Openswan user-land daemon.
43 URL
:=http
://www.openswan.org
/
46 define Package
/kmod-openswan
47 $(call Package
/openswan
/Default
)
49 CATEGORY
:=Kernel drivers
50 TITLE
+= (kernel module
)
53 This package contains the Openswan kernel module.
54 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
58 LINUX_RELEASE
="$(LINUX_RELEASE)" \
59 KERNELSRC
="$(LINUX_DIR)" \
60 ARCH
="$(LINUX_KARCH)" \
61 CROSS_COMPILE
="$(TARGET_CROSS)" \
62 USERCOMPILE
="$(TARGET_CFLAGS) -I./linux/include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
63 IPSECDIR
="/usr/lib/ipsec" \
67 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
68 $(TARGET_CONFIGURE_OPTS
) \
71 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
72 $(TARGET_CONFIGURE_OPTS
) \
74 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
78 define Package
/openswan
/install
79 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
80 $(TARGET_CONFIGURE_OPTS
) \
84 install -d
-m0755
$(1)/etc
/init.d
85 $(CP
) $(1)/etc
/rc.d
/init.d
/ipsec
$(1)/etc
/init.d
/S
$(PKG_INIT_PRIO
)ipsec
90 find
$(1) -name \
*.old | xargs
rm -rf
93 define Package
/kmod-openswan
/install
94 mkdir
-p
$(1)/lib
/modules
/$(LINUX_VERSION
)
95 $(CP
) $(PKG_BUILD_DIR
)/modobj
*/ipsec.
$(LINUX_KMOD_SUFFIX
) \
96 $(1)/lib
/modules
/$(LINUX_VERSION
)/
99 $(eval
$(call BuildPackage
,openswan
))
100 $(eval
$(call BuildPackage
,kmod-openswan
))