Makefile 8.2 KB

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