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
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/openser
29 TITLE
:=Configurable
, free SIP server
30 URL
:=http
://www.openser.org
34 define Package
/openser
/conffiles
35 /etc
/openser
/openser.cfg
38 define Package
/openser-mod-acc
42 TITLE
:=Accounting support
46 define Package
/openser-mod-auth
50 TITLE
:=Authentication support
53 define Package
/openser-mod-auth-db
57 TITLE
:=Authentication with database support
60 define Package
/openser-mod-auth-radius
63 DEPENDS
:=openser
+libradiusclient-ng
64 TITLE
:=Authentication with RADIUS support
67 define Package
/openser-mod-avp-radius
70 DEPENDS
:=openser
+libradiusclient-ng
71 TITLE
:=AVP with RADIUS support
74 define Package
/openser-mod-avpops
78 TITLE
:=AVP options support
81 define Package
/openser-mod-dispatcher
85 TITLE
:=Dispatcher support
88 define Package
/openser-mod-diversion
92 TITLE
:=Diversion support
95 define Package
/openser-mod-flatstore
99 TITLE
:=Flatstore support
102 define Package
/openser-mod-gflags
106 TITLE
:=Gflags support
109 define Package
/openser-mod-group
116 define Package
/openser-mod-group-radius
119 DEPENDS
:=openser
+libradiusclient-ng
120 TITLE
:=Group with RADIUS support
123 define Package
/openser-mod-lcr
126 DEPENDS
:=openser openser-mod-mysql
127 TITLE
:=Least Cost Routing support
130 define Package
/openser-mod-mediaproxy
134 TITLE
:=Mediaproxy support
137 define Package
/openser-mod-msilo
144 define Package
/openser-mod-mysql
147 DEPENDS
:=openser
+libmysqlclient
151 define Package
/openser-mod-nathelper
155 TITLE
:=NAT helper support
158 define Package
/openser-mod-options
162 TITLE
:=Options support
165 define Package
/openser-mod-pdt
172 define Package
/openser-mod-permissions
176 TITLE
:=Permissions support
179 define Package
/openser-mod-pike
186 define Package
/openser-mod-sms
193 define Package
/openser-mod-speeddial
197 TITLE
:=Speeddial supporte
200 define Package
/openser-mod-uac
207 define Package
/openser-mod-uac-redirect
211 TITLE
:=UAC with redirect support
214 define Package
/openser-mod-uri
221 define Package
/openser-mod-uri-db
224 DEPENDS
:=openser
+openser-mod-mysql
225 TITLE
:=URI with database support
228 define Package
/openser-mod-uri-radius
231 DEPENDS
:=openser
+libradiusclient-ng
232 TITLE
:=URI with RADIUS support
235 define Package
/openser-mod-xlog
239 TITLE
:=Advanced logging support
242 # Select here the modules for the ipk package
243 OPENSER_MODULES
:= sl tm rr maxfwd usrloc registrar dbtext textops exec
245 OPENSER_MODULE_FILES
:= $(foreach module
,$(OPENSER_MODULES
),modules
/$(module
)/$(module
).so
)
246 OPENSER_MODULES
:= $(patsubst %,modules
/%,$(OPENSER_MODULES
))
249 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
251 extra_defs
="-DUSE_PTHREAD_MUTEX " \
254 CFLAGS
="$(TARGET_CFLAGS)" \
255 LOCALBASE
="$(STAGING_DIR)/usr" \
256 all utils
/gen_ha1
/gen_ha1
259 define Package
/openser
/install
260 mkdir
-p
$(1)/usr
/sbin
261 $(CP
) $(PKG_BUILD_DIR
)/$(PKG_NAME
) $(1)/usr
/sbin
/
262 $(CP
) $(PKG_BUILD_DIR
)/utils
/gen_ha1
/gen_ha1
$(1)/usr
/sbin
/openser_gen_ha1
263 $(CP
) $(PKG_BUILD_DIR
)/scripts
/sc
$(1)/usr
/sbin
/openserctl
264 chmod
744 $(1)/usr
/sbin
/openserctl
265 $(CP
) $(PKG_BUILD_DIR
)/scripts
/sc.dbtext
$(1)/usr
/sbin
/dbtextctl
266 chmod
744 $(1)/usr
/sbin
/dbtextctl
267 mkdir
-p
$(1)/usr
/lib
/openser
/modules
268 (cd
$(PKG_BUILD_DIR
);\
269 $(CP
) $(OPENSER_MODULE_FILES
) $(1)/usr
/lib
/openser
/modules
/; \
271 mkdir
-p
$(1)/etc
/openser
272 $(CP
) $(PKG_BUILD_DIR
)/etc
/openser.cfg
$(1)/etc
/openser
/
276 define Package
/$(1)/install
277 [ -z
"$(2)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/openser
/modules
/
278 $(CP
) $(PKG_BUILD_DIR
)/modules
/$(2)/$(2).so \
279 $$(1)/usr
/lib
/openser
/modules
/ ;
282 $$(eval
$$(call BuildPackage
,$(1)))
285 $(eval
$(call BuildPackage
,openser
))
286 $(eval
$(call BuildPlugin
,openser-mod-acc
,acc
))
287 $(eval
$(call BuildPlugin
,openser-mod-auth
,auth
))
288 $(eval
$(call BuildPlugin
,openser-mod-auth-db
,auth_db
))
289 $(eval
$(call BuildPlugin
,openser-mod-auth-radius
,auth_radius
))
290 $(eval
$(call BuildPlugin
,openser-mod-avp-radius
,avp_radius
))
291 $(eval
$(call BuildPlugin
,openser-mod-avpops
,avpops
))
292 $(eval
$(call BuildPlugin
,openser-mod-dispatcher
,dispatcher
))
293 $(eval
$(call BuildPlugin
,openser-mod-diversion
,diversion
))
294 $(eval
$(call BuildPlugin
,openser-mod-flatstore
,flatstore
))
295 $(eval
$(call BuildPlugin
,openser-mod-gflags
,gflags))
296 $(eval
$(call BuildPlugin
,openser-mod-group
,group
))
297 $(eval
$(call BuildPlugin
,openser-mod-group-radius
,group_radius
))
298 $(eval
$(call BuildPlugin
,openser-mod-lcr
,lcr
))
299 $(eval
$(call BuildPlugin
,openser-mod-mediaproxy
,mediaproxy
))
300 $(eval
$(call BuildPlugin
,openser-mod-msilo
,msilo
))
301 $(eval
$(call BuildPlugin
,openser-mod-mysql
,mysql
))
302 $(eval
$(call BuildPlugin
,openser-mod-nathelper
,nathelper
))
303 $(eval
$(call BuildPlugin
,openser-mod-options
,options
))
304 $(eval
$(call BuildPlugin
,openser-mod-pdt
,pdt
))
305 $(eval
$(call BuildPlugin
,openser-mod-permissions
,permissions
))
306 $(eval
$(call BuildPlugin
,openser-mod-pike
,pike
))
307 $(eval
$(call BuildPlugin
,openser-mod-sms
,sms
))
308 $(eval
$(call BuildPlugin
,openser-mod-speeddial
,speeddial
))
309 $(eval
$(call BuildPlugin
,openser-mod-uac
,uac
))
310 $(eval
$(call BuildPlugin
,openser-mod-uac-redirect
,uac_redirect
))
311 $(eval
$(call BuildPlugin
,openser-mod-uri
,uri
))
312 $(eval
$(call BuildPlugin
,openser-mod-uri-db
,uri_db
))
313 $(eval
$(call BuildPlugin
,openser-mod-uri-radius
,uri_radius
))
314 $(eval
$(call BuildPlugin
,openser-mod-xlog
,xlog
))