From: Sebastian Kemper Date: Wed, 2 Oct 2019 18:55:56 +0000 (+0200) Subject: asterisk-16.x: amend config file handling X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fpull%2F459%2Fhead;p=feed%2Ftelephony.git asterisk-16.x: amend config file handling Use $(INSTALL_CONF) instead of $(CP) for module configuration files. $(INSTALL_CONF) is already used for the init script and utility configuration files Rename ./files/asterisk.config to ./files/asterisk.conf as per OpenWrt package policies page [1]. [1] https://openwrt.org/docs/guide-developer/package-policies Signed-off-by: Sebastian Kemper --- diff --git a/net/asterisk-16.x/Makefile b/net/asterisk-16.x/Makefile index 04e7e45..b8682df 100644 --- a/net/asterisk-16.x/Makefile +++ b/net/asterisk-16.x/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk AST_MAJOR_VERSION:=16 PKG_NAME:=asterisk$(AST_MAJOR_VERSION) PKG_VERSION:=$(AST_MAJOR_VERSION).3.0 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases @@ -332,7 +332,7 @@ endef define Package/$(PKG_NAME)/install/conffile $(INSTALL_DIR) $(1)/etc/asterisk - $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$(2) $(1)/etc/asterisk/ + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/asterisk/$(2) $(1)/etc/asterisk/ endef define Package/$(PKG_NAME)/install/lib @@ -498,7 +498,7 @@ $(foreach m,$(AST_EMB_MODULES),$(call Package/$(PKG_NAME)/install/module,$(1),$( $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk - $(INSTALL_CONF) ./files/asterisk.config $(1)/etc/config/asterisk + $(INSTALL_CONF) ./files/asterisk.conf $(1)/etc/config/asterisk endef define Package/$(PKG_NAME)-sounds diff --git a/net/asterisk-16.x/files/asterisk.conf b/net/asterisk-16.x/files/asterisk.conf new file mode 100644 index 0000000..3c05e0a --- /dev/null +++ b/net/asterisk-16.x/files/asterisk.conf @@ -0,0 +1,26 @@ + +config asterisk 'general' + option enabled '0' + # If you have problems running Asterisk as user "asterisk" we'd + # like to hear from you. Please raise an issue at: + # https://github.com/openwrt/telephony/issues + option user 'asterisk' + option group 'asterisk' + option log_stderr '1' + option log_stdout '1' + option options '' + +config asterisk 'directories' + # The init script will only create below directories and update + # their permissions if they don't exist. + # Note: To change the default paths you need to update your + # "asterisk.conf" file. + option agidir '/usr/share/asterisk/agi-bin' + option datadir '/usr/share/asterisk' + option dbdir '/var/lib/asterisk/astdb' + option keydir '/usr/share/asterisk/keys' + option logdir '/var/log/asterisk' + option rundir '/var/run/asterisk' + option spooldir '/var/spool/asterisk' + option varlibdir '/var/lib/asterisk' + diff --git a/net/asterisk-16.x/files/asterisk.config b/net/asterisk-16.x/files/asterisk.config deleted file mode 100644 index 3c05e0a..0000000 --- a/net/asterisk-16.x/files/asterisk.config +++ /dev/null @@ -1,26 +0,0 @@ - -config asterisk 'general' - option enabled '0' - # If you have problems running Asterisk as user "asterisk" we'd - # like to hear from you. Please raise an issue at: - # https://github.com/openwrt/telephony/issues - option user 'asterisk' - option group 'asterisk' - option log_stderr '1' - option log_stdout '1' - option options '' - -config asterisk 'directories' - # The init script will only create below directories and update - # their permissions if they don't exist. - # Note: To change the default paths you need to update your - # "asterisk.conf" file. - option agidir '/usr/share/asterisk/agi-bin' - option datadir '/usr/share/asterisk' - option dbdir '/var/lib/asterisk/astdb' - option keydir '/usr/share/asterisk/keys' - option logdir '/var/log/asterisk' - option rundir '/var/run/asterisk' - option spooldir '/var/spool/asterisk' - option varlibdir '/var/lib/asterisk' -