2 # Copyright (C) 2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
:=http
://www.kamailio.org
/pub
/kamailio
/$(PKG_VERSION
)/src
/
15 PKG_SOURCE
:=kamailio-
$(PKG_VERSION
)$(PKG_VARIANT
)_src.
tar.gz
16 PKG_MD5SUM
:=c2bccebd88156bf02957468e36dda648
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_MAINTAINER
:=Jiri Slachta
<slachta@cesnet.cz
>
26 include $(INCLUDE_DIR
)/nls.mk
27 include $(INCLUDE_DIR
)/package.mk
29 TARGET_CFLAGS
+= $(FPIC
)
30 PREBUILT_STAMP
=$(STAGING_DIR
)/stamp
/.
$(PKG_NAME
)_prebuilt
31 TAR_CMD
:=$(HOST_TAR
) -C
$(PKG_BUILD_DIR
) --strip-components
1 $(TAR_OPTIONS
)
33 define Package
/kamailio4
/Default
37 URL
:=http
://www.kamailio.org
/
38 DEPENDS
:=$(ICONV_DEPENDS
) +libncurses
+libpthread
+libreadline
+libxml2
41 define Package
/kamailio4
42 $(call Package
/kamailio4
/Default
)
43 TITLE
:=Mature and flexible open source SIP server
, v
$(PKG_VERSION
)
47 define Package
/kamailio4
/conffiles
49 /etc
/kamailio
/kamailio.cfg
50 /etc
/kamailio
/kamailio-advanced.cfg
51 /etc
/kamailio
/dictionary.kamailio
52 /etc
/kamailio
/kamctlrc
55 define Package
/kamailio4
/install
56 $(INSTALL_DIR
) $(1)/usr
/sbin
58 $(PKG_INSTALL_DIR
)/usr
/sbin
/kam
{ailio
,cmd
,ctl
,dbctl
} \
60 $(INSTALL_DIR
) $(1)/usr
/lib
/kamailio
/modules
62 $(PKG_INSTALL_DIR
)/usr
/lib
/kamailio
/lib
*.so
* \
63 $(1)/usr
/lib
/kamailio
/
64 $(INSTALL_DIR
) $(1)/etc
/kamailio
66 $(PKG_INSTALL_DIR
)/etc
/kamailio
/{dictionary.kamailio
,kamailio-advanced.cfg
,kamailio.cfg
,kamctlrc
} \
68 $(INSTALL_DIR
) $(1)/etc
/default
70 .
/files
/kamailio.default \
71 $(1)/etc
/default
/kamailio
72 $(INSTALL_DIR
) $(1)/etc
/init.d
74 .
/files
/kamailio.init \
75 $(1)/etc
/init.d
/kamailio
76 $(INSTALL_DIR
) $(1)/usr
/lib
/kamailio
78 $(PKG_INSTALL_DIR
)/usr
/lib
/kamailio
/kamctl \
79 $(1)/usr
/lib
/kamailio
/
82 define Package
/kamailio4
/install/dbfiles
83 $(INSTALL_DIR
) $(1)/usr
/share
/kamailio
/$(2)
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/kamailio
/$(2)/* $(1)/usr
/share
/kamailio
/$(2)/
87 define Package
/kamailio4
/install/module
88 $(INSTALL_DIR
) $(1)/usr
/lib
/kamailio
/modules
89 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/kamailio
/modules
/*$(2).so
* $(1)/usr
/lib
/kamailio
/modules
/
92 define BuildKamailio4Module
93 define Package
/kamailio4-mod-
$(subst _
,-,$(1))
94 $$(call Package
/kamailio4
/Default
)
95 TITLE
:= kamailio4
$(2) module
96 DEPENDS
:=kamailio4
$(4)
99 define Package
/kamailio4-mod-
$(subst _
,-,$(1))/description
100 This package provides support for
$(3) in Kamailio.
103 define Package
/kamailio4-mod-
$(subst _
,-,$(1))/install
104 $(call Package
/kamailio4
/install/module
,$$(1),$(1))
105 $(foreach d
,$(5),$(call Package
/kamailio4
/install/dbfiles
,$$(1),$(d
));)
109 KAM_MODULES
+=kamailio4-mod-
$(subst _
,-,$(1))
112 ################################
113 # Kamailio module parameters
117 # 3 - Module description
119 # 5 - Kamailio DB files
120 ################################
122 $(eval
$(call BuildKamailio4Module
,acc
,Accounting
,,+kamailio4-mod-tm
))
123 $(eval
$(call BuildKamailio4Module
,alias_db
,Database-backend aliases
,,+kamailio4-mod-db-sqlite
))
124 $(eval
$(call BuildKamailio4Module
,auth
,Authentication Framework
,,))
125 $(eval
$(call BuildKamailio4Module
,auth_db
,Database-backend authentication
,,+kamailio4-mod-auth
+kamailio4-mod-db-sqlite
))
126 $(eval
$(call BuildKamailio4Module
,auth_diameter
,Diameter-backend authentication
,,+kamailio4-mod-sl
))
127 $(eval
$(call BuildKamailio4Module
,avpops
,AVP operation
,,))
128 $(eval
$(call BuildKamailio4Module
,benchmark
,Config benchmark
,,))
129 $(eval
$(call BuildKamailio4Module
,cfgutils
,Config utilities
,,))
130 $(eval
$(call BuildKamailio4Module
,cfg_db
,Load core and module parameters from database
,,+kamailio4-mod-db-sqlite
))
131 $(eval
$(call BuildKamailio4Module
,cfg_rpc
,Update core and module parameters at runtime via RPC interface
,,))
132 $(eval
$(call BuildKamailio4Module
,cnxcc
,Limit call duration
,,+kamailio4-mod-dialog
))
133 $(eval
$(call BuildKamailio4Module
,corex
,Legacy functions
,,))
134 $(eval
$(call BuildKamailio4Module
,ctl
,BINRPC transport interface
,,))
135 $(eval
$(call BuildKamailio4Module
,db_flatstore
,Fast writing-only text database-backed
,,))
136 $(eval
$(call BuildKamailio4Module
,db_mysql
,MySQL database-backend
,,+libmysqlclient
,mysql
))
137 $(eval
$(call BuildKamailio4Module
,db_postgres
,PostgreSQL Database-backend
,,+libpq
,postgres
))
138 $(eval
$(call BuildKamailio4Module
,db_sqlite
,Sqlite DB support
,,+libsqlite3
,db_sqlite
))
139 $(eval
$(call BuildKamailio4Module
,db_text
,Text database-backend
,,,dbtext
/kamailio
))
140 $(eval
$(call BuildKamailio4Module
,db_unixodbc
,UnixODBC Database-backend
,,+unixodbc
))
141 $(eval
$(call BuildKamailio4Module
,dialog
,Dialog support
,,+kamailio4-mod-rr
+kamailio4-mod-tm
))
142 $(eval
$(call BuildKamailio4Module
,dialog_ng
,Dialog support
,,+kamailio4-mod-rr
+kamailio4-mod-tm
))
143 $(eval
$(call BuildKamailio4Module
,dialplan
,Dialplan management
,,))
144 $(eval
$(call BuildKamailio4Module
,dispatcher
,Dispatcher
,,))
145 $(eval
$(call BuildKamailio4Module
,diversion
,Diversion header insertion
,,))
146 $(eval
$(call BuildKamailio4Module
,domain
,Multi-domain support
,,))
147 $(eval
$(call BuildKamailio4Module
,domainpolicy
,Domain policy
,,))
148 $(eval
$(call BuildKamailio4Module
,enum
,ENUM lookup
,,))
149 $(eval
$(call BuildKamailio4Module
,exec
,External exec
,,))
150 $(eval
$(call BuildKamailio4Module
,group
,Database-backend user-groups
,,))
151 $(eval
$(call BuildKamailio4Module
,h350
,H
.350,,+kamailio4-mod-ldap
+libopenldap
))
152 $(eval
$(call BuildKamailio4Module
,htable
,Hash Table
,,))
153 $(eval
$(call BuildKamailio4Module
,imc
,IM conferencing
,,+kamailio4-mod-db-mysql
+kamailio4-mod-tm
))
154 $(eval
$(call BuildKamailio4Module
,ipops
,IP and IPv6 operations
,,))
155 $(eval
$(call BuildKamailio4Module
,json
,Access to JSON document attributes
,,+libjson
))
156 $(eval
$(call BuildKamailio4Module
,kex
,Core extensions
,,))
157 $(eval
$(call BuildKamailio4Module
,lcr
,Least Cost Routing
,,+kamailio4-mod-tm
+libpcre
))
158 $(eval
$(call BuildKamailio4Module
,ldap
,LDAP connector
,,+libopenldap
))
159 $(eval
$(call BuildKamailio4Module
,maxfwd
,Max-Forward processor
,,))
160 $(eval
$(call BuildKamailio4Module
,mediaproxy
,Automatic NAT traversal
,,+kamailio4-mod-dialog
))
161 $(eval
$(call BuildKamailio4Module
,mi_datagram
,Datagram support for Management Interface
,,))
162 $(eval
$(call BuildKamailio4Module
,mi_fifo
,FIFO support for Management Interface
,,))
163 $(eval
$(call BuildKamailio4Module
,mi_rpc
,RPC support for Management Interface
,,))
164 $(eval
$(call BuildKamailio4Module
,msilo
,SIP message silo
,,+kamailio4-mod-tm
))
165 $(eval
$(call BuildKamailio4Module
,msrp
,MSRP routing engine
,,+kamailio4-mod-tls
))
166 $(eval
$(call BuildKamailio4Module
,nathelper
,NAT helper
,,+kamailio4-mod-usrloc
))
167 $(eval
$(call BuildKamailio4Module
,nat_traversal
,NAT traversal
,,+kamailio4-mod-dialog
+kamailio4-mod-sl
+kamailio4-mod-tm
))
168 $(eval
$(call BuildKamailio4Module
,path
,SIP path insertion
,,+kamailio4-mod-rr
))
169 $(eval
$(call BuildKamailio4Module
,pdt
,Prefix-to-Domain translator
,,))
170 $(eval
$(call BuildKamailio4Module
,permissions
,Permissions control
,,))
171 $(eval
$(call BuildKamailio4Module
,pike
,Flood detector
,,))
172 $(eval
$(call BuildKamailio4Module
,presence
,Presence server
,,+kamailio4-mod-sl
+kamailio4-mod-tm
+libxml2
))
173 $(eval
$(call BuildKamailio4Module
,presence_dialoginfo
,Dialog Event presence
,,+kamailio4-mod-presence
))
174 $(eval
$(call BuildKamailio4Module
,presence_mwi
,Message Waiting Indication presence
,,+kamailio4-mod-presence
))
175 $(eval
$(call BuildKamailio4Module
,presence_xml
,XCAP presence
,,+kamailio4-mod-presence
+kamailio4-mod-xcap-client
))
176 $(eval
$(call BuildKamailio4Module
,pua
,Presence User Agent
,,+kamailio4-mod-tm
+libxml2
))
177 $(eval
$(call BuildKamailio4Module
,pua_bla
,Bridged Line Appearence PUA
,,+kamailio4-mod-presence
+kamailio4-mod-pua
+kamailio4-mod-usrloc
))
178 $(eval
$(call BuildKamailio4Module
,pua_dialoginfo
,Dialog Event PUA
,,+kamailio4-mod-dialog
+kamailio4-mod-pua
))
179 $(eval
$(call BuildKamailio4Module
,pua_mi
,PUA Management Interface
,,+kamailio4-mod-pua
))
180 $(eval
$(call BuildKamailio4Module
,pua_usrloc
,PUA User Location
,,+kamailio4-mod-pua
+kamailio4-mod-usrloc
))
181 $(eval
$(call BuildKamailio4Module
,pua_xmpp
,PUA XMPP
,,+kamailio4-mod-presence
+kamailio4-mod-pua
+kamailio4-mod-xmpp
))
182 $(eval
$(call BuildKamailio4Module
,pv
,Pseudo-Variables
,,))
183 $(eval
$(call BuildKamailio4Module
,qos
,QoS control
,,+kamailio4-mod-dialog
))
184 $(eval
$(call BuildKamailio4Module
,ratelimit
,Traffic shapping
,,))
185 $(eval
$(call BuildKamailio4Module
,regex
,Regular Expression
,,+libpcre
))
186 $(eval
$(call BuildKamailio4Module
,registrar
,SIP Registrar
,,+kamailio4-mod-usrloc
))
187 $(eval
$(call BuildKamailio4Module
,rls
,Resource List Server
,,+kamailio4-mod-presence
+kamailio4-mod-pua
+kamailio4-mod-tm
+libxml2
))
188 $(eval
$(call BuildKamailio4Module
,rr
,Record-Route and Route
,,))
189 $(eval
$(call BuildKamailio4Module
,rtimer
,Routing Timer
,,))
190 $(eval
$(call BuildKamailio4Module
,rtpengine
,RTP engine
,,+kamailio4-mod-tm
))
191 $(eval
$(call BuildKamailio4Module
,rtpproxy
,RTP proxy
,,+kamailio4-mod-tm
))
192 $(eval
$(call BuildKamailio4Module
,sanity
,SIP sanity checks
,,+kamailio4-mod-sl
))
193 $(eval
$(call BuildKamailio4Module
,sipcapture
,SIP capture
,,))
194 $(eval
$(call BuildKamailio4Module
,siptrace
,SIP trace
,,))
195 $(eval
$(call BuildKamailio4Module
,siputils
,SIP utilities
,,+kamailio4-mod-sl
))
196 $(eval
$(call BuildKamailio4Module
,sl
,Stateless replier
,,))
197 $(eval
$(call BuildKamailio4Module
,sms
,SIP-to-SMS IM gateway
,,+kamailio4-mod-tm
))
198 $(eval
$(call BuildKamailio4Module
,speeddial
,Per-user speed-dial controller
,,))
199 $(eval
$(call BuildKamailio4Module
,sqlops
,SQL operations
,,))
200 $(eval
$(call BuildKamailio4Module
,statistics
,Script statistics
,,))
201 $(eval
$(call BuildKamailio4Module
,stun
,STUN server support
,,))
202 $(eval
$(call BuildKamailio4Module
,sst
,SIP Session Timer
,,+kamailio4-mod-dialog
+kamailio4-mod-sl
))
203 $(eval
$(call BuildKamailio4Module
,textops
,Text operations
,,))
204 $(eval
$(call BuildKamailio4Module
,tls
,TLS operations
,,+libopenssl
))
205 $(eval
$(call BuildKamailio4Module
,topoh
,Topology hiding
,,+kamailio4-mod-rr
))
206 $(eval
$(call BuildKamailio4Module
,tm
,Transaction
,,))
207 $(eval
$(call BuildKamailio4Module
,tmx
,Transaction module extensions
,,))
208 $(eval
$(call BuildKamailio4Module
,uac
,User Agent Client
,,+kamailio4-mod-tm
))
209 $(eval
$(call BuildKamailio4Module
,uac_redirect
,User Agent Client redirection
,,+kamailio4-mod-tm
))
210 $(eval
$(call BuildKamailio4Module
,uri_db
,Database-backend SIP URI checking
,,))
211 $(eval
$(call BuildKamailio4Module
,userblacklist
,User blacklists
,,))
212 $(eval
$(call BuildKamailio4Module
,usrloc
,User location
,,))
213 $(eval
$(call BuildKamailio4Module
,utils
,Misc utilities
,,+libcurl
+libxml2
))
214 $(eval
$(call BuildKamailio4Module
,xcap_client
,XCAP Client
,,+libcurl
))
215 $(eval
$(call BuildKamailio4Module
,xlog
,Advanced logger
,,))
216 $(eval
$(call BuildKamailio4Module
,xmpp
,SIP-to-XMPP Gateway
,,+kamailio4-mod-tm
+libexpat
))
220 cfg_dir
=/etc
/kamailio
/ \
222 data_dir
=/usr
/share
/kamailio
/ \
223 lib_dir
=/usr
/lib
/kamailio
/ \
224 modules_dir
=/usr
/lib
/kamailio
/ \
225 include_modules
="$(INCL_MODULES)" \
226 cfg_target
:=/etc
/kamailio
/ \
228 extra_defs
="-DUSE_PTHREAD_MUTEX " \
229 CFLAGS
="$(TARGET_CFLAGS)" \
230 LOCALBASE
="$(STAGING_DIR)/usr" \
231 SYSBASE
="$(STAGING_DIR)/usr" \
232 PCREDEFS
:="$(TARGET_CPPFLAGS)" \
233 PCRELIBS
:="$(TARGET_LDFLAGS)" \
234 CROSS_COMPILE
=$(TARGET_CROSS
) \
237 DESTDIR
=$(PKG_INSTALL_DIR
) \
241 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(PKG_MAKE_ARGS
) \
242 EXTRA_LIBS
=-L
$(STAGING_DIR
)/usr
/lib
/ \
244 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(PKG_MAKE_ARGS
) \
248 $(eval
$(call BuildPackage
,kamailio4
))
249 $(foreach m
,$(KAM_MODULES
),$(eval
$(call BuildPackage
,$(m
))))