[net] Telephony: Yate: Added conffiles. Fixes overwriting of configuration on reinstall/update.

git-svn-id: svn://svn.openwrt.org/openwrt/packages@26184 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
cshore 2011-03-16 00:16:19 +00:00
parent 507c7dc7ec
commit 591fbdd41b

View File

@ -11,7 +11,7 @@ RELEASEVER:=3.2.0
PKG_NAME:=yate
PKG_VERSION:=$(RELEASEVER)-1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://yate.null.ro/tarballs/yate3/
@ -37,6 +37,10 @@ define Package/$(PKG_NAME)
MENU:=1
endef
define Package/$(PKG_NAME)/conffiles
/etc/yate/yate.conf
endef
define Package/$(PKG_NAME)/Default/description
Is a next-generation telephony engine focused on the VoIP and PSTN. It does
SIP, H.323, IAX, PSTN, and more.
@ -85,17 +89,23 @@ define BuildPlugin
DEPENDS:= $(PKG_NAME) $(4)
TITLE:=$(3)
endef
$(if $(PKG_BUILD_DIR)/conf.d/$(1).conf.sample,
define Package/$(PKG_NAME)-mod-$(1)/conffiles
/etc/yate/$(1).conf
endef
,)
define Package/$(PKG_NAME)-mod-$(1)/description
$(3) module for $(PKG_NAME)
endef
define Package/$(PKG_NAME)-mod-$(1)/install
$$(INSTALL_DIR) $$(1)/usr/lib/$(PKG_NAME)/$(2)
$$(INSTALL_DIR) $$(1)/usr/lib/yate/$(2)
$$(INSTALL_BIN) $$(PKG_BUILD_DIR)/modules/$(2)/$(1).yate $$(1)/usr/lib/yate/$(2)/$(1).yate
if [ -f $$(PKG_BUILD_DIR)/conf.d/$(1).conf.sample ]; then \
$$(INSTALL_DIR) $$(1)/etc/$(PKG_NAME) ;\
$$(INSTALL_DATA) $$(PKG_BUILD_DIR)/conf.d/$(1).conf.sample $$(1)/etc/$(PKG_NAME)/$(1).conf ;\
$$(INSTALL_DIR) $$(1)/etc/yate ;\
$$(INSTALL_DATA) $$(PKG_BUILD_DIR)/conf.d/$(1).conf.sample $$(1)/etc/yate/$(1).conf ;\
fi
endef