source: freewrt/package/ppp/Makefile@ d419478

freewrt_1_0 freewrt_2_0
Last change on this file since d419478 was d419478, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

git-svn-id: svn://www.freewrt.org/trunk/freewrt@303 afb5a338-a214-0410-bd46-81f09a774fd1

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