Merge pull request #253 from neheb/patch-1
[feed/telephony.git] / net / yate / Makefile
1 #
2 # Copyright (C) 2006-2018 OpenWrt.org
3 # Copyright (C) 2006-2011 SMBPhone
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 RELEASEVER:=6.0.0
12
13 PKG_NAME:=yate
14 PKG_VERSION:=$(RELEASEVER)-1
15 PKG_RELEASE:=4
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_SOURCE_URL:=http://yate.null.ro/tarballs/yate6/
19 PKG_HASH:=0ab76015651db8076031277b2003c23bd5d9eb940491801f30a6dc3c226c1817
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
21
22 PKG_LICENSE:=GPL-2.0
23 PKG_LICENSE_FILES:=COPYING
24 PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
25
26 PKG_FIXUP:=autoreconf
27
28 PKG_INSTALL:=1
29
30 # Yate currently does not compile with FORTIFY_SOURCE enabled
31 PKG_FORTIFY_SOURCE:=0
32
33 include $(INCLUDE_DIR)/package.mk
34
35 define Package/$(PKG_NAME)/Default
36 SUBMENU:=Telephony
37 SECTION:=net
38 CATEGORY:=Network
39 URL:=http://yate.null.ro/
40 endef
41
42 define Package/$(PKG_NAME)
43 $(call Package/yate/Default)
44 DEPENDS:=+libpthread +libstdcpp
45 TITLE:=Yet Another Telephony Engine
46 MENU:=1
47 endef
48
49 define Package/$(PKG_NAME)/conffiles
50 /etc/yate/yate.conf
51 /etc/init.d/yate
52 endef
53
54 define Package/$(PKG_NAME)/Default/description
55 Is a next-generation telephony engine focused on the VoIP and PSTN. It does
56 SIP, H.323, IAX, PSTN, and more.
57 endef
58
59 define Package/$(PKG_NAME)-scripts-perl
60 $(call Package/yate/Default)
61 DEPENDS += $(PKG_NAME) \
62 +PACKAGE_$(PKG_NAME)-scripts-perl:$(PKG_NAME)-mod-extmodule \
63 +PACKAGE_$(PKG_NAME)-scripts-perl:perlbase-data \
64 @!arc
65 TITLE:= Perl module for Yate
66 endef
67
68 define Package/$(PKG_NAME)-sounds
69 $(call Package/yate/Default)
70 DEPENDS += $(PKG_NAME)
71 TITLE := Sounds for Yate
72 endef
73
74 define Package/$(PKG_NAME)-collection-basic
75 $(call Package/yate/Default)
76 DEPENDS += $(PKG_NAME) \
77 +PACKAGE_$(PKG_NAME)-collection-basic:$(PKG_NAME)-sounds \
78 +PACKAGE_$(PKG_NAME)-collection-basic:$(PKG_NAME)-mod-dumbchan \
79 +PACKAGE_$(PKG_NAME)-collection-basic:$(PKG_NAME)-mod-regfile \
80 +PACKAGE_$(PKG_NAME)-collection-basic:$(PKG_NAME)-mod-regexroute \
81 +PACKAGE_$(PKG_NAME)-collection-basic:$(PKG_NAME)-mod-rmanager \
82 +PACKAGE_$(PKG_NAME)-collection-basic:$(PKG_NAME)-mod-tonegen \
83 +PACKAGE_$(PKG_NAME)-collection-basic:$(PKG_NAME)-mod-yrtpchan \
84 +PACKAGE_$(PKG_NAME)-collection-basic:$(PKG_NAME)-mod-ysipchan
85 TITLE := Basic Yate Server
86 endef
87
88 # Otherwise yate ignores CPPFLAGS
89 TARGET_CFLAGS += $(TARGET_CPPFLAGS)
90
91 CONFIGURE_ARGS+= \
92 $(if $(CONFIG_x86_64),--enable-sse2) \
93 --disable-sctp \
94 --disable-dahdi \
95 --disable-zaptel \
96 --disable-wpcard \
97 --disable-tdmcard \
98 --disable-wanpipe \
99 --enable-ilbc \
100 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-ilbcwebrtc),--enable-ilbc-webrtc,--disable-ilbc-webrtc) \
101 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-pgsqldb),--with-libpq="$(STAGING_DIR)/usr",--without-libpq) \
102 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-mysqldb),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \
103 --without-wphwec \
104 --without-libgsm \
105 --without-amrnb \
106 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-faxchan),--with-spandsp="$(STAGING_DIR)/usr/include",--without-spandsp) \
107 --without-pwlib \
108 --without-openh323 \
109 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-openssl),--with-openssl,--without-openssl) \
110 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-zlibcompress),--with-zlib="$(STAGING_DIR)/usr",--without-zlib) \
111 --without-libqt4 \
112 --without-qtstatic \
113 --without-coredumper \
114 --without-doxygen \
115 --without-kdoc
116
117 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-isaccodec),)
118 CONFIGURE_ARGS+=$(if $(CONFIG_SOFT_FLOAT),--disable-isac-float --enable-isac-fixed,--disable-isac-fixed --enable-isac-float)
119 else
120 CONFIGURE_ARGS+= \
121 --disable-isac-fixed \
122 --disable-isac-float
123 endif
124
125 define Package/$(PKG_NAME)/install
126 $(INSTALL_DIR) $(1)/usr/lib
127
128 for yatelib in "" asn sig mgcp jabber script; do \
129 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libyate$$$${yatelib}.so.$(RELEASEVER) $(1)/usr/lib ;\
130 $(LN) ./libyate$$$${yatelib}.so.$(RELEASEVER) $(1)/usr/lib/libyate$$$${yatelib}.so ;\
131 done
132
133 $(INSTALL_DIR) $(1)/usr/bin
134 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yate $(1)/usr/bin/
135 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
136 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/yate/yate.conf $(1)/etc/$(PKG_NAME)/yate.conf
137 $(INSTALL_DIR) $(1)/etc/init.d
138 $(INSTALL_BIN) ./files/yate.init $(1)/etc/init.d/yate
139 endef
140
141 define Package/$(PKG_NAME)-scripts-perl/install
142 $(INSTALL_DIR) $(1)/usr/share/yate/scripts
143 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/yate/scripts/Yate.pm $(1)/usr/share/yate/scripts/
144 $(INSTALL_BIN) ./files/banbrutes.pl $(1)/usr/share/yate/scripts/
145 endef
146
147 define Package/$(PKG_NAME)-sounds/install
148 $(INSTALL_DIR) $(1)/usr/share/yate/sounds
149 $(CP) $(PKG_INSTALL_DIR)/usr/share/yate/sounds/ $(1)/usr/share/yate/
150 endef
151
152 define Package/$(PKG_NAME)-collection-basic/install
153 endef
154
155 define Build/InstallDev
156 $(INSTALL_DIR) $(STAGING_DIR)/usr/include
157 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include/
158 $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
159 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(STAGING_DIR)/usr/lib/
160 endef
161
162 define BuildPlugin
163 define Package/$(PKG_NAME)-mod-$(1)
164 $(call Package/yate/Default)
165 DEPENDS:= $(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-mod-$(1):%,$(4))
166 TITLE:=$(3)
167 endef
168
169 define Package/$(PKG_NAME)-mod-$(1)/conffiles
170 $(if $(6),/etc/yate/$(1).conf)
171 endef
172
173 define Package/$(PKG_NAME)-mod-$(1)/description
174 $(3) module for $(PKG_NAME)
175 endef
176
177 define Package/$(PKG_NAME)-mod-$(1)/install
178 $$(INSTALL_DIR) $$(1)/usr/lib/yate/$(2)
179 $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/lib/yate/$(2)/$(1).yate $$(1)/usr/lib/yate/$(2)/$(1).yate
180 if [ -f $$(PKG_INSTALL_DIR)/etc/yate/$(1).conf ]; then \
181 $$(INSTALL_DIR) $$(1)/etc/yate ;\
182 $$(INSTALL_DATA) $$(PKG_INSTALL_DIR)/etc/yate/$(1).conf $$(1)/etc/yate/ ;\
183 fi
184 $(if $(5),$(foreach extra_file,$(5),\
185 $(INSTALL_DIR) $$(1)$(dir $(extra_file)) ; \
186 $(CP) $(PKG_INSTALL_DIR)$(extra_file) $$(1)$(extra_file) ; \
187 ),)
188 endef
189
190 $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
191 endef
192
193 $(eval $(call BuildPackage,$(PKG_NAME)))
194 $(eval $(call BuildPackage,$(PKG_NAME)-collection-basic))
195 $(eval $(call BuildPackage,$(PKG_NAME)-scripts-perl))
196 $(eval $(call BuildPackage,$(PKG_NAME)-sounds))
197
198 ############################
199 # 1: plugin
200 # 2: client, server or empty
201 # 3: description
202 # 4: depends
203 # 5: extra files
204 # 6: has a config sample (y)
205 # ##########################
206 $(eval $(call BuildPlugin,accfile,server,SIP or H.323 client (from file),,,y))
207 $(eval $(call BuildPlugin,alsachan,client,ALSA Sound Channel,+alsa-lib))
208 $(eval $(call BuildPlugin,amrnbcodec,,AMR-NB Codec,@BROKEN)) # Missing amr-nb library
209 $(eval $(call BuildPlugin,analog,server,Analog (e.g. POTS) Channel,,,y))
210 $(eval $(call BuildPlugin,analogdetect,server,Analog Data Detector,))
211 $(eval $(call BuildPlugin,analyzer,,Test Call Generator and AQ Analyzer,))
212 $(eval $(call BuildPlugin,cache,server,CNAM and LNP memory caches,,,y))
213 $(eval $(call BuildPlugin,callcounters,server,Count Active Call Legs,,,y))
214 $(eval $(call BuildPlugin,callfork,,Call Forker,,,y))
215 $(eval $(call BuildPlugin,callgen,,Call Generator,))
216 $(eval $(call BuildPlugin,camel_map,sig,MAP/CAMEL TCAP <-> XML translators,,,y))
217 $(eval $(call BuildPlugin,ccongestion,server,Accept Status from Installed Engine Monitors,,,y))
218 $(eval $(call BuildPlugin,cdrbuild,,Call Detail Record Builder,,,y))
219 $(eval $(call BuildPlugin,cdrcombine,,Call Detail Records per call instead of per call leg,))
220 $(eval $(call BuildPlugin,cdrfile,,Call Detail Record to File,,,y))
221 $(eval $(call BuildPlugin,ciscosm,server,SS7 Support,,,y))
222 $(eval $(call BuildPlugin,clustering,server,Clustering Server Support,,,y))
223 $(eval $(call BuildPlugin,conference,,Conference Room Mixer,))
224 $(eval $(call BuildPlugin,cpuload,server,Monitor CPU load and Inform Yate,,,y))
225 $(eval $(call BuildPlugin,dbpbx,server,PBX IVR and Multi-routing from Database,,,y))
226 $(eval $(call BuildPlugin,dbwave,server,Wav Media for DB Storage,+$(PKG_NAME)-mod-wavefile))
227 $(eval $(call BuildPlugin,dumbchan,,Dummy Channel,))
228 $(eval $(call BuildPlugin,enumroute,,ENUM Routing,,,y))
229 $(eval $(call BuildPlugin,eventlogs,server,Write events and alarms to log files,,,y))
230 $(eval $(call BuildPlugin,extmodule,,External Module Handler,,/usr/share/yate/scripts/echo.sh,y))
231 $(eval $(call BuildPlugin,faxchan,,Spandsp Fax Channel,+libspandsp))
232 $(eval $(call BuildPlugin,fileinfo,,File Info Holder,,,y))
233 $(eval $(call BuildPlugin,filetransfer,,File Transfer Driver,,,y))
234 $(eval $(call BuildPlugin,gvoice,,Google Voice support,,,y))
235 $(eval $(call BuildPlugin,heartbeat,server,Linux-HA compatible heartbeat,,,y))
236 $(eval $(call BuildPlugin,ilbccodec,,iLBC Codec,))
237 $(eval $(call BuildPlugin,ilbcwebrtc,,iLBC Codec from the WebRTC project,))
238 $(eval $(call BuildPlugin,isaccodec,,internet Speech Audio Codec,))
239 $(eval $(call BuildPlugin,isupmangler,sig,ISUP parameter mangling in a STP,,,y))
240 $(eval $(call BuildPlugin,jabberclient,client,Jabber Client,,,y))
241 $(eval $(call BuildPlugin,jabberserver,jabber,Jabber Server,,,y))
242 $(eval $(call BuildPlugin,javascript,,Routing using the embedded Javascript language,,,y))
243 $(eval $(call BuildPlugin,jbfeatures,jabber,Jabber Server Features,,,y))
244 $(eval $(call BuildPlugin,lateroute,server,Last Chance Routing,,,y))
245 $(eval $(call BuildPlugin,mgcpca,server,Media Gateway Control Protocol Agent,,,y))
246 $(eval $(call BuildPlugin,mgcpgw,server,Media Gateway Control Protocol Gateway,,,y))
247 $(eval $(call BuildPlugin,moh,,On Hold (music) Generator,,,y))
248 $(eval $(call BuildPlugin,monitoring,server,Monitoring/gathering Information,,,y))
249 $(eval $(call BuildPlugin,mrcpspeech,server,MRCP v2 Voice/Tone Detector and Synthesizer,))
250 $(eval $(call BuildPlugin,msgsniff,,Sample Message Sniffer,))
251 $(eval $(call BuildPlugin,mux,,Data Multiplexor,,,y))
252 $(eval $(call BuildPlugin,mysqldb,server,MySQL Backend DB,+libmysqlclient-r,,y))
253 $(eval $(call BuildPlugin,openssl,,Encrypted transport (OpenSSL),+libopenssl,,y))
254 $(eval $(call BuildPlugin,osschan,client,OSS Sound Channel,))
255 $(eval $(call BuildPlugin,park,server,Call Parking,))
256 $(eval $(call BuildPlugin,pbx,,PBX Message Handlers,))
257 $(eval $(call BuildPlugin,pbxassist,server,Full featured PBX and IVR,,,y))
258 $(eval $(call BuildPlugin,pgsqldb,server,PostgrestSQL Backend DB,@!arc +libpq))
259 $(eval $(call BuildPlugin,presence,server,Presence,,,y))
260 $(eval $(call BuildPlugin,queues,server,Call Distribution and Queues from Database,,,y))
261 $(eval $(call BuildPlugin,queuesnotify,server,Notify when queued call status changes,,,y))
262 $(eval $(call BuildPlugin,regexroute,,Regular Expression Based Routing,,,y))
263 $(eval $(call BuildPlugin,regfile,server,Registration based on users in file,,,y))
264 $(eval $(call BuildPlugin,register,server,Call Detail Record to a database,,,y))
265 $(eval $(call BuildPlugin,rmanager,,Yate Remote Management,,,y))
266 $(eval $(call BuildPlugin,sigtransport,server,SIGTRAN (SS7 over IP) connection provider,,,y))
267 $(eval $(call BuildPlugin,sip_cnam_lnp,sip,Query CNAM and LNP databases using SIP INVITE,,,y))
268 $(eval $(call BuildPlugin,sipfeatures,server,SIP Features (SUBSCRIBE/NOTIFY),,,y))
269 $(eval $(call BuildPlugin,sqlitedb,server,SQLite Support,+libsqlite3,,y))
270 $(eval $(call BuildPlugin,ss7_lnp_ansi,sig,Query LNP Databases,,,y))
271 $(eval $(call BuildPlugin,subscription,server,Subcription handler and presence notifier,,,y))
272 $(eval $(call BuildPlugin,tdmcard,server,TDM Cards Signalling and Data Driver,@BROKEN)) # Missing TDM libraries
273 $(eval $(call BuildPlugin,tonedetect,,Detectors for Various Tones,))
274 $(eval $(call BuildPlugin,tonegen,,Tones Generator,,,y))
275 $(eval $(call BuildPlugin,users,server,Users,,,y))
276 $(eval $(call BuildPlugin,wavefile,,Wav file Record and Playback,))
277 $(eval $(call BuildPlugin,wpcard,server,Wanpipe PRI cards Signalling and Data Driver,@BROKEN)) # Mising wanpipe and PRI libraries
278 $(eval $(call BuildPlugin,yiaxchan,,IAX Channel,,,y))
279 $(eval $(call BuildPlugin,yjinglechan,,Jingle Channel,,,y))
280 $(eval $(call BuildPlugin,yradius,server,RADIUS Client,,,y))
281 $(eval $(call BuildPlugin,yrtpchan,,RTP Channel and Other Data Helper,,,y))
282 $(eval $(call BuildPlugin,ysigchan,server,SS7/ISDN Protocols - Yate Signalling Library,,,y))
283 $(eval $(call BuildPlugin,ysipchan,,SIP Channel,,,y))
284 $(eval $(call BuildPlugin,ysnmpagent,server,SNMP Protocol Agent,,/usr/share/yate/data/NULL-TEAM-MIB.txt /usr/share/yate/data/snmp_mib.conf /usr/share/yate/data/YATE-MIB.txt,y))
285 $(eval $(call BuildPlugin,ysockschan,,SOCKS Channel,,,y))
286 $(eval $(call BuildPlugin,ystunchan,,STUN Support,,,y))
287 $(eval $(call BuildPlugin,zlibcompress,,Zlib Compression,+zlib,,y))
288