Makefile 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. #
  2. # Copyright (C) 2006-2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=ppp
  10. PKG_VERSION:=2.4.3
  11. PKG_RELEASE:=10
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
  14. PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
  15. PKG_BUILD_DEPENDS:=libpcap
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/kernel.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
  55. Service) 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
  64. PPP servers (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. endef
  89. define Build/Compile
  90. rm -rf $(PKG_INSTALL_DIR)
  91. mkdir -p $(PKG_INSTALL_DIR)/usr
  92. $(MAKE) -C $(PKG_BUILD_DIR) \
  93. $(TARGET_CONFIGURE_OPTS) \
  94. COPTS="$(TARGET_CFLAGS)" \
  95. PRECOMPILED_FILTER=1 \
  96. STAGING_DIR="$(STAGING_DIR)" \
  97. DESTDIR="$(PKG_INSTALL_DIR)/usr" \
  98. all install
  99. endef
  100. define Build/InstallDev
  101. $(INSTALL_DIR) $(1)/usr/include
  102. $(CP) $(PKG_INSTALL_DIR)/usr/include/pppd $(1)/usr/include/
  103. endef
  104. define Package/ppp/install
  105. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  106. $(INSTALL_DIR) $(1)/usr/sbin
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
  108. $(INSTALL_DIR) $(1)/lib/network
  109. $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
  110. $(INSTALL_DIR) $(1)/etc/ppp
  111. $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
  112. $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
  113. $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
  114. $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
  115. $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
  116. $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
  117. $(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
  118. $(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
  119. $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
  120. ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
  121. endef
  122. define Package/ppp-mod-pppoa/install
  123. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  124. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
  125. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  126. $(INSTALL_DIR) $(1)/lib/network
  127. $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
  128. endef
  129. define Package/ppp-mod-pppoe/install
  130. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/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)/usr/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)/usr/sbin/chat $(1)/usr/sbin/
  151. endef
  152. define Package/pppdump/install
  153. $(INSTALL_DIR) $(1)/usr/sbin
  154. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
  155. endef
  156. define Package/pppstats/install
  157. $(INSTALL_DIR) $(1)/usr/sbin
  158. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/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))