[patch-team] - tor-alpha new package - Signed-off-by: Jacob Appelbaum <jacob@appelbau...
[openwrt/svn-archive/archive.git] / net / opensips / 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:=opensips
11 PKG_VERSION:=1.5.3
12 PKG_RELEASE:=1
13 PKG_VARIANT:=-tls
14
15 PKG_SOURCE_URL:=http://opensips.org/pub/opensips/$(PKG_VERSION)/src
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz
17 PKG_MD5SUM:=8a03167420c31da15405bed7630ed3e2
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/opensips/Default
28 SECTION:=net
29 CATEGORY:=Network
30 URL:=http://www.opensips.org/
31 endef
32
33
34 define Package/opensips
35 $(call Package/opensips/Default)
36 TITLE:=Open SIP Server
37 MENU:=1
38 endef
39
40 define Package/opensips-example
41 $(call Package/opensips/Default)
42 TITLE:=OpenSIPS example config
43 DEPENDS:=opensips \
44 +opensips-mod-acc \
45 +opensips-mod-maxfwd \
46 +opensips-mod-mi-fifo \
47 +opensips-mod-registrar \
48 +opensips-mod-rr \
49 +opensips-mod-signaling \
50 +opensips-mod-sl \
51 +opensips-mod-textops \
52 +opensips-mod-tm \
53 +opensips-mod-uri \
54 +opensips-mod-uri-db \
55 +opensips-mod-usrloc \
56 +opensips-mod-xlog
57 endef
58
59 define Package/opensips-example/conffiles
60 /etc/default/opensips
61 /etc/opensips/opensips.cfg
62 endef
63
64
65 define Package/opensips-tools
66 $(call Package/opensips/Default)
67 TITLE:=OpenSIPS control tools
68 DEPENDS:=opensips
69 endef
70
71 define Package/opensips-tools/conffiles
72 /etc/opensips/opensipsctlrc
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 mmgeoip \
85 osp \
86 perl \
87 perlvdb \
88 snmpstats \
89
90 PKG_MAKE_ARGS:= \
91 cfg-dir="etc/opensips/" \
92 bin-dir="usr/sbin/" \
93 data-dir="var/lib/opensips/" \
94 lib-dir="usr/lib/opensips/" \
95 modules-dir="usr/lib/opensips/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 PCRECFG= \
110 all
111 $(MAKE) -C $(PKG_BUILD_DIR) $(PKG_MAKE_ARGS) \
112 DESTDIR="$(PKG_INSTALL_DIR)" \
113 install
114 endef
115
116 define Package/opensips/install
117 $(INSTALL_DIR) $(1)/usr/sbin
118 $(CP) \
119 $(PKG_INSTALL_DIR)/usr/sbin/opensips \
120 $(1)/usr/sbin/
121 $(INSTALL_DIR) $(1)/usr/lib/opensips/modules
122 endef
123
124 define Package/opensips-example/install
125 $(INSTALL_DIR) $(1)/etc/opensips
126 $(CP) \
127 $(PKG_INSTALL_DIR)/etc/opensips/opensips.cfg \
128 $(1)/etc/opensips/
129 $(SED) 's,$(PKG_INSTALL_DIR),,g' \
130 $(1)/etc/opensips/opensips.cfg
131 $(INSTALL_DIR) $(1)/etc/default
132 $(INSTALL_DATA) ./files/opensips.default $(1)/etc/default/opensips
133 $(INSTALL_DIR) $(1)/etc/init.d
134 $(INSTALL_BIN) ./files/opensips.init $(1)/etc/init.d/opensips
135 endef
136
137 define Package/opensips-tools/install
138 $(INSTALL_DIR) $(1)/etc/opensips
139 $(CP) \
140 $(PKG_INSTALL_DIR)/etc/opensips/opensipsctlrc \
141 $(1)/etc/opensips/
142 $(INSTALL_DIR) $(1)/usr/sbin
143 $(CP) \
144 $(PKG_INSTALL_DIR)/usr/sbin/opensips{ctl,dbctl,unix} \
145 $(1)/usr/sbin/
146 $(INSTALL_DIR) $(1)/usr/lib/opensips
147 $(CP) \
148 $(PKG_INSTALL_DIR)/usr/lib/opensips/opensipsctl \
149 $(1)/usr/lib/opensips/
150 $(SED) 's,/bin/bash,/bin/sh,g' \
151 -e 's,$(PKG_INSTALL_DIR),,g' \
152 $(1)/usr/sbin/opensips{ctl,dbctl}
153 endef
154
155 define BuildPlugin
156 define Package/opensips-mod-$(1)
157 $$(call Package/opensips/Default)
158 TITLE:= OpenSIPS $(3) module
159 DEPENDS:=opensips $$(foreach m,$(4),+opensips-mod-$$m) $(5)
160 endef
161
162 define Package/opensips-mod-$(1)/install
163 [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/opensips/modules/
164 $(CP) $(PKG_INSTALL_DIR)/usr/lib/opensips/modules/$(2).so \
165 $$(1)/usr/lib/opensips/modules/ ;
166 endef
167
168 $$(eval $$(call BuildPackage,opensips-mod-$(1)))
169 endef
170
171 $(eval $(call BuildPackage,opensips))
172 $(eval $(call BuildPackage,opensips-example))
173 $(eval $(call BuildPackage,opensips-tools))
174 $(eval $(call BuildPlugin,acc,acc,Accounting,tm,))
175 $(eval $(call BuildPlugin,alias-db,alias_db,Database-backend aliases,,))
176 $(eval $(call BuildPlugin,auth,auth,Authentication Framework,signaling,))
177 $(eval $(call BuildPlugin,auth-db,auth_db,Database-backend authentication,auth,))
178 $(eval $(call BuildPlugin,auth-radius,auth_radius,RADIUS-backend authentication,auth,+libradiusclient-ng))
179 $(eval $(call BuildPlugin,avp-radius,avp_radius,RADIUS-backend for AVP loading,,+libradiusclient-ng))
180 $(eval $(call BuildPlugin,avpops,avpops,AVP operation,,))
181 $(eval $(call BuildPlugin,benchmark,benchmark,Config benchmark,,))
182 $(eval $(call BuildPlugin,call-control,call_control,Prepair application,dialog,))
183 #$(eval $(call BuildPlugin,carrierroute,carrierroute,Carrier Routing,,+libconfuse))
184 $(eval $(call BuildPlugin,cfgutils,cfgutils,Config utilities,,))
185 $(eval $(call BuildPlugin,closeddial,closeddial,PBX-like features,,))
186 $(eval $(call BuildPlugin,cpl-c,cpl-c,Call Processing language interpreter,tm sl usrloc,+libxml2))
187 #$(eval $(call BuildPlugin,db-berkeley,db_berkeley,Berkeley DB Database-backend,,))
188 $(eval $(call BuildPlugin,db-flatstore,db_flatstore,Fast writing-only text database-backed,,))
189 $(eval $(call BuildPlugin,db-mysql,db_mysql,MySQL database-backend,,+libmysqlclient))
190 #$(eval $(call BuildPlugin,db-oracle,db_oracle,Oracle Database-backend,,))
191 $(eval $(call BuildPlugin,db-postgres,db_postgres,PostgreSQL Database-backend,,+libpq))
192 $(eval $(call BuildPlugin,db-text,db_text,Text database-backend,,))
193 #$(eval $(call BuildPlugin,db-unixodbc,db_unixodbc,UnixODBC Database-backend,,))
194 $(eval $(call BuildPlugin,dialog,dialog,Dialog support,rr tm,))
195 $(eval $(call BuildPlugin,dialplan,dialplan,Dialplan management,,))
196 $(eval $(call BuildPlugin,dispatcher,dispatcher,Dispatcher,,))
197 $(eval $(call BuildPlugin,diversion,diversion,Diversion header insertion,,))
198 $(eval $(call BuildPlugin,domain,domain,Multi-domain support,,))
199 $(eval $(call BuildPlugin,domainpolicy,domainpolicy,Domain policy,,))
200 $(eval $(call BuildPlugin,drouting,drouting,Dynaming routing,,))
201 $(eval $(call BuildPlugin,enum,enum,ENUM lookup,,))
202 $(eval $(call BuildPlugin,exec,exec,External exec,,))
203 $(eval $(call BuildPlugin,gflags,gflags,Global shared flags,,))
204 $(eval $(call BuildPlugin,group,group,Database-backend user-groups,,))
205 $(eval $(call BuildPlugin,group-radius,group_radius,RADIUS-backend user-groups,,))
206 $(eval $(call BuildPlugin,h350,h350,H.350,ldap,+libopenldap))
207 $(eval $(call BuildPlugin,identity,identity,Identity,,+libopenssl))
208 $(eval $(call BuildPlugin,imc,imc,IM conferencing,db-mysql tm,))
209 $(eval $(call BuildPlugin,jabber,jabber,Jabber,tm,+libexpat))
210 $(eval $(call BuildPlugin,lcr,lcr,Least Cost Routing,tm,))
211 $(eval $(call BuildPlugin,ldap,ldap,LDAP connector,,+libopenldap))
212 $(eval $(call BuildPlugin,load_balancer,load_balancer,Load balancer,dialog,))
213 $(eval $(call BuildPlugin,localcache,localcache,Local cache,,))
214 $(eval $(call BuildPlugin,mangler,mangler,SIP mangler,,))
215 $(eval $(call BuildPlugin,maxfwd,maxfwd,Max-Forward processor,,))
216 $(eval $(call BuildPlugin,mi-datagram,mi_datagram,Datagram support for Management Interface,,))
217 $(eval $(call BuildPlugin,mi-fifo,mi_fifo,FIFO support for Management Interface,,))
218 #$(eval $(call BuildPlugin,mi-xmlrpc,mi_xmlrpc,XML-RPC support for Management Interface,,+xmlrpc-c))
219 #$(eval $(call BuildPlugin,mediaproxy,mediaproxy,NAT traversal,,+mediaproxy))
220 #$(eval $(call BuildPlugin,mmgeoip,mmgeoip,MaxMind GeoIP,,+libgeoip))
221 $(eval $(call BuildPlugin,msilo,msilo,SIP message silo,tm,))
222 $(eval $(call BuildPlugin,nat_traversal,nat_traversal,NAT traversal,dialog sl tm,))
223 $(eval $(call BuildPlugin,nathelper,nathelper,NAT traversal helper,,+rtpproxy))
224 $(eval $(call BuildPlugin,options,options,OPTIONS server replier,sl,))
225 #$(eval $(call BuildPlugin,osp,osp,OSP peering,auth rr sl tm textops,+libosp))
226 $(eval $(call BuildPlugin,path,path,SIP path insertion,rr,))
227 $(eval $(call BuildPlugin,pdt,pdt,Prefix-to-Domain translator,,))
228 $(eval $(call BuildPlugin,peering,peering,Perring,,+libradiusclient-ng))
229 #$(eval $(call BuildPlugin,perl,perl,Perl,sl,+perl))
230 #$(eval $(call BuildPlugin,perlvdb,perlvdb,Perl Virtual DB,perl,))
231 $(eval $(call BuildPlugin,permissions,permissions,Permissions control,,))
232 $(eval $(call BuildPlugin,pike,pike,Flood detector,,))
233 $(eval $(call BuildPlugin,presence,presence,Presence server,signaling,+libxml2))
234 $(eval $(call BuildPlugin,presence-dialoginfo,presence_dialoginfo,Dialog Event presence,presence,))
235 $(eval $(call BuildPlugin,presence-mwi,presence_mwi,Message Waiting Indication presence,presence,))
236 $(eval $(call BuildPlugin,presence-xcapdiff,presence_xcapdiff,XCAP-Diff presence,presence pua,))
237 $(eval $(call BuildPlugin,presence-xml,presence_xml,XCAP presence,presence xcap-client,))
238 $(eval $(call BuildPlugin,pua,pua,Presence User Agent,tm,+libxml2))
239 $(eval $(call BuildPlugin,pua-bla,pua_bla,Bridged Line Appearence PUA,presence pua usrloc,))
240 $(eval $(call BuildPlugin,pua-dialoginfo,pua_dialoginfo,Dialog Event PUA,dialog pua,))
241 $(eval $(call BuildPlugin,pua-mi,pua_mi,PUA Management Interface,pua,))
242 $(eval $(call BuildPlugin,pua-usrloc,pua_usrloc,PUA User Location,pua usrloc,))
243 $(eval $(call BuildPlugin,pua-xmpp,pua_xmpp,PUA XMPP,presence pua xmpp,))
244 $(eval $(call BuildPlugin,qos,qos,QoS control,dialog,))
245 $(eval $(call BuildPlugin,ratelimit,ratelimit,Traffic shapping,,))
246 $(eval $(call BuildPlugin,regex,regex,Regular Expression,,+libpcre))
247 $(eval $(call BuildPlugin,registrar,registrar,SIP Registrar,signaling usrloc,))
248 $(eval $(call BuildPlugin,rls,rls,Resource List Server,presence pua signaling tm,+libxml2))
249 $(eval $(call BuildPlugin,rr,rr,Record-Route and Route,,))
250 $(eval $(call BuildPlugin,seas,seas,SIP Express Application Server,tm,))
251 $(eval $(call BuildPlugin,signaling,signaling,Signaling,sl tm,))
252 $(eval $(call BuildPlugin,siptrace,siptrace,SIP trace,,))
253 $(eval $(call BuildPlugin,sl,sl,Stateless replier,,))
254 $(eval $(call BuildPlugin,sms,sms,SIP-to-SMS IM gateway,tm,))
255 #$(eval $(call BuildPlugin,snmpstats,snmpstats,SNMP,presence usrloc,+libnetsnmp))
256 $(eval $(call BuildPlugin,speeddial,speeddial,Per-user speed-dial controller,,))
257 $(eval $(call BuildPlugin,statistics,statistics,Script statistics,,))
258 $(eval $(call BuildPlugin,sst,sst,SIP Session Timer,dialog sl,))
259 $(eval $(call BuildPlugin,textops,textops,Text operations,,))
260 $(eval $(call BuildPlugin,tlsops,tlsops,TLS operations,,+libopenssl))
261 $(eval $(call BuildPlugin,tm,tm,Transaction,,))
262 $(eval $(call BuildPlugin,uac,uac,User Agent Client,tm,))
263 $(eval $(call BuildPlugin,uac-redirect,uac_redirect,User Agent Client redirection,tm,))
264 $(eval $(call BuildPlugin,uri,uri,Generic URI operation,,))
265 $(eval $(call BuildPlugin,uri-db,uri_db,Database-backend SIP URI checking,,))
266 $(eval $(call BuildPlugin,uri-radius,uri_radius,RADIUS-backend SIP URI checking,,+libradiusclient-ng))
267 $(eval $(call BuildPlugin,userblacklist,userblacklist,User blacklists,,))
268 $(eval $(call BuildPlugin,usrloc,usrloc,User location,,))
269 $(eval $(call BuildPlugin,xcap-client,xcap_client,XCAP Client,,+libcurl +libxml2))
270 $(eval $(call BuildPlugin,xlog,xlog,Advanced logger,,))
271 $(eval $(call BuildPlugin,xmpp,xmpp,SIP-to-XMPP Gateway,tm,+libexpat))