[package] proftpd: update to 1.3.2d, cleanup Makefile
[packages.git] / net / rp-pppoe / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=rp-pppoe
11 PKG_VERSION:=3.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://roaringpenguin.com/files/download
16 PKG_MD5SUM:=d58a13cc4185bca6121a606ff456dec0
17
18 PKG_BUILD_DEPENDS:=ppp
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define 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
29 endef
30
31 define 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.
34 endef
35
36 define Package/rp-pppoe-client
37   $(call Package/rp-pppoe/Default)
38   TITLE+= client
39 endef
40
41 define Package/rp-pppoe-client/description
42         $(call Package/rp-pppoe/Default/description)
43         This package contains pppoe-connect.
44 endef
45
46 define Package/rp-pppoe-relay
47   $(call Package/rp-pppoe/Default)
48   TITLE+= relay
49 endef
50
51 define Package/rp-pppoe-relay/description
52         $(call Package/rp-pppoe/Default/description)
53         This package contains pppoe-relay.
54 endef
55
56 define Package/rp-pppoe-server
57   $(call Package/rp-pppoe/Default)
58   TITLE+= server
59 endef
60
61 define Package/rp-pppoe-server/description
62         $(call Package/rp-pppoe/Default/description)
63         This package contains pppoe-server.
64 endef
65
66 define Package/rp-pppoe-sniff
67   $(call Package/rp-pppoe/Default)
68   TITLE+= sniffer
69 endef
70
71 define Package/rp-pppoe-sniff/description
72         $(call Package/rp-pppoe/Default/description)
73         This package contains pppoe-sniff.
74 endef
75
76 TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/src/libevent
77 CONFIGURE_PATH := ./src
78 CONFIGURE_ARGS += ac_cv_path_PPPD=/usr/sbin/pppd --enable-plugin=$(STAGING_DIR)/usr/include/
79 MAKE_FLAGS := DESTDIR="$(PKG_INSTALL_DIR)" install
80 MAKE_PATH := ./src
81
82 define Package/rp-pppoe-client/install  
83         $(INSTALL_DIR) $(1)/etc/init.d
84         $(INSTALL_BIN) ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
85         $(INSTALL_DIR) $(1)/etc/ppp
86         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe.conf $(1)/etc/ppp/
87         $(INSTALL_DIR) $(1)/usr/sbin
88         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/
89         $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-connect $(1)/usr/sbin/
90         $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-start $(1)/usr/sbin/
91         $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-stop $(1)/usr/sbin/
92         $(SED) 's,modprobe,insmod,g' $(1)/usr/sbin/pppoe-connect
93 endef
94
95 define Package/rp-pppoe-relay/install   
96         $(INSTALL_DIR) $(1)/etc/default
97         $(INSTALL_BIN) ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay
98         $(INSTALL_DIR) $(1)/etc/init.d
99         $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
100         $(INSTALL_DIR) $(1)/usr/sbin
101         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
102 endef
103
104 define Package/rp-pppoe-server/install  
105         $(INSTALL_DIR) $(1)/etc/default
106         $(INSTALL_BIN) ./files/pppoe-server.default $(1)/etc/default/pppoe-server
107         $(INSTALL_DIR) $(1)/etc/init.d
108         $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
109         $(INSTALL_DIR) $(1)/etc/ppp
110         $(INSTALL_DIR) $(1)/etc/ppp/plugins
111         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
112         $(INSTALL_DIR) $(1)/usr/sbin
113         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
114         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/ppp/plugins/rp-pppoe.so $(1)/etc/ppp/plugins/
115 endef
116
117 define Package/rp-pppoe-sniff/install   
118         $(INSTALL_DIR) $(1)/usr/sbin
119         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
120 endef
121
122 $(eval $(call BuildPackage,rp-pppoe-client))
123 $(eval $(call BuildPackage,rp-pppoe-relay))
124 $(eval $(call BuildPackage,rp-pppoe-server))
125 $(eval $(call BuildPackage,rp-pppoe-sniff))