1
0

Makefile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=xl2tpd
  9. PKG_VERSION:=devel-20151125
  10. PKG_RELEASE:=3
  11. PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
  12. PKG_LICENSE:=GPL-2.0
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL:=https://github.com/xelerance/xl2tpd.git
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=e2065bf0fc22ba33001ad503c01bba01648024a8
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/xl2tpd
  22. SECTION:=net
  23. CATEGORY:=Network
  24. TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon
  25. URL:=http://www.xelerance.com/software/xl2tpd/
  26. SUBMENU:=VPN
  27. DEPENDS:=+ppp-mod-pppol2tp +resolveip
  28. endef
  29. define Package/xl2tpd/description
  30. l2tpd is the open source implementation of the L2TP tunneling protocol (RFC2661).
  31. It does implement both LAC and LNS role in a L2TP networking architecture. The
  32. main goal of this protocol is to tunnel PPP frame trough an IP network.
  33. endef
  34. # Use optimization options from OpenWrt build system
  35. MAKE_FLAGS += OFLAGS=""
  36. ifneq (0,0)
  37. # debugging options from Makefile of xl2tpd package
  38. EXTRA_CFLAGS += \
  39. -DDEBUG_ZLB \
  40. -DDEBUG_HELLO \
  41. -DDEBUG_CLOSE \
  42. -DDEBUG_FLOW \
  43. -DDEBUG_FILE \
  44. -DDEBUG_AAA \
  45. -DDEBUG_PAYLOAD \
  46. -DDEBUG_CONTROL \
  47. -DDEBUG_PPPD \
  48. -DDEBUG_HIDDEN \
  49. -DDEBUG_ENTROPY \
  50. -DDEBUG_CONTROL_XMIT \
  51. -DDEBUG_MAGIC \
  52. -DDEBUG_FLOW_MORE \
  53. -DDEBUG_AUTH
  54. endif
  55. define Package/xl2tpd/conffiles
  56. /etc/xl2tpd/xl2tpd.conf
  57. /etc/xl2tpd/xl2tp-secrets
  58. /etc/ppp/options.xl2tpd
  59. endef
  60. define Package/xl2tpd/install
  61. $(INSTALL_DIR) $(1)/usr/sbin
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/xl2tpd $(1)/usr/sbin/
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/xl2tpd-control $(1)/usr/sbin/
  64. $(INSTALL_DIR) $(1)/etc/init.d
  65. $(INSTALL_BIN) ./files/xl2tpd.init $(1)/etc/init.d/xl2tpd
  66. $(INSTALL_DIR) $(1)/etc/xl2tpd
  67. $(INSTALL_DATA) ./files/xl2tpd.conf $(1)/etc/xl2tpd/
  68. $(INSTALL_CONF) ./files/xl2tp-secrets $(1)/etc/xl2tpd/
  69. $(INSTALL_DIR) $(1)/etc/ppp
  70. $(INSTALL_DATA) ./files/options.xl2tpd $(1)/etc/ppp/
  71. $(INSTALL_DIR) $(1)/lib/netifd/proto
  72. $(INSTALL_BIN) ./files/l2tp.sh $(1)/lib/netifd/proto
  73. endef
  74. $(eval $(call BuildPackage,xl2tpd))