[packages] rp-pppoe-server (src:rp-pppoe): Identified two conffiles that should be...
[openwrt/svn-archive/archive.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/conffiles
62 /etc/ppp/pppoe-server-options
63 /etc/default/pppoe-server
64 endef
65
66 define Package/rp-pppoe-server/description
67 $(call Package/rp-pppoe/Default/description)
68 This package contains pppoe-server.
69 endef
70
71 define Package/rp-pppoe-sniff
72 $(call Package/rp-pppoe/Default)
73 TITLE+= sniffer
74 endef
75
76 define Package/rp-pppoe-sniff/description
77 $(call Package/rp-pppoe/Default/description)
78 This package contains pppoe-sniff.
79 endef
80
81 TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/src/libevent
82 CONFIGURE_PATH := ./src
83 CONFIGURE_ARGS += ac_cv_path_PPPD=/usr/sbin/pppd --enable-plugin=$(STAGING_DIR)/usr/include/
84 MAKE_FLAGS := DESTDIR="$(PKG_INSTALL_DIR)" install
85 MAKE_PATH := ./src
86
87 define Package/rp-pppoe-client/install
88 $(INSTALL_DIR) $(1)/etc/init.d
89 $(INSTALL_BIN) ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
90 $(INSTALL_DIR) $(1)/etc/ppp
91 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe.conf $(1)/etc/ppp/
92 $(INSTALL_DIR) $(1)/usr/sbin
93 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/
94 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-connect $(1)/usr/sbin/
95 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-start $(1)/usr/sbin/
96 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-stop $(1)/usr/sbin/
97 $(SED) 's,modprobe,insmod,g' $(1)/usr/sbin/pppoe-connect
98 endef
99
100 define Package/rp-pppoe-relay/install
101 $(INSTALL_DIR) $(1)/etc/default
102 $(INSTALL_BIN) ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay
103 $(INSTALL_DIR) $(1)/etc/init.d
104 $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
105 $(INSTALL_DIR) $(1)/usr/sbin
106 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
107 endef
108
109 define Package/rp-pppoe-server/install
110 $(INSTALL_DIR) $(1)/etc/default
111 $(INSTALL_BIN) ./files/pppoe-server.default $(1)/etc/default/pppoe-server
112 $(INSTALL_DIR) $(1)/etc/init.d
113 $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
114 $(INSTALL_DIR) $(1)/etc/ppp
115 $(INSTALL_DIR) $(1)/etc/ppp/plugins
116 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
117 $(INSTALL_DIR) $(1)/usr/sbin
118 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/ppp/plugins/rp-pppoe.so $(1)/etc/ppp/plugins/
120 endef
121
122 define Package/rp-pppoe-sniff/install
123 $(INSTALL_DIR) $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
125 endef
126
127 $(eval $(call BuildPackage,rp-pppoe-client))
128 $(eval $(call BuildPackage,rp-pppoe-relay))
129 $(eval $(call BuildPackage,rp-pppoe-server))
130 $(eval $(call BuildPackage,rp-pppoe-sniff))