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.bz2
17 PKG_SOURCE_URL
:=@SF
/ipsec-tools
18 PKG_MD5SUM
:=c0a586924edde35264ecfe94ad1c261f
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/ipsec-tools
25 DEPENDS
:=@LINUX_2_6
+libopenssl
26 TITLE
:=IPsec management tools
27 URL
:=http
://ipsec-tools.sourceforge.net
/
33 --with-kernel-headers
="$(LINUX_DIR)/include" \
35 --with-openssl
="$(STAGING_DIR)/usr" \
40 --enable-security-context
=no \
45 TARGET_CFLAGS
+= -Dbcopy
=memmove
-Dindex\
(s
,c\
)=strchr\
(s
,c\
)
47 define Build
/Configure
48 (cd
$(PKG_BUILD_DIR
); touch \
55 $(call Build
/Configure
/Default
)
56 echo
"#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR
)/config.h
59 # override CFLAGS holding "-Werror" that break builds on compile warnings
61 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
62 DESTDIR
="$(PKG_INSTALL_DIR)" \
63 CFLAGS
="$(TARGET_CFLAGS)" \
67 define Package
/ipsec-tools
/install
68 $(INSTALL_DIR
) $(1)/etc
69 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/src
/racoon
/samples
/racoon.conf
$(1)/etc
/
70 $(SED
) 's|@sysconfdir_x@|/etc|g' $(1)/etc
/racoon.conf
71 $(INSTALL_DIR
) $(1)/etc
/racoon
72 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/src
/racoon
/samples
/psk.txt
$(1)/etc
/racoon
/
73 $(INSTALL_DIR
) $(1)/usr
/lib
74 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libipsec.so.
* $(1)/usr
/lib
/
75 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libracoon.so.
* $(1)/usr
/lib
/
76 $(INSTALL_DIR
) $(1)/usr
/sbin
77 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/plainrsa-gen
$(1)/usr
/sbin
/
78 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/racoon
$(1)/usr
/sbin
/
79 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/racoonctl
$(1)/usr
/sbin
/
80 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/setkey
$(1)/usr
/sbin
/
83 define Package
/ipsec-tools
/conffiles
88 $(eval
$(call BuildPackage
,ipsec-tools
))