Fix install permissions and executable bits for rp-pppoe (#2882)
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rp-pppoe
12 PKG_VERSION:=3.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://roaringpenguin.com/files/download
17 PKG_MD5SUM:=0e32760f498f9cde44081ee6aafc823b
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/rp-pppoe/Default
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+ppp
28 TITLE:=PPPoE (PPP over Ethernet)
29 URL:=http://roaringpenguin.com/penguin/pppoe/
30 SUBMENU:=dial-in/up
31 endef
32
33 define Package/rp-pppoe-client
34 $(call Package/rp-pppoe/Default)
35 TITLE+= client
36 endef
37
38 define Package/rp-pppoe-relay
39 $(call Package/rp-pppoe/Default)
40 TITLE+= relay
41 endef
42
43 define Package/rp-pppoe-server
44 $(call Package/rp-pppoe/Default)
45 TITLE+= server
46 endef
47
48 define Package/rp-pppoe-sniff
49 $(call Package/rp-pppoe/Default)
50 TITLE+= sniffer
51 endef
52
53 TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/src/libevent
54 CONFIGURE_PATH := ./src
55 CONFIGURE_ARGS += ac_cv_path_PPPD=/usr/sbin/pppd
56 MAKE_FLAGS := RPM_INSTALL_ROOT="$(PKG_INSTALL_DIR)" install
57 MAKE_PATH := ./src
58
59 define Package/rp-pppoe-client/install
60 $(INSTALL_DIR) $(1)/etc/init.d
61 $(INSTALL_BIN) ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
62 $(INSTALL_DIR) $(1)/etc/ppp
63 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe.conf $(1)/etc/ppp/
64 $(INSTALL_DIR) $(1)/usr/sbin
65 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-connect $(1)/usr/sbin/
67 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-start $(1)/usr/sbin/
68 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-stop $(1)/usr/sbin/
69 $(SED) 's,modprobe,insmod,g' $(1)/usr/sbin/pppoe-connect
70 endef
71
72 define Package/rp-pppoe-relay/install
73 $(INSTALL_DIR) $(1)/etc/default
74 $(INSTALL_BIN) ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay
75 $(INSTALL_DIR) $(1)/etc/init.d
76 $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
79 endef
80
81 define Package/rp-pppoe-server/install
82 $(INSTALL_DIR) $(1)/etc/default
83 $(INSTALL_BIN) ./files/pppoe-server.default $(1)/etc/default/pppoe-server
84 $(INSTALL_DIR) $(1)/etc/init.d
85 $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
86 $(INSTALL_DIR) $(1)/etc/ppp
87 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
88 $(INSTALL_DIR) $(1)/usr/sbin
89 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
90 endef
91
92 define Package/rp-pppoe-sniff/install
93 $(INSTALL_DIR) $(1)/usr/sbin
94 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
95 endef
96
97 $(eval $(call BuildPackage,rp-pppoe-client))
98 $(eval $(call BuildPackage,rp-pppoe-relay))
99 $(eval $(call BuildPackage,rp-pppoe-server))
100 $(eval $(call BuildPackage,rp-pppoe-sniff))