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