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
)
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/openswan
/Default
31 Openswan is an IPsec implementation for Linux.
32 URL
:=http
://www.openswan.org
/
35 define Package
/openswan
36 $(call Package
/openswan
/Default
)
39 DEPENDS
:=+kmod-openswan
+libgmp
43 This package contains the Openswan user-land daemon.
44 URL
:=http
://www.openswan.org
/
47 define Package
/kmod-openswan
48 $(call Package
/openswan
/Default
)
50 CATEGORY
:=Kernel drivers
51 TITLE
+= (kernel module
)
54 This package contains the Openswan kernel module.
55 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
59 LINUX_RELEASE
="$(LINUX_RELEASE)" \
60 KERNELSRC
="$(LINUX_DIR)" \
61 ARCH
="$(LINUX_KARCH)" \
62 CROSS_COMPILE
="$(TARGET_CROSS)" \
63 USERCOMPILE
="$(TARGET_CFLAGS) -I./linux/include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
64 IPSECDIR
="/usr/lib/ipsec" \
68 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
69 $(TARGET_CONFIGURE_OPTS
) \
71 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
72 DESTDIR
="$(PKG_INSTALL_DIR)" \
73 programs module
install
76 define Package
/openswan
/install
77 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
78 install -d
-m0755
$(1)/etc
/init.d
79 $(CP
) $(1)/etc
/rc.d
/init.d
/ipsec
$(1)/etc
/init.d
/S
$(PKG_INIT_PRIO
)ipsec
84 find
$(1) -name \
*.old | xargs
rm -rf
87 define Package
/kmod-openswan
/install
88 mkdir
-p
$(1)/lib
/modules
/$(LINUX_VERSION
)
89 $(CP
) $(PKG_BUILD_DIR
)/modobj
*/ipsec.
$(LINUX_KMOD_SUFFIX
) \
90 $(1)/lib
/modules
/$(LINUX_VERSION
)/
93 $(eval
$(call BuildPackage
,openswan
))
94 $(eval
$(call BuildPackage
,kmod-openswan
))