treewide: replace AUTORELEASE with real PKG_RELEASE
[feed/telephony.git] / net / asterisk-opus / Makefile
1 #
2 # Copyright (C) 2018 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=asterisk-opus
11 PKG_RELEASE:=2
12
13 PKG_SOURCE_URL:=https://github.com/traud/asterisk-opus.git
14 PKG_SOURCE_DATE:=2021-11-01
15 PKG_SOURCE_VERSION:=20522fbcd3fdf6f0adb20602d096d14cd69055e8
16 PKG_MIRROR_HASH:=e14dc42b0e5f4720e3f028e0b426f4e660bf315a103a015820ca3697e1fe9985
17 PKG_SOURCE_PROTO:=git
18
19 PKG_LICENSE:=GPL-2.0
20 PKG_LICENSE_FILES:=LICENSE
21 PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
22
23 include $(INCLUDE_DIR)/package.mk
24
25 TARGET_CFLAGS += \
26 $(FPIC)
27
28 define Package/asterisk-opus/Default
29 SUBMENU:=Telephony
30 SECTION:=net
31 CATEGORY:=Network
32 URL:=https://github.com/traud/asterisk-opus
33 DEPENDS:=asterisk +libopus
34 endef
35
36 define Package/asterisk-codec-opus
37 $(call Package/asterisk-opus/Default)
38 TITLE:=Opus codec support
39 endef
40
41 define Package/asterisk-codec-opus/description
42 Opus is the default audio codec in WebRTC. WebRTC is available in
43 Asterisk via SIP over WebSockets (WSS). Nevertheless, Opus can be used
44 for other transports (UDP, TCP, TLS) as well. Opus supersedes previous
45 codecs like CELT and SiLK. Furthermore, in favor of Opus, other
46 open-source audio codecs are no longer developed, like Speex, iSAC,
47 iLBC, and Siren. If you use your Asterisk as a back-to-back user agent
48 (B2BUA) and you transcode between various audio codecs, one should
49 enable Opus for future compatibility.
50
51 Opus is not only supported for pass-through but can be transcoded as
52 well.
53 endef
54
55 define Package/asterisk-codec-opus/install
56 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/codecs/codec_opus_open_source.so \
58 $(1)/usr/lib/asterisk/modules
59 endef
60
61 define Package/asterisk-format-ogg-opus
62 $(call Package/asterisk-opus/Default)
63 TITLE:=OGG/Opus audio support
64 DEPENDS+=+libopusfile +libopusenc
65 endef
66
67 define Package/asterisk-format-ogg-opus/description
68 Reading and writing audio files in the OGG/Opus format.
69 endef
70
71 define Package/asterisk-format-ogg-opus/install
72 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
73 $(INSTALL_BIN) $(PKG_BUILD_DIR)/formats/format_ogg_opus_open_source.so \
74 $(1)/usr/lib/asterisk/modules
75 endef
76
77 define Build/Configure
78 endef
79
80 $(eval $(call BuildPackage,asterisk-codec-opus))
81 $(eval $(call BuildPackage,asterisk-format-ogg-opus))