lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (2794B)


      1 #
      2 # Copyright (C) 2006-2015 OpenWrt.org
      3 #               2014 Noah Meyerhans <frodo@morgul.net>
      4 #
      5 # This is free software, licensed under the GNU General Public License v2.
      6 # See /LICENSE for more information.
      7 #
      8 
      9 include $(TOPDIR)/rules.mk
     10 include $(INCLUDE_DIR)/kernel.mk
     11 
     12 PKG_NAME:=ipsec-tools
     13 PKG_VERSION:=0.8.2
     14 PKG_RELEASE:=5
     15 PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
     16 PKG_LICENSE := BSD-3-Clause
     17 
     18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
     19 PKG_SOURCE_URL:=@SF/ipsec-tools
     20 PKG_MD5SUM:=d53ec14a0a3ece64e09e5e34b3350b41
     21 
     22 PKG_BUILD_PARALLEL:=1
     23 PKG_INSTALL:=1
     24 
     25 PKG_FIXUP:=autoreconf
     26 
     27 include $(INCLUDE_DIR)/package.mk
     28 
     29 define Package/ipsec-tools
     30   SECTION:=net
     31   CATEGORY:=Network
     32   SUBMENU:=VPN
     33   DEPENDS:=+libopenssl +kmod-ipsec
     34   TITLE:=IPsec management tools
     35   URL:=http://ipsec-tools.sourceforge.net/
     36   MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
     37 endef
     38 
     39 CONFIGURE_ARGS += \
     40 	--enable-shared \
     41 	--enable-static \
     42 	--with-kernel-headers="$(LINUX_DIR)/include" \
     43 	--without-readline \
     44 	--with-openssl="$(STAGING_DIR)/usr" \
     45 	--without-libradius \
     46 	--without-libpam \
     47 	--enable-dpd \
     48 	--enable-hybrid \
     49 	--enable-security-context=no \
     50 	--enable-natt \
     51 	--enable-adminport \
     52 	--enable-frag \
     53 	 $(call autoconf_bool,CONFIG_IPV6,ipv6)
     54 
     55 # override CFLAGS holding "-Werror" that break builds on compile warnings
     56 MAKE_FLAGS+=\
     57 	CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)"
     58 
     59 define Build/Prepare
     60 	$(call Build/Prepare/Default)
     61 	chmod -R u+w $(PKG_BUILD_DIR)
     62 endef
     63 
     64 define Build/Configure
     65 	(cd $(PKG_BUILD_DIR); touch \
     66 		configure.ac \
     67 		aclocal.m4 \
     68 		Makefile.in \
     69 		config.h.in \
     70 		configure \
     71 	);
     72 	$(call Build/Configure/Default)
     73 ifndef CONFIG_SHADOW_PASSWORDS
     74 	echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h
     75 endif
     76 endef
     77 
     78 define Package/ipsec-tools/install
     79 	$(INSTALL_DIR) $(1)/etc/racoon
     80 	$(INSTALL_CONF) ./files/functions.sh $(1)/etc/racoon/
     81 	$(INSTALL_BIN) ./files/p1client-up $(1)/etc/racoon/
     82 	$(INSTALL_BIN) ./files/p1client-down $(1)/etc/racoon/
     83 	$(INSTALL_BIN) ./files/vpnctl $(1)/etc/racoon/
     84 	$(INSTALL_DIR) $(1)/etc/init.d
     85 	$(INSTALL_BIN) ./files/racoon.init $(1)/etc/init.d/racoon
     86 	$(INSTALL_DIR) $(1)/etc/config
     87 	$(INSTALL_CONF) ./files/racoon $(1)/etc/config/
     88 	$(INSTALL_DIR) $(1)/usr/lib
     89 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
     90 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
     91 	$(INSTALL_DIR) $(1)/usr/sbin
     92 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
     93 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
     94 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
     95 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
     96 endef
     97 
     98 define Package/ipsec-tools/conffiles
     99 /etc/config/racoon
    100 endef
    101 
    102 $(eval $(call BuildPackage,ipsec-tools))