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.

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