packages/rp-pppoe: use new service functions, use $(CP) instead of $(INSTALL_*) for packaging stuff installed by upstream Makefile

git-svn-id: svn://svn.openwrt.org/openwrt/packages@29082 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2011-11-13 22:16:30 +00:00
parent 7b8394f701
commit 26b1491d87
3 changed files with 35 additions and 30 deletions

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006-2011 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=rp-pppoe PKG_NAME:=rp-pppoe
PKG_VERSION:=3.10 PKG_VERSION:=3.10
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://roaringpenguin.com/files/download PKG_SOURCE_URL:=http://roaringpenguin.com/files/download
@ -40,6 +40,7 @@ endef
define Package/rp-pppoe-client/description define Package/rp-pppoe-client/description
$(call Package/rp-pppoe/Default/description) $(call Package/rp-pppoe/Default/description)
.
This package contains pppoe-connect. This package contains pppoe-connect.
endef endef
@ -50,6 +51,7 @@ endef
define Package/rp-pppoe-relay/description define Package/rp-pppoe-relay/description
$(call Package/rp-pppoe/Default/description) $(call Package/rp-pppoe/Default/description)
.
This package contains pppoe-relay. This package contains pppoe-relay.
endef endef
@ -65,6 +67,7 @@ endef
define Package/rp-pppoe-server/description define Package/rp-pppoe-server/description
$(call Package/rp-pppoe/Default/description) $(call Package/rp-pppoe/Default/description)
.
This package contains pppoe-server. This package contains pppoe-server.
endef endef
@ -75,6 +78,7 @@ endef
define Package/rp-pppoe-sniff/description define Package/rp-pppoe-sniff/description
$(call Package/rp-pppoe/Default/description) $(call Package/rp-pppoe/Default/description)
.
This package contains pppoe-sniff. This package contains pppoe-sniff.
endef endef
@ -88,9 +92,9 @@ define Package/rp-pppoe-client/install
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client $(INSTALL_BIN) ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
$(INSTALL_DIR) $(1)/etc/ppp $(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe.conf $(1)/etc/ppp/ $(CP) $(PKG_INSTALL_DIR)/etc/ppp/pppoe.conf $(1)/etc/ppp/
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-connect $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-connect $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-start $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-start $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-stop $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/pppoe-stop $(1)/usr/sbin/
@ -103,7 +107,7 @@ define Package/rp-pppoe-relay/install
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
endef endef
define Package/rp-pppoe-server/install define Package/rp-pppoe-server/install
@ -113,15 +117,15 @@ define Package/rp-pppoe-server/install
$(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
$(INSTALL_DIR) $(1)/etc/ppp $(INSTALL_DIR) $(1)/etc/ppp
$(INSTALL_DIR) $(1)/etc/ppp/plugins $(INSTALL_DIR) $(1)/etc/ppp/plugins
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/ $(CP) $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/ppp/plugins/rp-pppoe.so $(1)/etc/ppp/plugins/ $(CP) $(PKG_INSTALL_DIR)/etc/ppp/plugins/rp-pppoe.so $(1)/etc/ppp/plugins/
endef endef
define Package/rp-pppoe-sniff/install define Package/rp-pppoe-sniff/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
endef endef
$(eval $(call BuildPackage,rp-pppoe-client)) $(eval $(call BuildPackage,rp-pppoe-client))

View File

@ -1,15 +1,15 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006-2011 OpenWrt.org
START=50 START=50
DEFAULT=/etc/default/pppoe-relay DEFAULT=/etc/default/pppoe-relay
start() { start() {
[ -f $DEFAULT ] && . $DEFAULT [ -f $DEFAULT ] && . $DEFAULT
pppoe-relay $OPTIONS service_start /usr/sbin/pppoe-relay $OPTIONS
} }
stop() { stop() {
killall pppoe-relay service_stop /usr/sbin/pppoe-relay
} }

View File

@ -1,14 +1,15 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006-2011 OpenWrt.org
START=50 START=50
DEFAULT=/etc/default/pppoe-server DEFAULT=/etc/default/pppoe-server
start() { start() {
[ -f $DEFAULT ] && . $DEFAULT [ -f $DEFAULT ] && . $DEFAULT
pppoe-server $OPTIONS service_start /usr/sbin/pppoe-server $OPTIONS
} }
stop() { stop() {
killall pppoe-server service_stop /usr/sbin/pppoe-server
} }