Ticket #21350: Makefile

File Makefile, 3.9 KB (added by hojuruku, 20 months ago)

feeds/oldpackages/net/rp-pppoe/Makefile PKG_RELEASE:=2

Line 
1#
2# Copyright (C) 2006-2013 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=rp-pppoe
11PKG_VERSION:=3.11
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://roaringpenguin.com/files/download
16PKG_MD5SUM:=13b5900c56bd602df6cc526e5e520722
17
18PKG_BUILD_DEPENDS:=ppp
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/rp-pppoe/Default
23  SECTION:=net
24  CATEGORY:=Network
25  DEPENDS:=+ppp
26  TITLE:=PPPoE (PPP over Ethernet)
27  URL:=http://roaringpenguin.com/products/pppoe
28  SUBMENU:=dial-in/up
29endef
30
31define Package/rp-pppoe/Default/description
32  Dubbed RP-PPPoE, this open-source product is ideal for Linux users with
33  a DSL "modem" whose Internet service provider uses PPPoE.
34endef
35
36define Package/rp-pppoe-client
37  $(call Package/rp-pppoe/Default)
38  DEPENDS += @BROKEN
39  TITLE+= client
40endef
41
42define Package/rp-pppoe-client/description
43$(call Package/rp-pppoe/Default/description)
44 .
45 This package contains pppoe-connect.
46endef
47
48define Package/rp-pppoe-relay
49  $(call Package/rp-pppoe/Default)
50  TITLE+= relay
51endef
52
53define Package/rp-pppoe-relay/description
54$(call Package/rp-pppoe/Default/description)
55 .
56 This package contains pppoe-relay.
57endef
58
59define Package/rp-pppoe-server
60  $(call Package/rp-pppoe/Default)
61  TITLE+= server
62endef
63
64define Package/rp-pppoe-server/conffiles
65/etc/ppp/pppoe-server-options
66/etc/default/pppoe-server
67endef
68
69define Package/rp-pppoe-server/description
70$(call Package/rp-pppoe/Default/description)
71 .
72 This package contains pppoe-server.
73endef
74
75define Package/rp-pppoe-sniff
76  $(call Package/rp-pppoe/Default)
77  TITLE+= sniffer
78endef
79
80define Package/rp-pppoe-sniff/description
81$(call Package/rp-pppoe/Default/description)
82 .
83 This package contains pppoe-sniff.
84endef
85
86TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/src/libevent
87CONFIGURE_PATH := ./src
88CONFIGURE_ARGS += --enable-plugin=$(STAGING_DIR)/usr/include/
89CONFIGURE_VARS += \
90        ac_cv_path_PPPD=/usr/sbin/pppd \
91        ac_cv_linux_kernel_pppoe=yes \
92        ac_cv_header_linux_if_ether_h=no
93
94MAKE_FLAGS := DESTDIR="$(PKG_INSTALL_DIR)" install
95MAKE_PATH := ./src
96
97define Package/rp-pppoe-client/install
98        $(INSTALL_DIR) $(1)/etc/init.d
99        $(INSTALL_BIN) ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
100        $(INSTALL_DIR) $(1)/etc/ppp
101        $(CP) $(PKG_INSTALL_DIR)/etc/ppp/pppoe.conf $(1)/etc/ppp/
102        $(INSTALL_DIR) $(1)/usr/sbin
103        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/
104        $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-connect $(1)/usr/sbin/
105        $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-start $(1)/usr/sbin/
106        $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-stop $(1)/usr/sbin/
107        $(SED) 's,modprobe,insmod,g' $(1)/usr/sbin/pppoe-connect
108endef
109
110define Package/rp-pppoe-relay/install
111        $(INSTALL_DIR) $(1)/etc/default
112        $(INSTALL_BIN) ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay
113        $(INSTALL_DIR) $(1)/etc/init.d
114        $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
115        $(INSTALL_DIR) $(1)/usr/sbin
116        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
117endef
118
119define Package/rp-pppoe-server/install
120        $(INSTALL_DIR) $(1)/etc/default
121        $(INSTALL_BIN) ./files/pppoe-server.default $(1)/etc/default/pppoe-server
122        $(INSTALL_DIR) $(1)/etc/init.d
123        $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
124        $(INSTALL_DIR) $(1)/etc/ppp
125        $(INSTALL_DIR) $(1)/etc/ppp/plugins
126        $(CP) $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
127        $(INSTALL_DIR) $(1)/usr/sbin
128        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
129        $(CP) $(PKG_INSTALL_DIR)/etc/ppp/plugins/rp-pppoe.so $(1)/etc/ppp/plugins/
130endef
131
132define Package/rp-pppoe-sniff/install
133        $(INSTALL_DIR) $(1)/usr/sbin
134        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
135endef
136
137$(eval $(call BuildPackage,rp-pppoe-client))
138$(eval $(call BuildPackage,rp-pppoe-relay))
139$(eval $(call BuildPackage,rp-pppoe-server))
140$(eval $(call BuildPackage,rp-pppoe-sniff))