treewide: refresh hashes after move to use ZSTD as default
[feed/telephony.git] / net / siproxd / Makefile
1 #
2 # Copyright (C) 2014-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:=siproxd
11 PKG_RELEASE:=2
12
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL:=https://github.com/hb9xar/siproxd.git
15 PKG_SOURCE_DATE:=2022-02-18
16 PKG_SOURCE_VERSION:=4750bea4ffedb4543a404dafc979c2b16b53e523
17 PKG_MIRROR_HASH:=9b2fa84b4c05d68f758a35070af970c852ff4cb8beea3d7f93663b10a17e1df8
18
19 PKG_FIXUP:=autoreconf
20 PKG_INSTALL:=1
21 PKG_BUILD_PARALLEL:=1
22
23 PKG_CONFIG_DEPENDS:=CONFIG_SIPROXD_MAX_CLIENTS
24
25 PKG_LICENSE:=GPL-2.0+
26 PKG_LICENSE_FILES:=COPYING
27 PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
28
29 include $(INCLUDE_DIR)/package.mk
30
31 define Package/siproxd/Default
32 SECTION:=net
33 CATEGORY:=Network
34 SUBMENU:=Telephony
35 URL:=http://siproxd.sourceforge.net/
36 endef
37
38 define Package/siproxd
39 $(call Package/siproxd/Default)
40 DEPENDS:=+libltdl +libpthread +libosip2
41 TITLE:=SIP (Session Initiation Protocol) proxy
42 MENU:=1
43 endef
44
45 define Package/siproxd/description
46 Siproxd is a proxy/masquerading daemon for the SIP protocol. Refer to https://openwrt.org/docs/guide-user/services/voip/siproxd for configuration details and examples.
47 endef
48
49 define Package/siproxd/conffiles
50 /etc/config/siproxd
51 endef
52
53 define Package/siproxd/config
54 config SIPROXD_MAX_CLIENTS
55 int "Max supported clients"
56 default 32
57 depends on PACKAGE_siproxd
58 help
59 Default 32 is sufficient for home environments. Larger values
60 consume more memory (e.g. RSS of 17 MB with upstream default 512).
61 endef
62
63 CONFIGURE_ARGS+= \
64 --enable-reproducible-build \
65 --with-libosip-prefix="$(STAGING_DIR)/usr" \
66 --without-included-ltdl \
67 --disable-doc
68
69 MAKE_FLAGS+= \
70 SUBDIRS="src scripts contrib"
71
72 TARGET_CFLAGS+= \
73 -Wno-unused-const-variable
74
75 URLMAP:=$(CONFIG_SIPROXD_MAX_CLIENTS)
76 RTPPROXY:=$(shell expr $(URLMAP) \* 2)
77
78 define Build/Configure
79 $(call Build/Configure/Default)
80 $(ESED) 's;^(#define[[:space:]]+URLMAP_SIZE).*$$$$;\1 $(URLMAP);' \
81 -e 's;^(#define[[:space:]]+RTPPROXY_SIZE).*$$$$;\1 $(RTPPROXY);' \
82 $(PKG_BUILD_DIR)/src/siproxd.h
83 endef
84
85 define Package/siproxd/install
86 $(INSTALL_DIR) $(1)/usr/sbin
87 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(1)/usr/sbin
88 $(INSTALL_DIR) $(1)/etc/config
89 $(INSTALL_CONF) ./files/siproxd.config $(1)/etc/config/siproxd
90 $(INSTALL_DIR) $(1)/etc/init.d
91 $(INSTALL_BIN) ./files/siproxd.init $(1)/etc/init.d/siproxd
92 endef
93
94 define BuildPlugin
95 define Package/siproxd-mod-$(subst _,-,$(1))
96 $$(call Package/siproxd/Default)
97 TITLE:= siproxd $(1) plugin
98 DEPENDS:=siproxd $(2)
99 endef
100
101 define Package/siproxd-mod-$(subst _,-,$(1))/install
102 $(INSTALL_DIR) $$(1)/usr/lib/siproxd
103 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/siproxd/plugin_$(1).so \
104 $$(1)/usr/lib/siproxd
105 endef
106
107 $$(eval $$(call BuildPackage,siproxd-mod-$(subst _,-,$(1))))
108 endef
109
110 $(eval $(call BuildPackage,siproxd))
111 $(eval $(call BuildPlugin,blacklist,+libsqlite3))
112 $(eval $(call BuildPlugin,codecfilter))
113 $(eval $(call BuildPlugin,defaulttarget))
114 $(eval $(call BuildPlugin,demo))
115 $(eval $(call BuildPlugin,fix_bogus_via))
116 $(eval $(call BuildPlugin,fix_DTAG))
117 $(eval $(call BuildPlugin,fix_fbox_anoncall))
118 $(eval $(call BuildPlugin,logcall))
119 $(eval $(call BuildPlugin,prefix))
120 $(eval $(call BuildPlugin,regex))
121 $(eval $(call BuildPlugin,shortdial))
122 $(eval $(call BuildPlugin,stats))
123 $(eval $(call BuildPlugin,stripheader))
124 $(eval $(call BuildPlugin,stun))
125 $(eval $(call BuildPlugin,siptrunk))