Fixed user-space br2684ctl to be more verbose, also copy all the libatm dependencies.
[openwrt.git] / package / ppp / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=ppp
6 PKG_VERSION:=2.4.3
7 PKG_RELEASE:=7
8 PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
9
10 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 define PKG_mod_template
20
21 $$(IPKG_$(1)):
22 install -d -m0755 $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION)
23 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/$(2).so \
24 $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION)/
25 $(RSTRIP) $$(IDIR_$(1))
26 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
27
28 endef
29
30 $(eval $(call PKG_template,PPP,ppp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
31 $(eval $(call PKG_template,PPP_MOD_PPPOA,ppp-mod-pppoa,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
32 $(eval $(call PKG_template,PPP_MOD_PPPOE,ppp-mod-pppoe,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
33 $(eval $(call PKG_template,PPP_MOD_RADIUS,ppp-mod-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
34 $(eval $(call PKG_template,CHAT,chat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
35 $(eval $(call PKG_template,PPPDUMP,pppdump,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
36 $(eval $(call PKG_template,PPPSTATS,pppstats,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
37
38 $(eval $(call PKG_mod_template,PPP_MOD_PPPOA,pppoatm))
39 $(eval $(call PKG_mod_template,PPP_MOD_PPPOE,rp-pppoe))
40 $(eval $(call PKG_mod_template,PPP_MOD_RADIUS,radius))
41
42 PKG_DEPEND:="kmod-ppp"
43 ifeq ($(BR2_PACKAGE_PPP_WITH_FILTER),y)
44 ENABLE_FILTER:="FILTER=1"
45 PKG_DEPEND += ", libpcap"
46 endif
47
48 $(PKG_BUILD_DIR)/.configured:
49 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
50 $(TARGET_CONFIGURE_OPTS) \
51 CFLAGS="$(TARGET_CFLAGS)" \
52 ./configure \
53 --target=$(GNU_TARGET_NAME) \
54 --host=$(GNU_TARGET_NAME) \
55 --build=$(GNU_HOST_NAME) \
56 --program-prefix="" \
57 --program-suffix="" \
58 --prefix=/usr \
59 --exec-prefix=/usr \
60 --bindir=/usr/bin \
61 --datadir=/usr/share \
62 --includedir=/usr/include \
63 --infodir=/usr/share/info \
64 --libdir=/usr/lib \
65 --libexecdir=/usr/lib \
66 --localstatedir=/var \
67 --mandir=/usr/share/man \
68 --sbindir=/usr/sbin \
69 --sysconfdir=/etc \
70 $(DISABLE_LARGEFILE) \
71 $(DISABLE_NLS) \
72 )
73 touch $@
74
75 $(PKG_BUILD_DIR)/.built:
76 rm -rf $(PKG_INSTALL_DIR)
77 mkdir -p $(PKG_INSTALL_DIR)/usr
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 CC=$(TARGET_CC) \
80 COPTS="$(TARGET_CFLAGS)" \
81 HAVE_INET6="1" \
82 $(ENABLE_FILTER) \
83 STAGING_DIR=$(STAGING_DIR) \
84 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
85 all install
86 touch $@
87
88 $(IPKG_PPP):
89 install -d -m0755 $(IDIR_PPP)/etc/ppp
90 ln -sf /tmp/resolv.conf $(IDIR_PPP)/etc/ppp/resolv.conf
91 install -m0600 ./files/etc/ppp/chap-secrets $(IDIR_PPP)/etc/ppp/
92 install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/
93 install -m0755 ./files/etc/ppp/ip-up $(IDIR_PPP)/etc/ppp/
94 install -m0755 ./files/etc/ppp/ip-down $(IDIR_PPP)/etc/ppp/
95 install -d -m0755 $(IDIR_PPP)/usr/sbin
96 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(IDIR_PPP)/usr/sbin/
97 install -d -m0755 $(IDIR_PPP)/usr/lib/pppd
98 echo "Depends: $(PKG_DEPEND)" >> $(IDIR_PPP)/CONTROL/control
99 $(RSTRIP) $(IDIR_PPP)
100 $(IPKG_BUILD) $(IDIR_PPP) $(PACKAGE_DIR)
101
102 $(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa:
103 install -d -m0755 $(IDIR_PPP_MOD_PPPOA)/sbin
104 install -m0755 ./files/ifup.pppoa $(IDIR_PPP_MOD_PPPOA)/sbin/
105
106 $(IPKG_PPP_MOD_PPPOA): $(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa
107
108 $(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe:
109 install -d -m0755 $(IDIR_PPP_MOD_PPPOE)/sbin
110 install -m0755 ./files/ifup.pppoe $(IDIR_PPP_MOD_PPPOE)/sbin/
111
112 $(IPKG_PPP_MOD_PPPOE): $(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe
113
114 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf:
115 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp
116 install -m644 ./files/etc/ppp/radius.conf $(IDIR_PPP_MOD_RADIUS)/etc/ppp/
117 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius
118 install -m644 ./files/etc/ppp/radius/dictionary* \
119 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
120 install -m600 ./files/etc/ppp/radius/servers \
121 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
122
123 $(IPKG_PPP_MOD_RADIUS): $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf
124
125 $(IPKG_CHAT):
126 install -d -m0755 $(IDIR_CHAT)/usr/sbin
127 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/
128 $(RSTRIP) $(IDIR_CHAT)
129 $(IPKG_BUILD) $(IDIR_CHAT) $(PACKAGE_DIR)
130
131 $(IPKG_PPPDUMP):
132 install -d -m0755 $(IDIR_PPPDUMP)/usr/sbin
133 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/
134 $(RSTRIP) $(IDIR_PPPDUMP)
135 $(IPKG_BUILD) $(IDIR_PPPDUMP) $(PACKAGE_DIR)
136
137 $(IPKG_PPPSTATS): $(IPKG_PPP)
138 install -d -m0755 $(IDIR_PPPSTATS)/usr/sbin
139 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/
140 $(RSTRIP) $(IDIR_PPPSTATS)
141 $(IPKG_BUILD) $(IDIR_PPPSTATS) $(PACKAGE_DIR)
142
This page took 0.04959 seconds and 5 git commands to generate.