Makefile 5.5 KB

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