Makefile 4.7 KB

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