You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
4.0 KiB

  1. #
  2. # Copyright (C) 2006-2016 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:=rp-pppoe
  9. PKG_VERSION:=3.12
  10. PKG_RELEASE:=3
  11. PKG_MAINTAINER:=Daniel Dickinson <lede@cshore.thecshore.com>
  12. PKG_LICENSE:=LGPL-2.0+
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=http://roaringpenguin.com/files/download
  15. PKG_HASH:=00794e04031546b0e9b8cf286f2a6d1ccfc4a621b2a3abb2d7ef2a7ab7cc86c2
  16. PKG_BUILD_DEPENDS:=ppp
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/rp-pppoe/Default
  19. SECTION:=net
  20. CATEGORY:=Network
  21. TITLE:=PPPoE (PPP over Ethernet)
  22. URL:=http://roaringpenguin.com/products/pppoe
  23. SUBMENU:=dial-in/up
  24. endef
  25. define Package/rp-pppoe/Default/description
  26. Dubbed RP-PPPoE, this open-source product is ideal for Linux users with
  27. a DSL "modem" whose Internet service provider uses PPPoE.
  28. endef
  29. define Package/rp-pppoe-common
  30. $(call Package/rp-pppoe/Default)
  31. TITLE+= common
  32. DEPENDS:=+ppp
  33. endef
  34. define Package/rp-pppoe-common/description
  35. $(call Package/rp-pppoe/Default/description)
  36. This package contains files common to server and relay.
  37. endef
  38. define Package/rp-pppoe-common/conffiles
  39. /etc/config/pppoe
  40. endef
  41. define Package/rp-pppoe-relay
  42. $(call Package/rp-pppoe/Default)
  43. DEPENDS:=+rp-pppoe-common
  44. TITLE+= relay
  45. DEFAULT:=n
  46. endef
  47. define Package/rp-pppoe-relay/description
  48. $(call Package/rp-pppoe/Default/description)
  49. This package contains pppoe-relay.
  50. endef
  51. define Package/rp-pppoe-relay/conffiles
  52. /etc/default/pppoe-relay
  53. endef
  54. define Package/rp-pppoe-server
  55. $(call Package/rp-pppoe/Default)
  56. DEPENDS:=+rp-pppoe-common
  57. TITLE+= server
  58. endef
  59. define Package/rp-pppoe-server/conffiles
  60. /etc/ppp/pppoe-server-options
  61. /etc/ppp/options
  62. /etc/ppp/pap-secrets
  63. /etc/ppp/chap-secrets
  64. /etc/default/pppoe-server
  65. endef
  66. define Package/rp-pppoe-server/description
  67. $(call Package/rp-pppoe/Default/description)
  68. This package contains pppoe-server.
  69. endef
  70. define Package/rp-pppoe-sniff
  71. $(call Package/rp-pppoe/Default)
  72. DEPENDS:=+ppp @BROKEN
  73. TITLE+= sniffer
  74. endef
  75. define Package/rp-pppoe-sniff/description
  76. $(call Package/rp-pppoe/Default/description)
  77. This package contains pppoe-sniff.
  78. endef
  79. TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/src/libevent -isystem $(PKG_BUILD_DIR)/missing-headers
  80. CONFIGURE_PATH := ./src
  81. CONFIGURE_ARGS += ac_cv_path_PPPD=/usr/sbin/pppd --enable-plugin=$(STAGING_DIR)/usr/include/
  82. MAKE_FLAGS := DESTDIR="$(PKG_INSTALL_DIR)" install
  83. MAKE_PATH := ./src
  84. define Build/Prepare
  85. mkdir -p $(PKG_BUILD_DIR)/missing-headers/net
  86. $(CP) ./files/ppp_defs.h $(PKG_BUILD_DIR)/missing-headers/net/
  87. $(call Build/Prepare/Default,$(1),$(2),$(3))
  88. endef
  89. define Package/rp-pppoe-common/install
  90. $(INSTALL_DIR) $(1)/etc/config
  91. $(INSTALL_CONF) ./files/pppoe.config $(1)/etc/config/pppoe
  92. endef
  93. define Package/rp-pppoe-relay/install
  94. $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/uci-defaults
  95. $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
  96. $(INSTALL_DIR) $(1)/usr/sbin
  97. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
  98. $(INSTALL_DATA) ./files/pppoe-relay.default $(1)/etc/uci-defaults/
  99. endef
  100. define Package/rp-pppoe-server/install
  101. $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/uci-defaults
  102. $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
  103. $(INSTALL_DIR) $(1)/etc/ppp
  104. $(INSTALL_CONF) ./files/ppp/{options,pap-secrets,pppoe-server-options} $(1)/etc/ppp/
  105. $(INSTALL_DIR) $(1)/etc/ppp/plugins
  106. $(INSTALL_DIR) $(1)/usr/sbin
  107. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
  108. $(CP) $(PKG_INSTALL_DIR)/etc/ppp/plugins/rp-pppoe.so $(1)/etc/ppp/plugins/
  109. $(INSTALL_DATA) ./files/pppoe-server.default $(1)/etc/uci-defaults/
  110. endef
  111. define Package/rp-pppoe-sniff/install
  112. $(INSTALL_DIR) $(1)/usr/sbin
  113. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
  114. endef
  115. $(eval $(call BuildPackage,rp-pppoe-common))
  116. $(eval $(call BuildPackage,rp-pppoe-relay))
  117. $(eval $(call BuildPackage,rp-pppoe-server))
  118. $(eval $(call BuildPackage,rp-pppoe-sniff))