2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 PKG_MD5SUM
:=eebc16665003ee92daf96b216d6f9563
15 # PKG_VARIANT:=-tls # for tls version
18 PKG_SOURCE_URL
:=http
://openser.org
/pub
/openser
/$(PKG_VERSION
)/src
19 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)$(PKG_VARIANT
)_src.
tar.gz
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
23 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/openser
30 TITLE
:=Configurable
, free SIP server
31 URL
:=http
://www.openser.org
35 define Package
/openser
/conffiles
36 /etc
/openser
/openser.cfg
39 define Package
/openser-mod-acc
43 TITLE
:=Accounting support
47 define Package
/openser-mod-auth
51 TITLE
:=Authentication support
54 define Package
/openser-mod-auth-db
58 TITLE
:=Authentication with database support
61 define Package
/openser-mod-auth-radius
64 DEPENDS
:=openser
+libradiusclient-ng
65 TITLE
:=Authentication with RADIUS support
68 define Package
/openser-mod-avp-radius
71 DEPENDS
:=openser
+libradiusclient-ng
72 TITLE
:=AVP with RADIUS support
75 define Package
/openser-mod-avpops
79 TITLE
:=AVP options support
82 define Package
/openser-mod-dispatcher
86 TITLE
:=Dispatcher support
89 define Package
/openser-mod-diversion
93 TITLE
:=Diversion support
96 define Package
/openser-mod-flatstore
100 TITLE
:=Flatstore support
103 define Package
/openser-mod-gflags
107 TITLE
:=Gflags support
110 define Package
/openser-mod-group
117 define Package
/openser-mod-group-radius
120 DEPENDS
:=openser
+libradiusclient-ng
121 TITLE
:=Group with RADIUS support
124 define Package
/openser-mod-lcr
127 DEPENDS
:=openser openser-mod-mysql
128 TITLE
:=Least Cost Routing support
131 define Package
/openser-mod-mediaproxy
135 TITLE
:=Mediaproxy support
138 define Package
/openser-mod-msilo
145 define Package
/openser-mod-mysql
148 DEPENDS
:=openser
+libmysqlclient
152 define Package
/openser-mod-nathelper
156 TITLE
:=NAT helper support
159 define Package
/openser-mod-options
163 TITLE
:=Options support
166 define Package
/openser-mod-pdt
173 define Package
/openser-mod-permissions
177 TITLE
:=Permissions support
180 define Package
/openser-mod-pike
187 define Package
/openser-mod-sms
194 define Package
/openser-mod-speeddial
198 TITLE
:=Speeddial supporte
201 define Package
/openser-mod-uac
208 define Package
/openser-mod-uac-redirect
212 TITLE
:=UAC with redirect support
215 define Package
/openser-mod-uri
222 define Package
/openser-mod-uri-db
225 DEPENDS
:=openser
+openser-mod-mysql
226 TITLE
:=URI with database support
229 define Package
/openser-mod-uri-radius
232 DEPENDS
:=openser
+libradiusclient-ng
233 TITLE
:=URI with RADIUS support
236 define Package
/openser-mod-xlog
240 TITLE
:=Advanced logging support
243 # Select here the modules for the ipk package
244 OPENSER_MODULES
:= sl tm rr maxfwd usrloc registrar dbtext textops exec
246 OPENSER_MODULE_FILES
:= $(foreach module
,$(OPENSER_MODULES
),modules
/$(module
)/$(module
).so
)
247 OPENSER_MODULES
:= $(patsubst %,modules
/%,$(OPENSER_MODULES
))
250 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
252 extra_defs
="-DUSE_PTHREAD_MUTEX " \
255 CFLAGS
="$(TARGET_CFLAGS)" \
256 LOCALBASE
="$(STAGING_DIR)/usr" \
257 all utils
/gen_ha1
/gen_ha1
260 define Package
/openser
/install
261 mkdir
-p
$(1)/usr
/sbin
262 $(CP
) $(PKG_BUILD_DIR
)/$(PKG_NAME
) $(1)/usr
/sbin
/
263 $(CP
) $(PKG_BUILD_DIR
)/utils
/gen_ha1
/gen_ha1
$(1)/usr
/sbin
/openser_gen_ha1
264 $(CP
) $(PKG_BUILD_DIR
)/scripts
/sc
$(1)/usr
/sbin
/openserctl
265 chmod
744 $(1)/usr
/sbin
/openserctl
266 $(CP
) $(PKG_BUILD_DIR
)/scripts
/sc.dbtext
$(1)/usr
/sbin
/dbtextctl
267 chmod
744 $(1)/usr
/sbin
/dbtextctl
268 mkdir
-p
$(1)/usr
/lib
/openser
/modules
269 (cd
$(PKG_BUILD_DIR
);\
270 $(CP
) $(OPENSER_MODULE_FILES
) $(1)/usr
/lib
/openser
/modules
/; \
272 mkdir
-p
$(1)/etc
/openser
273 $(CP
) $(PKG_BUILD_DIR
)/etc
/openser.cfg
$(1)/etc
/openser
/
277 define Package
/$(1)/install
278 [ -z
"$(2)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/openser
/modules
/
279 $(CP
) $(PKG_BUILD_DIR
)/modules
/$(2)/$(2).so \
280 $$(1)/usr
/lib
/openser
/modules
/ ;
283 $$(eval
$$(call BuildPackage
,$(1)))
286 $(eval
$(call BuildPackage
,openser
))
287 $(eval
$(call BuildPlugin
,openser-mod-acc
,acc
))
288 $(eval
$(call BuildPlugin
,openser-mod-auth
,auth
))
289 $(eval
$(call BuildPlugin
,openser-mod-auth-db
,auth_db
))
290 $(eval
$(call BuildPlugin
,openser-mod-auth-radius
,auth_radius
))
291 $(eval
$(call BuildPlugin
,openser-mod-avp-radius
,avp_radius
))
292 $(eval
$(call BuildPlugin
,openser-mod-avpops
,avpops
))
293 $(eval
$(call BuildPlugin
,openser-mod-dispatcher
,dispatcher
))
294 $(eval
$(call BuildPlugin
,openser-mod-diversion
,diversion
))
295 $(eval
$(call BuildPlugin
,openser-mod-flatstore
,flatstore
))
296 $(eval
$(call BuildPlugin
,openser-mod-gflags
,gflags))
297 $(eval
$(call BuildPlugin
,openser-mod-group
,group
))
298 $(eval
$(call BuildPlugin
,openser-mod-group-radius
,group_radius
))
299 $(eval
$(call BuildPlugin
,openser-mod-lcr
,lcr
))
300 $(eval
$(call BuildPlugin
,openser-mod-mediaproxy
,mediaproxy
))
301 $(eval
$(call BuildPlugin
,openser-mod-msilo
,msilo
))
302 $(eval
$(call BuildPlugin
,openser-mod-mysql
,mysql
))
303 $(eval
$(call BuildPlugin
,openser-mod-nathelper
,nathelper
))
304 $(eval
$(call BuildPlugin
,openser-mod-options
,options
))
305 $(eval
$(call BuildPlugin
,openser-mod-pdt
,pdt
))
306 $(eval
$(call BuildPlugin
,openser-mod-permissions
,permissions
))
307 $(eval
$(call BuildPlugin
,openser-mod-pike
,pike
))
308 $(eval
$(call BuildPlugin
,openser-mod-sms
,sms
))
309 $(eval
$(call BuildPlugin
,openser-mod-speeddial
,speeddial
))
310 $(eval
$(call BuildPlugin
,openser-mod-uac
,uac
))
311 $(eval
$(call BuildPlugin
,openser-mod-uac-redirect
,uac_redirect
))
312 $(eval
$(call BuildPlugin
,openser-mod-uri
,uri
))
313 $(eval
$(call BuildPlugin
,openser-mod-uri-db
,uri_db
))
314 $(eval
$(call BuildPlugin
,openser-mod-uri-radius
,uri_radius
))
315 $(eval
$(call BuildPlugin
,openser-mod-xlog
,xlog
))