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