Makefile 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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.5.1
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/ppp-project/ppp
  14. PKG_SOURCE_DATE:=2024-09-18
  15. PKG_SOURCE_VERSION:=d5aeec65752d4a9b3bb46771d0b221c4a4a6539e
  16. PKG_MIRROR_HASH:=b98125933d8160ff3476b053414e787e65a94948c0ecee53f6261cd403ff4b03
  17. PKG_MAINTAINER:=Felix Fietkau <[email protected]>
  18. PKG_LICENSE:=BSD-4-Clause
  19. PKG_CPE_ID:=cpe:/a:samba:ppp
  20. PKG_ASLR_PIE_REGULAR:=1
  21. PKG_BUILD_DEPENDS:=libpcap
  22. PKG_BUILD_FLAGS:=gc-sections lto
  23. PKG_BUILD_PARALLEL:=1
  24. PKG_FIXUP:=autoreconf
  25. PKG_INSTALL:=1
  26. include $(INCLUDE_DIR)/package.mk
  27. CONFIGURE_VARS += \
  28. enable_eaptls=no \
  29. enable_microsoft_extensions=yes \
  30. enable_peap=no
  31. CONFIGURE_ARGS += \
  32. with_openssl=no \
  33. with_pam=no \
  34. with_pcap=no \
  35. with_srp=no \
  36. with_static_pcap=yes
  37. define Package/ppp/Default
  38. SECTION:=net
  39. CATEGORY:=Network
  40. URL:=https://ppp.samba.org/
  41. endef
  42. define Package/ppp
  43. $(call Package/ppp/Default)
  44. DEPENDS:=+kmod-ppp
  45. TITLE:=PPP daemon
  46. VARIANT:=default
  47. endef
  48. define Package/ppp-multilink
  49. $(call Package/ppp/Default)
  50. DEPENDS:=+kmod-ppp
  51. TITLE:=PPP daemon (with multilink support)
  52. VARIANT:=multilink
  53. endef
  54. define Package/ppp/description
  55. This package contains the PPP (Point-to-Point Protocol) daemon.
  56. endef
  57. define Package/ppp/conffiles
  58. /etc/ppp/chap-secrets
  59. /etc/ppp/filter
  60. /etc/ppp/ip-down
  61. /etc/ppp/ip-up
  62. /etc/ppp/ipv6-down
  63. /etc/ppp/ipv6-up
  64. /etc/ppp/options
  65. endef
  66. define Package/ppp-mod-pppoa
  67. $(call Package/ppp/Default)
  68. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +linux-atm +kmod-pppoa
  69. TITLE:=PPPoA plugin
  70. endef
  71. define Package/ppp-mod-pppoa/description
  72. This package contains a PPPoA (PPP over ATM) plugin for ppp.
  73. endef
  74. define Package/ppp-mod-pppoe
  75. $(call Package/ppp/Default)
  76. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppoe
  77. TITLE:=PPPoE plugin
  78. endef
  79. define Package/ppp-mod-pppoe/description
  80. This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
  81. endef
  82. define Package/ppp-mod-radius
  83. $(call Package/ppp/Default)
  84. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
  85. TITLE:=RADIUS plugin
  86. endef
  87. define Package/ppp-mod-radius/description
  88. This package contains a RADIUS (Remote Authentication Dial-In User Service)
  89. plugin for ppp.
  90. endef
  91. define Package/ppp-mod-radius/conffiles
  92. /etc/ppp/radius.conf
  93. /etc/ppp/radius/
  94. endef
  95. define Package/ppp-mod-pppol2tp
  96. $(call Package/ppp/Default)
  97. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppol2tp
  98. TITLE:=PPPoL2TP plugin
  99. endef
  100. define Package/ppp-mod-pppol2tp/description
  101. This package contains a PPPoL2TP (PPP over L2TP) plugin for ppp.
  102. endef
  103. define Package/ppp-mod-pptp
  104. $(call Package/ppp/Default)
  105. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pptp +kmod-mppe +resolveip
  106. TITLE:=PPtP plugin
  107. endef
  108. define Package/ppp-mod-pptp/description
  109. This package contains a PPtP plugin for ppp.
  110. endef
  111. define Package/ppp-mod-passwordfd
  112. $(call Package/ppp/Default)
  113. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
  114. TITLE:=pap/chap secret from filedescriptor
  115. endef
  116. define Package/ppp-mod-passwordfd/description
  117. This package allows to pass the PAP/CHAP secret from a filedescriptor.
  118. Eliminates the need for a secrets file.
  119. endef
  120. define Package/chat
  121. $(call Package/ppp/Default)
  122. TITLE:=Establish conversation with a modem
  123. endef
  124. define Package/chat/description
  125. This package contains an utility to establish conversation with other PPP servers
  126. (via a modem).
  127. endef
  128. define Package/pppdump
  129. $(call Package/ppp/Default)
  130. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
  131. TITLE:=Read PPP record file
  132. endef
  133. define Package/pppdump/description
  134. This package contains an utility to read PPP record file.
  135. endef
  136. define Package/pppstats
  137. $(call Package/ppp/Default)
  138. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
  139. TITLE:=Report PPP statistics
  140. endef
  141. define Package/pppstats/description
  142. This package contains an utility to report PPP statistics.
  143. endef
  144. define Package/pppoe-discovery
  145. $(call Package/ppp/Default)
  146. DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +ppp-mod-pppoe
  147. TITLE:=Perform a PPPoE-discovery process
  148. endef
  149. define Package/pppoe-discovery/description
  150. This tool performs the same discovery process as pppoe, but does
  151. not initiate a session. Can be useful to debug pppoe.
  152. endef
  153. ifeq ($(BUILD_VARIANT),multilink)
  154. CONFIGURE_VARS += \
  155. enable_multilink=yes
  156. endif
  157. define Build/InstallDev
  158. $(INSTALL_DIR) $(1)/usr/include
  159. $(CP) $(PKG_INSTALL_DIR)/usr/include/pppd $(1)/usr/include/
  160. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  161. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
  162. endef
  163. define Package/ppp/script_install
  164. endef
  165. define Package/ppp/install
  166. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  167. $(INSTALL_DIR) $(1)/usr/sbin
  168. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
  169. $(INSTALL_DIR) $(1)/etc/ppp
  170. $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
  171. $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
  172. $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
  173. $(LN) /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
  174. $(INSTALL_DIR) $(1)/lib/netifd/proto
  175. $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/netifd/proto/
  176. $(INSTALL_BIN) ./files/lib/netifd/ppp-up $(1)/lib/netifd/
  177. $(INSTALL_BIN) ./files/lib/netifd/ppp6-up $(1)/lib/netifd/
  178. $(INSTALL_BIN) ./files/lib/netifd/ppp-down $(1)/lib/netifd/
  179. endef
  180. Package/ppp-multilink/install=$(Package/ppp/install)
  181. define Package/ppp-mod-pppoa/install
  182. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  183. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
  184. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  185. endef
  186. define Package/ppp-mod-pppoe/install
  187. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  188. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoe.so \
  189. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  190. endef
  191. define Package/ppp-mod-radius/install
  192. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  193. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
  194. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  195. $(INSTALL_DIR) $(1)/etc/ppp
  196. $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
  197. $(INSTALL_DIR) $(1)/etc/ppp/radius
  198. $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
  199. $(1)/etc/ppp/radius/
  200. $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
  201. $(1)/etc/ppp/radius/
  202. endef
  203. define Package/ppp-mod-pppol2tp/install
  204. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  205. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppol2tp.so \
  206. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  207. endef
  208. define Package/ppp-mod-pptp/install
  209. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  210. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pptp.so \
  211. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  212. $(INSTALL_DIR) $(1)/etc/ppp
  213. $(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/
  214. endef
  215. define Package/ppp-mod-passwordfd/install
  216. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  217. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/passwordfd.so \
  218. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  219. endef
  220. define Package/chat/install
  221. $(INSTALL_DIR) $(1)/usr/sbin
  222. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
  223. endef
  224. define Package/pppdump/install
  225. $(INSTALL_DIR) $(1)/usr/sbin
  226. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
  227. endef
  228. define Package/pppstats/install
  229. $(INSTALL_DIR) $(1)/usr/sbin
  230. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
  231. endef
  232. define Package/pppoe-discovery/install
  233. $(INSTALL_DIR) $(1)/usr/sbin
  234. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-discovery $(1)/usr/sbin/
  235. endef
  236. $(eval $(call BuildPackage,ppp))
  237. $(eval $(call BuildPackage,ppp-multilink))
  238. $(eval $(call BuildPackage,ppp-mod-pppoa))
  239. $(eval $(call BuildPackage,ppp-mod-pppoe))
  240. $(eval $(call BuildPackage,ppp-mod-radius))
  241. $(eval $(call BuildPackage,ppp-mod-pppol2tp))
  242. $(eval $(call BuildPackage,ppp-mod-pptp))
  243. $(eval $(call BuildPackage,ppp-mod-passwordfd))
  244. $(eval $(call BuildPackage,chat))
  245. $(eval $(call BuildPackage,pppdump))
  246. $(eval $(call BuildPackage,pppstats))
  247. $(eval $(call BuildPackage,pppoe-discovery))