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