Makefile 5.2 KB

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