asterisk-chan-dongle: bump to latest git
[feed/telephony.git] / net / asterisk-chan-dongle / Makefile
index 2ef0c21531afd92d04f92f195722c2125b45272f..0f41d457d8a4ec444489803ca212ee923644bbef 100644 (file)
@@ -11,10 +11,10 @@ PKG_NAME:=asterisk-chan-dongle
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/wdoekes/asterisk-chan-dongle.git
-PKG_SOURCE_VERSION:=328b2b7ded3b3c59c2e6c7e7afca6b0ac6f146ce
-PKG_SOURCE_DATE=2020-05-28
+PKG_SOURCE_VERSION:=503dba87d726854b74b49e70679e64e6e86d5812
+PKG_SOURCE_DATE=2022-11-04
 PKG_RELEASE:=1
-PKG_MIRROR_HASH:=b0af444840340722ecee111a7b1f819de441acf290799ae11bc18e16569c6388
+PKG_MIRROR_HASH:=0d585c108ec18d136ce03704b96d0a6769e617c820fc74f735e3e192ad282611
 
 PKG_FIXUP:=autoreconf
 
@@ -43,8 +43,13 @@ endef
 
 CONFIGURE_ARGS+= \
        --with-asterisk=$(STAGING_DIR)/usr/include \
-       --with-astversion=18 \
-       --with-iconv=$(ICONV_PREFIX)/include
+       --with-astversion=18
+
+ifeq ($(CONFIG_BUILD_NLS),y)
+CONFIGURE_ARGS+=--with-iconv=$(ICONV_PREFIX)/include
+else
+CONFIGURE_ARGS+=--with-iconv=$(TOOLCHAIN_DIR)/include
+endif
 
 MAKE_FLAGS+=LD="$(TARGET_CC)"
 
@@ -64,4 +69,29 @@ define Package/asterisk-chan-dongle/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/chan_dongle.so $(1)$(MODULES_DIR)
 endef
 
+define Package/asterisk-chan-dongle/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+  echo
+  echo "o-------------------------------------------------------------------o"
+  echo "| asterisk-chan-dongle note                                         |"
+  echo "o-------------------------------------------------------------------o"
+  echo "| Adding the \"asterisk\" user to the \"dialout\" group might be        |"
+  echo "| required for asterisk to be able to access the dongle.            |"
+  echo "o-------------------------------------------------------------=^_^=-o"
+  echo
+fi
+exit 0
+endef
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+ifeq ($(QUILT),)
+ifeq ($(CONFIG_BUILD_NLS),y)
+       $(SED) 's/\[iconv\], \[c iconv\]/[libiconv], [iconv]/' \
+               "$(PKG_BUILD_DIR)/configure.ac"
+endif
+endif
+endef
+
 $(eval $(call BuildPackage,asterisk-chan-dongle))