asterisk-16.x: amend config file handling 459/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Wed, 2 Oct 2019 18:55:56 +0000 (20:55 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Wed, 2 Oct 2019 18:56:04 +0000 (20:56 +0200)
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 <sebastian_ml@gmx.net>
net/asterisk-16.x/Makefile
net/asterisk-16.x/files/asterisk.conf [new file with mode: 0644]
net/asterisk-16.x/files/asterisk.config [deleted file]

index 04e7e456028cdf5f5ded15cb2d25a8b2f77eadce..b8682dfeee5484a1dea6b3671cf4a61f03427cf1 100644 (file)
@@ -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 (file)
index 0000000..3c05e0a
--- /dev/null
@@ -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 (file)
index 3c05e0a..0000000
+++ /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'
-