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
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 Package
/kmod-openswan
46 $(call Package
/openswan
/Default
)
48 CATEGORY
:=Kernel drivers
49 TITLE
+= (kernel module
)
52 This package contains the Openswan kernel module.
53 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
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 -d
-m0755
$(1)/etc
/init.d
77 $(CP
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
82 find
$(1) -name \
*.old | xargs
rm -rf
85 define Package
/kmod-openswan
/install
86 mkdir
-p
$(1)/lib
/modules
/$(LINUX_VERSION
)
87 $(CP
) $(PKG_BUILD_DIR
)/modobj
*/ipsec.
$(LINUX_KMOD_SUFFIX
) \
88 $(1)/lib
/modules
/$(LINUX_VERSION
)/
91 $(eval
$(call BuildPackage
,openswan
))
92 $(eval
$(call BuildPackage
,kmod-openswan
))