Makefile 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=ppp
  10. PKG_VERSION:=2.4.7
  11. PKG_RELEASE:=6
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/
  14. PKG_MD5SUM:=78818f40e6d33a1d1de68a1551f6595a
  15. PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
  16. PKG_LICENSE:=BSD-4-Clause
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_BUILD_DEPENDS:=libpcap
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/ppp/Default
  23. SECTION:=net
  24. CATEGORY:=Network
  25. URL:=http://ppp.samba.org/
  26. endef
  27. define Package/ppp
  28. $(call Package/ppp/Default)
  29. DEPENDS:=+kmod-ppp
  30. TITLE:=PPP daemon
  31. VARIANT:=default
  32. endef
  33. define Package/ppp-multilink
  34. $(call Package/ppp/Default)
  35. DEPENDS:=+kmod-ppp
  36. TITLE:=PPP daemon (with multilink support)
  37. VARIANT:=multilink
  38. endef
  39. define Package/ppp/description
  40. This package contains the PPP (Point-to-Point Protocol) daemon.
  41. endef
  42. define Package/ppp/conffiles
  43. /etc/ppp/chap-secrets
  44. /etc/ppp/filter
  45. /etc/ppp/ip-down
  46. /etc/ppp/ip-up
  47. /etc/ppp/ipv6-down
  48. /etc/ppp/ipv6-up
  49. /etc/ppp/options
  50. endef
  51. define Package/ppp-mod-pppoa
  52. $(call Package/ppp/Default)
  53. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +linux-atm +kmod-pppoa
  54. TITLE:=PPPoA plugin
  55. endef
  56. define Package/ppp-mod-pppoa/description
  57. This package contains a PPPoA (PPP over ATM) plugin for ppp.
  58. endef
  59. define Package/ppp-mod-pppoe
  60. $(call Package/ppp/Default)
  61. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppoe
  62. TITLE:=PPPoE plugin
  63. endef
  64. define Package/ppp-mod-pppoe/description
  65. This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
  66. endef
  67. define Package/ppp-mod-radius
  68. $(call Package/ppp/Default)
  69. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
  70. TITLE:=RADIUS plugin
  71. endef
  72. define Package/ppp-mod-radius/description
  73. This package contains a RADIUS (Remote Authentication Dial-In User Service)
  74. plugin for ppp.
  75. endef
  76. define Package/ppp-mod-radius/conffiles
  77. /etc/ppp/radius.conf
  78. /etc/ppp/radius/
  79. endef
  80. define Package/ppp-mod-pppol2tp
  81. $(call Package/ppp/Default)
  82. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppol2tp
  83. TITLE:=PPPoL2TP plugin
  84. endef
  85. define Package/ppp-mod-pppol2tp/description
  86. This package contains a PPPoL2TP (PPP over L2TP) plugin for ppp.
  87. endef
  88. define Package/ppp-mod-pptp
  89. $(call Package/ppp/Default)
  90. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pptp +kmod-mppe +resolveip
  91. TITLE:=PPtP plugin
  92. endef
  93. define Package/ppp-mod-pptp/description
  94. This package contains a PPtP plugin for ppp.
  95. endef
  96. define Package/chat
  97. $(call Package/ppp/Default)
  98. TITLE:=Establish conversation with a modem
  99. endef
  100. define Package/chat/description
  101. This package contains an utility to establish conversation with other PPP servers
  102. (via a modem).
  103. endef
  104. define Package/pppdump
  105. $(call Package/ppp/Default)
  106. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
  107. TITLE:=Read PPP record file
  108. endef
  109. define Package/pppdump/description
  110. This package contains an utility to read PPP record file.
  111. endef
  112. define Package/pppstats
  113. $(call Package/ppp/Default)
  114. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
  115. TITLE:=Report PPP statistics
  116. endef
  117. define Package/pppstats/description
  118. This package contains an utility to report PPP statistics.
  119. endef
  120. define Build/Configure
  121. $(call Build/Configure/Default,, \
  122. UNAME_S="Linux" \
  123. UNAME_R="$(LINUX_VERSION)" \
  124. UNAME_M="$(ARCH)" \
  125. )
  126. mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
  127. cp \
  128. $(LINUX_DIR)/include/linux/compiler.h \
  129. $(LINUX_DIR)/include/$(LINUX_UAPI_DIR)linux/atm*.h \
  130. $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
  131. endef
  132. MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
  133. PRECOMPILED_FILTER=1 \
  134. STAGING_DIR="$(STAGING_DIR)"
  135. ifeq ($(BUILD_VARIANT),multilink)
  136. MAKE_FLAGS += HAVE_MULTILINK=y
  137. else
  138. MAKE_FLAGS += HAVE_MULTILINK=
  139. endif
  140. ifdef CONFIG_USE_MUSL
  141. MAKE_FLAGS += USE_LIBUTIL=
  142. endif
  143. define Build/InstallDev
  144. $(INSTALL_DIR) $(1)/usr/include
  145. $(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
  146. endef
  147. define Package/ppp/script_install
  148. endef
  149. define Package/ppp/install
  150. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  151. $(INSTALL_DIR) $(1)/usr/sbin
  152. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/
  153. $(INSTALL_DIR) $(1)/etc/ppp
  154. $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
  155. $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
  156. $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
  157. $(LN) /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
  158. $(INSTALL_DIR) $(1)/lib/netifd/proto
  159. $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/netifd/proto/
  160. $(INSTALL_BIN) ./files/lib/netifd/ppp-up $(1)/lib/netifd/
  161. $(INSTALL_BIN) ./files/lib/netifd/ppp-down $(1)/lib/netifd/
  162. endef
  163. Package/ppp-multilink/install=$(Package/ppp/install)
  164. define Package/ppp-mod-pppoa/install
  165. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  166. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppoatm.so \
  167. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  168. endef
  169. define Package/ppp-mod-pppoe/install
  170. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  171. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
  172. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  173. endef
  174. define Package/ppp-mod-radius/install
  175. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  176. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/radius.so \
  177. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  178. $(INSTALL_DIR) $(1)/etc/ppp
  179. $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
  180. $(INSTALL_DIR) $(1)/etc/ppp/radius
  181. $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
  182. $(1)/etc/ppp/radius/
  183. $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
  184. $(1)/etc/ppp/radius/
  185. endef
  186. define Package/ppp-mod-pppol2tp/install
  187. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  188. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppol2tp.so \
  189. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  190. endef
  191. define Package/ppp-mod-pptp/install
  192. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  193. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pptp.so \
  194. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  195. $(INSTALL_DIR) $(1)/etc/ppp
  196. $(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/
  197. endef
  198. define Package/chat/install
  199. $(INSTALL_DIR) $(1)/usr/sbin
  200. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
  201. endef
  202. define Package/pppdump/install
  203. $(INSTALL_DIR) $(1)/usr/sbin
  204. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
  205. endef
  206. define Package/pppstats/install
  207. $(INSTALL_DIR) $(1)/usr/sbin
  208. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
  209. endef
  210. $(eval $(call BuildPackage,ppp))
  211. $(eval $(call BuildPackage,ppp-multilink))
  212. $(eval $(call BuildPackage,ppp-mod-pppoa))
  213. $(eval $(call BuildPackage,ppp-mod-pppoe))
  214. $(eval $(call BuildPackage,ppp-mod-radius))
  215. $(eval $(call BuildPackage,ppp-mod-pppol2tp))
  216. $(eval $(call BuildPackage,ppp-mod-pptp))
  217. $(eval $(call BuildPackage,chat))
  218. $(eval $(call BuildPackage,pppdump))
  219. $(eval $(call BuildPackage,pppstats))