update openswan to 2.4.5 final
[openwrt/svn-archive/archive.git] / openwrt / target / linux / package / openswan / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4 include ../../rules.mk
5
6 PKG_NAME:=openswan
7 PKG_VERSION:=2.4.5
8 PKG_RELEASE:=1
9 PKG_MD5SUM:=a9a8e88313faceebfc5ceb1a9da9a3c4
10
11 PKG_SOURCE_URL:=http://www.openswan.org/download
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
14 PKG_CAT:=zcat
15
16 include $(TOPDIR)/package/rules.mk
17
18 $(eval $(call PKG_template,KMOD_OPENSWAN,kmod-openswan,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE))))
19
20 FLAGS := $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include
21
22 $(PKG_BUILD_DIR)/.built:
23 $(MAKE) -C $(PKG_BUILD_DIR) \
24 $(TARGET_CONFIGURE_OPTS) \
25 LINUX_RELEASE="$(LINUX_RELEASE)" \
26 KERNELSRC="$(LINUX_DIR)" \
27 ARCH="$(LINUX_KARCH)" \
28 CROSS_COMPILE="$(TARGET_CROSS)" \
29 USERCOMPILE="$(FLAGS)" \
30 AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \
31 module
32
33 $(IPKG_KMOD_OPENSWAN):
34 mkdir -p $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION)
35 $(CP) $(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION)/
36 $(IPKG_BUILD) $(IDIR_KMOD_OPENSWAN) $(PACKAGE_DIR)