Makefile 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. #
  2. # Copyright (C) 2006-2010 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.4
  11. PKG_RELEASE:=6
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
  14. PKG_MD5SUM:=183800762e266132218b204dfb428d29
  15. PKG_BUILD_DEPENDS:=libpcap
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/ppp/Default
  19. SECTION:=net
  20. CATEGORY:=Network
  21. URL:=http://ppp.samba.org/
  22. endef
  23. define Package/ppp
  24. $(call Package/ppp/Default)
  25. DEPENDS:=+kmod-ppp
  26. TITLE:=PPP daemon
  27. MENU:=1
  28. endef
  29. define Package/ppp/description
  30. This package contains the PPP (Point-to-Point Protocol) daemon.
  31. endef
  32. define Package/ppp-mod-pppoa
  33. $(call Package/ppp/Default)
  34. DEPENDS:=ppp +linux-atm +kmod-pppoa
  35. TITLE:=PPPoA plugin
  36. endef
  37. define Package/ppp-mod-pppoa/description
  38. This package contains a PPPoA (PPP over ATM) plugin for ppp.
  39. endef
  40. define Package/ppp-mod-pppoe
  41. $(call Package/ppp/Default)
  42. DEPENDS:=ppp +kmod-pppoe
  43. TITLE:=PPPoE plugin
  44. endef
  45. define Package/ppp-mod-pppoe/description
  46. This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
  47. endef
  48. define Package/ppp-mod-radius
  49. $(call Package/ppp/Default)
  50. DEPENDS:=ppp
  51. TITLE:=RADIUS plugin
  52. endef
  53. define Package/ppp-mod-radius/description
  54. This package contains a RADIUS (Remote Authentication Dial-In User Service)
  55. plugin for ppp.
  56. endef
  57. define Package/chat
  58. $(call Package/ppp/Default)
  59. DEPENDS:=ppp
  60. TITLE:=Establish conversation with a modem
  61. endef
  62. define Package/chat/description
  63. This package contains an utility to establish conversation with other PPP servers
  64. (via a modem).
  65. endef
  66. define Package/pppdump
  67. $(call Package/ppp/Default)
  68. DEPENDS:=ppp
  69. TITLE:=Read PPP record file
  70. endef
  71. define Package/pppdump/description
  72. This package contains an utility to read PPP record file.
  73. endef
  74. define Package/pppstats
  75. $(call Package/ppp/Default)
  76. DEPENDS:=ppp
  77. TITLE:=Report PPP statistics
  78. endef
  79. define Package/pppstats/description
  80. This package contains an utility to report PPP statistics.
  81. endef
  82. define Build/Configure
  83. $(call Build/Configure/Default,, \
  84. UNAME_S="Linux" \
  85. UNAME_R="$(LINUX_VERSION)" \
  86. UNAME_M="$(ARCH)" \
  87. )
  88. mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
  89. cp \
  90. $(LINUX_DIR)/include/linux/compiler.h \
  91. $(LINUX_DIR)/include/linux/atm*.h \
  92. $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
  93. endef
  94. MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
  95. PRECOMPILED_FILTER=1 \
  96. STAGING_DIR="$(STAGING_DIR)"
  97. define Build/InstallDev
  98. $(INSTALL_DIR) $(1)/usr/include
  99. $(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
  100. endef
  101. define Package/ppp/install
  102. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  103. $(INSTALL_DIR) $(1)/usr/sbin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/
  105. $(INSTALL_DIR) $(1)/lib/network
  106. $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
  107. $(INSTALL_DIR) $(1)/etc/ppp
  108. $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
  109. $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
  110. $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
  111. $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
  112. $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
  113. $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
  114. $(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
  115. $(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
  116. $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
  117. ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
  118. endef
  119. define Package/ppp-mod-pppoa/install
  120. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  121. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppoatm.so \
  122. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  123. $(INSTALL_DIR) $(1)/lib/network
  124. $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
  125. $(INSTALL_DIR) $(1)/etc/hotplug.d/atm
  126. $(INSTALL_DATA) ./files/etc/hotplug.d/atm/20-usb-modem $(1)/etc/hotplug.d/atm/
  127. endef
  128. define Package/ppp-mod-pppoe/install
  129. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  130. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
  131. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  132. $(INSTALL_DIR) $(1)/lib/network
  133. $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
  134. endef
  135. define Package/ppp-mod-radius/install
  136. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  137. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/radius.so \
  138. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  139. $(INSTALL_DIR) $(1)/etc/ppp
  140. $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
  141. $(INSTALL_DIR) $(1)/etc/ppp/radius
  142. $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
  143. $(1)/etc/ppp/radius/
  144. $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
  145. $(1)/etc/ppp/radius/
  146. endef
  147. define Package/chat/install
  148. $(INSTALL_DIR) $(1)/usr/sbin
  149. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
  150. endef
  151. define Package/pppdump/install
  152. $(INSTALL_DIR) $(1)/usr/sbin
  153. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
  154. endef
  155. define Package/pppstats/install
  156. $(INSTALL_DIR) $(1)/usr/sbin
  157. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
  158. endef
  159. $(eval $(call BuildPackage,ppp))
  160. $(eval $(call BuildPackage,ppp-mod-pppoa))
  161. $(eval $(call BuildPackage,ppp-mod-pppoe))
  162. $(eval $(call BuildPackage,ppp-mod-radius))
  163. $(eval $(call BuildPackage,chat))
  164. $(eval $(call BuildPackage,pppdump))
  165. $(eval $(call BuildPackage,pppstats))