samba3: remove rpc support, fix various compile errors
[openwrt/svn-archive/archive.git] / net / kamailio / Makefile
1 #
2 # Copyright (C) 2009 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:=kamailio
11 PKG_VERSION:=1.5.2
12 PKG_RELEASE:=1
13 PKG_VARIANT:=-tls
14
15 PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/1.5.2/src/
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz
17 PKG_MD5SUM:=26b0d0d3c67c2d981bee86a803cca51f
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)
20
21 PKG_BUILD_DEPENDS:=curl expat libxml2 mysql openldap openssl pcre postgresql radiusclient-ng
22
23 include $(INCLUDE_DIR)/package.mk
24
25 TARGET_CFLAGS += $(FPIC)
26
27 define Package/kamailio/Default
28 SECTION:=net
29 CATEGORY:=Network
30 URL:=http://www.kamailio.org/
31 endef
32
33
34 define Package/kamailio
35 $(call Package/kamailio/Default)
36 TITLE:=Mature and flexible open source SIP server
37 MENU:=1
38 endef
39
40 define Package/kamailio-example
41 $(call Package/kamailio/Default)
42 TITLE:=Kamailio example config
43 DEPENDS:=kamailio \
44 +kamailio-mod-acc \
45 +kamailio-mod-maxfwd \
46 +kamailio-mod-mi-fifo \
47 +kamailio-mod-pv \
48 +kamailio-mod-registrar \
49 +kamailio-mod-rr \
50 +kamailio-mod-sl \
51 +kamailio-mod-siputils \
52 +kamailio-mod-textops \
53 +kamailio-mod-tm \
54 +kamailio-mod-uri-db \
55 +kamailio-mod-usrloc \
56 +kamailio-mod-xlog
57 endef
58
59 define Package/kamailio-example/conffiles
60 /etc/default/kamailio
61 /etc/kamailio/kamailio.cfg
62 endef
63
64
65 define Package/kamailio-tools
66 $(call Package/kamailio/Default)
67 TITLE:=Kamailio control tools
68 DEPENDS:=kamailio
69 endef
70
71 define Package/kamailio-tools/conffiles
72 /etc/kamailio/kamctlrc
73 endef
74
75
76 PKG_EXCL_MODULES:= \
77 auth_diameter \
78 carrierroute \
79 db_berkeley \
80 db_oracle \
81 db_unixodbc \
82 mediaproxy \
83 mi_xmlrpc \
84 osp \
85 perl \
86 perlvdb \
87 purple \
88 snmpstats \
89
90 PKG_MAKE_ARGS:= \
91 cfg-dir="etc/kamailio/" \
92 bin-dir="usr/sbin/" \
93 data-dir="var/lib/kamailio/" \
94 lib-dir="usr/lib/kamailio/" \
95 modules-dir="usr/lib/kamailio/modules/" \
96 exclude_modules="$(PKG_EXCL_MODULES)" \
97
98
99 define Build/Compile
100 $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \
101 prefix=/ \
102 extra_defs="-DUSE_PTHREAD_MUTEX " \
103 CC="$(TARGET_CC)" \
104 ARCH="$(ARCH)" \
105 CFLAGS="$(TARGET_CFLAGS)" \
106 ISSMP="no" \
107 LOCALBASE="$(STAGING_DIR)/usr" \
108 SYSBASE="$(STAGING_DIR)/usr" \
109 PCREDEFS:="$(TARGET_CPPFLAGS)" \
110 PCRELIBS:="$(TARGET_LDFLAGS)" \
111 all
112 $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \
113 DESTDIR="$(PKG_INSTALL_DIR)" \
114 install
115 endef
116
117 define Package/kamailio/install
118 $(INSTALL_DIR) $(1)/usr/sbin
119 $(CP) \
120 $(PKG_INSTALL_DIR)/usr/sbin/kamailio \
121 $(1)/usr/sbin/
122 $(INSTALL_DIR) $(1)/usr/lib/kamailio/modules
123 endef
124
125 define Package/kamailio-example/install
126 $(INSTALL_DIR) $(1)/etc/kamailio
127 $(CP) \
128 $(PKG_INSTALL_DIR)/etc/kamailio/kamailio.cfg \
129 $(1)/etc/kamailio/
130 $(SED) 's,$(PKG_INSTALL_DIR),,g' \
131 $(1)/etc/kamailio/kamailio.cfg
132 $(INSTALL_DIR) $(1)/etc/default
133 $(INSTALL_DATA) ./files/kamailio.default $(1)/etc/default/kamailio
134 $(INSTALL_DIR) $(1)/etc/init.d
135 $(INSTALL_BIN) ./files/kamailio.init $(1)/etc/init.d/kamailio
136 endef
137
138 define Package/kamailio-tools/install
139 $(INSTALL_DIR) $(1)/etc/kamailio
140 $(CP) \
141 $(PKG_INSTALL_DIR)/etc/kamailio/kamctlrc \
142 $(1)/etc/kamailio/
143 $(INSTALL_DIR) $(1)/usr/sbin
144 $(CP) \
145 $(PKG_INSTALL_DIR)/usr/sbin/kam{ctl,dbctl,unix} \
146 $(1)/usr/sbin/
147 $(INSTALL_DIR) $(1)/usr/lib/kamailio
148 $(CP) \
149 $(PKG_INSTALL_DIR)/usr/lib/kamailio/kamctl \
150 $(1)/usr/lib/kamailio/
151 $(SED) 's,/bin/bash,/bin/sh,g' \
152 -e 's,$(PKG_INSTALL_DIR),,g' \
153 $(1)/usr/sbin/kam{ctl,dbctl}
154 endef
155
156 define BuildPlugin
157 define Package/kamailio-mod-$(1)
158 $$(call Package/kamailio/Default)
159 TITLE:= kamailio $(3) module
160 DEPENDS:=kamailio $$(foreach m,$(4),+kamailio-mod-$$m) $(5)
161 endef
162
163 define Package/kamailio-mod-$(1)/install
164 [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/kamailio/modules/
165 $(CP) $(PKG_INSTALL_DIR)/usr/lib/kamailio/modules/$(2).so \
166 $$(1)/usr/lib/kamailio/modules/ ;
167 endef
168
169 $$(eval $$(call BuildPackage,kamailio-mod-$(1)))
170 endef
171
172 $(eval $(call BuildPackage,kamailio))
173 $(eval $(call BuildPackage,kamailio-example))
174 $(eval $(call BuildPackage,kamailio-tools))
175 $(eval $(call BuildPlugin,acc,acc,Accounting,tm,))
176 $(eval $(call BuildPlugin,alias-db,alias_db,Database-backend aliases,,))
177 $(eval $(call BuildPlugin,auth,auth,Authentication Framework,,))
178 $(eval $(call BuildPlugin,auth-db,auth_db,Database-backend authentication,auth,))
179 #$(eval $(call BuildPlugin,auth-diameter,auth_diameter,Diameter-backend authentication,sl,))
180 $(eval $(call BuildPlugin,auth-radius,auth_radius,RADIUS-backend authentication,auth,+libradiusclient-ng))
181 $(eval $(call BuildPlugin,avpops,avpops,AVP operation,,))
182 $(eval $(call BuildPlugin,benchmark,benchmark,Config benchmark,,))
183 #$(eval $(call BuildPlugin,carrierroute,carrierroute,Carrier Routing,,+libconfuse))
184 $(eval $(call BuildPlugin,cfgutils,cfgutils,Config utilities,,))
185 $(eval $(call BuildPlugin,cpl-c,cpl-c,Call Processing language interpreter,tm sl usrloc,+libxml2))
186 #$(eval $(call BuildPlugin,db-berkeley,db_berkeley,Berkeley DB Database-backend,,))
187 $(eval $(call BuildPlugin,db-flatstore,db_flatstore,Fast writing-only text database-backed,,))
188 $(eval $(call BuildPlugin,db-mysql,db_mysql,MySQL database-backend,,+libmysqlclient))
189 #$(eval $(call BuildPlugin,db-oracle,db_oracle,Oracle Database-backend,,))
190 $(eval $(call BuildPlugin,db-postgres,db_postgres,PostgreSQL Database-backend,,+libpq))
191 $(eval $(call BuildPlugin,db-text,db_text,Text database-backend,,))
192 #$(eval $(call BuildPlugin,db-unixodbc,db_unixodbc,UnixODBC Database-backend,,))
193 $(eval $(call BuildPlugin,dialog,dialog,Dialog support,rr tm,))
194 $(eval $(call BuildPlugin,dialplan,dialplan,Dialplan management,,+libpcre))
195 $(eval $(call BuildPlugin,dispatcher,dispatcher,Dispatcher,,))
196 $(eval $(call BuildPlugin,diversion,diversion,Diversion header insertion,,))
197 $(eval $(call BuildPlugin,domain,domain,Multi-domain support,,))
198 $(eval $(call BuildPlugin,domainpolicy,domainpolicy,Domain policy,,))
199 $(eval $(call BuildPlugin,enum,enum,ENUM lookup,,))
200 $(eval $(call BuildPlugin,exec,exec,External exec,,))
201 $(eval $(call BuildPlugin,group,group,Database-backend user-groups,,))
202 $(eval $(call BuildPlugin,h350,h350,H.350,ldap,+libopenldap))
203 $(eval $(call BuildPlugin,htable,htable,Hash Table,,))
204 $(eval $(call BuildPlugin,imc,imc,IM conferencing,db-mysql tm,))
205 $(eval $(call BuildPlugin,jabber,jabber,Jabber,tm,+libexpat))
206 $(eval $(call BuildPlugin,lcr,lcr,Least Cost Routing,tm,+libpcre))
207 $(eval $(call BuildPlugin,ldap,ldap,LDAP connector,,+libopenldap))
208 $(eval $(call BuildPlugin,maxfwd,maxfwd,Max-Forward processor,,))
209 $(eval $(call BuildPlugin,mi-datagram,mi_datagram,Datagram support for Management Interface,,))
210 $(eval $(call BuildPlugin,mi-fifo,mi_fifo,FIFO support for Management Interface,,))
211 #$(eval $(call BuildPlugin,mi-xmlrpc,mi_xmlrpc,XML-RPC support for Management Interface,,+xmlrpc-c))
212 #$(eval $(call BuildPlugin,mediaproxy,mediaproxy,NAT traversal,,+mediaproxy))
213 $(eval $(call BuildPlugin,misc_radius,misc_radius,Generic RADIUS,,+libradiusclient-ng))
214 $(eval $(call BuildPlugin,msilo,msilo,SIP message silo,tm,))
215 $(eval $(call BuildPlugin,nat_traversal,nat_traversal,NAT traversal,dialog sl tm,))
216 $(eval $(call BuildPlugin,nathelper,nathelper,NAT traversal helper,,+rtpproxy))
217 #$(eval $(call BuildPlugin,osp,osp,OSP peering,auth rr sl tm textops,+libosp))
218 $(eval $(call BuildPlugin,path,path,SIP path insertion,rr,))
219 $(eval $(call BuildPlugin,pdt,pdt,Prefix-to-Domain translator,,))
220 $(eval $(call BuildPlugin,peering,peering,Perring,,+libradiusclient-ng))
221 #$(eval $(call BuildPlugin,perl,perl,Perl,sl,+perl))
222 #$(eval $(call BuildPlugin,perlvdb,perlvdb,Perl Virtual DB,perl,))
223 $(eval $(call BuildPlugin,permissions,permissions,Permissions control,,))
224 $(eval $(call BuildPlugin,pike,pike,Flood detector,,))
225 $(eval $(call BuildPlugin,presence,presence,Presence server,sl tm,+libxml2))
226 $(eval $(call BuildPlugin,presence-dialoginfo,presence_dialoginfo,Dialog Event presence,presence,))
227 $(eval $(call BuildPlugin,presence-mwi,presence_mwi,Message Waiting Indication presence,presence,))
228 $(eval $(call BuildPlugin,presence-xml,presence_xml,XCAP presence,presence xcap-client,))
229 $(eval $(call BuildPlugin,pua,pua,Presence User Agent,tm,+libxml2))
230 $(eval $(call BuildPlugin,pua-bla,pua_bla,Bridged Line Appearence PUA,presence pua usrloc,))
231 $(eval $(call BuildPlugin,pua-dialoginfo,pua_dialoginfo,Dialog Event PUA,dialog pua,))
232 $(eval $(call BuildPlugin,pua-mi,pua_mi,PUA Management Interface,pua,))
233 $(eval $(call BuildPlugin,pua-usrloc,pua_usrloc,PUA User Location,pua usrloc,))
234 $(eval $(call BuildPlugin,pua-xmpp,pua_xmpp,PUA XMPP,presence pua xmpp,))
235 #$(eval $(call BuildPlugin,purple,purple,Multi-protocol IM gateway,presence pua,+libpurple))
236 $(eval $(call BuildPlugin,pv,pv,Pseudo-Variables,,))
237 $(eval $(call BuildPlugin,qos,qos,QoS control,dialog,))
238 $(eval $(call BuildPlugin,ratelimit,ratelimit,Traffic shapping,,))
239 $(eval $(call BuildPlugin,regex,regex,Regular Expression,,+libpcre))
240 $(eval $(call BuildPlugin,registrar,registrar,SIP Registrar,usrloc,))
241 $(eval $(call BuildPlugin,rls,rls,Resource List Server,presence pua tm,+libxml2))
242 $(eval $(call BuildPlugin,rr,rr,Record-Route and Route,,))
243 $(eval $(call BuildPlugin,rtimer,rtimer,Routing Timer,,))
244 $(eval $(call BuildPlugin,sanity,sanity,SIP sanity checks,sl,))
245 #$(eval $(call BuildPlugin,seas,seas,SIP Express Application Server,tm,))
246 $(eval $(call BuildPlugin,siptrace,siptrace,SIP trace,,))
247 $(eval $(call BuildPlugin,siputils,siputils,SIP utilities,sl,))
248 $(eval $(call BuildPlugin,sl,sl,Stateless replier,,))
249 $(eval $(call BuildPlugin,sms,sms,SIP-to-SMS IM gateway,tm,))
250 #$(eval $(call BuildPlugin,snmpstats,snmpstats,SNMP,presence usrloc,+libnetsnmp))
251 $(eval $(call BuildPlugin,speeddial,speeddial,Per-user speed-dial controller,,))
252 $(eval $(call BuildPlugin,sqlops,sqlops,SQL operations,,))
253 $(eval $(call BuildPlugin,statistics,statistics,Script statistics,,))
254 $(eval $(call BuildPlugin,sst,sst,SIP Session Timer,dialog sl,))
255 $(eval $(call BuildPlugin,textops,textops,Text operations,,))
256 $(eval $(call BuildPlugin,tlsops,tlsops,TLS operations,,+libopenssl))
257 $(eval $(call BuildPlugin,tm,tm,Transaction,,))
258 $(eval $(call BuildPlugin,uac,uac,User Agent Client,tm,))
259 $(eval $(call BuildPlugin,uac-redirect,uac_redirect,User Agent Client redirection,tm,))
260 $(eval $(call BuildPlugin,uri-db,uri_db,Database-backend SIP URI checking,,))
261 $(eval $(call BuildPlugin,userblacklist,userblacklist,User blacklists,,))
262 $(eval $(call BuildPlugin,usrloc,usrloc,User location,,))
263 $(eval $(call BuildPlugin,utils,utils,Misc utilities,,+libcurl))
264 $(eval $(call BuildPlugin,xcap-client,xcap_client,XCAP Client,,+libcurl))
265 $(eval $(call BuildPlugin,xlog,xlog,Advanced logger,,))
266 $(eval $(call BuildPlugin,xmpp,xmpp,SIP-to-XMPP Gateway,tm,+libexpat))