remove unneeded RSTRIP calls.
[openwrt.git] / package / ppp / Makefile
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
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ppp
12 PKG_VERSION:=2.4.3
13 PKG_RELEASE:=7
14 PKG_BUILDDEP:=libpcap linux-atm
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
19 PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
20 PKG_CAT:=zcat
21
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/ppp
27 SECTION:=net
28 CATEGORY:=Network
29 MENU:=1
30 DEFAULT:=y
31 TITLE:=PPP daemon
32 DESCRIPTION:=PPP (Point-to-Point Protocol) daemon
33 URL:=http://ppp.samba.org/
34 endef
35
36 define Package/ppp-mod-pppoa
37 SECTION:=net
38 CATEGORY:=Network
39 DEPENDS:=ppp +linux-atm
40 TITLE:=PPPoA plugin
41 DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp
42 endef
43
44 define Package/ppp-mod-pppoe
45 SECTION:=net
46 CATEGORY:=Network
47 DEFAULT:=y
48 DEPENDS:=ppp
49 TITLE:=PPPoE plugin
50 DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp
51 endef
52
53 define Package/ppp-mod-radius
54 SECTION:=net
55 CATEGORY:=Network
56 DEPENDS:=ppp
57 TITLE:=RADIUS plugin
58 DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp
59 endef
60
61 define Package/chat
62 SECTION:=net
63 CATEGORY:=Network
64 DEPENDS:=ppp
65 TITLE:=Establish conversation with a modem
66 DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem)
67 endef
68
69 define Package/pppdump
70 SECTION:=net
71 CATEGORY:=Network
72 DEPENDS:=ppp
73 TITLE:=Read PPP record file
74 DESCRIPTION:=Utility to read PPP record file
75 endef
76
77 define Package/pppstats
78 SECTION:=net
79 CATEGORY:=Network
80 DEPENDS:=ppp
81 TITLE:=Report PPP statistics
82 DESCRIPTION:=Utility to report PPP statistics
83 endef
84
85 define Build/Compile
86         rm -rf $(PKG_INSTALL_DIR)
87         mkdir -p $(PKG_INSTALL_DIR)/usr
88         $(MAKE) -C $(PKG_BUILD_DIR) \
89                 CC=$(TARGET_CC) \
90                 COPTS="$(TARGET_CFLAGS)" \
91                 PRECOMPILED_FILTER=1 \
92                 STAGING_DIR="$(STAGING_DIR)" \
93                 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
94                 all install
95 endef
96
97 define Package/ppp/install
98         install -d -m0755 $(1)/etc/ppp
99         install -m0600 ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
100         install -m0644 ./files/etc/ppp/filter $(1)/etc/ppp/
101         install -m0755 ./files/etc/ppp/ip-up $(1)/etc/ppp/
102         install -d -m0755 $(1)/etc/ppp/ip-up.d
103         install -m0755 ./files/etc/ppp/ip-down $(1)/etc/ppp/
104         install -d -m0755 $(1)/etc/ppp/ip-down.d
105         install -m0644 ./files/etc/ppp/options $(1)/etc/ppp/
106         ln -sf /tmp/resolv.conf $(1)/etc/ppp/resolv.conf
107         install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
108         install -d -m0755 $(1)/usr/sbin
109         install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
110 endef
111         
112 define Package/ppp-mod-pppoa/install
113         install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
114         install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
115                 $(1)/usr/lib/pppd/$(PKG_VERSION)/
116         install -d -m0755 $(1)/sbin
117         install -m0755 ./files/ifup.pppoa $(1)/sbin/
118 endef
119
120 define Package/ppp-mod-pppoe/install
121         install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
122         install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
123                 $(1)/usr/lib/pppd/$(PKG_VERSION)/
124         install -d -m0755 $(1)/sbin
125         install -m0755 ./files/ifup.pppoe $(1)/sbin/
126 endef
127
128 define Package/ppp-mod-radius/install
129         install -d -m0755 $(1)/etc/ppp
130         install -m644 ./files/etc/ppp/radius.conf $(1)/etc/ppp/
131         install -d -m0755 $(1)/etc/ppp/radius
132         install -m644 ./files/etc/ppp/radius/dictionary* \
133                 $(1)/etc/ppp/radius/
134         install -m600 ./files/etc/ppp/radius/servers \
135                 $(1)/etc/ppp/radius/
136         install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
137         install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
138                 $(1)/usr/lib/pppd/$(PKG_VERSION)/
139 endef
140
141 define Package/chat/install
142         install -d -m0755 $(1)/usr/sbin
143         install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
144 endef
145
146 define Package/pppdump/install
147         install -d -m0755 $(1)/usr/sbin
148         install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
149 endef
150
151 define Package/pppstats/install
152         install -d -m0755 $(1)/usr/sbin
153         install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
154 endef
155
156 $(eval $(call BuildPackage,ppp))
157 $(eval $(call BuildPackage,ppp-mod-pppoa))
158 $(eval $(call BuildPackage,ppp-mod-pppoe))
159 $(eval $(call BuildPackage,ppp-mod-radius))
160 $(eval $(call BuildPackage,chat))
161 $(eval $(call BuildPackage,pppdump))
162 $(eval $(call BuildPackage,pppstats))