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.
8 include $(TOPDIR)/rules.mk
13 PKG_MD5SUM:=eebc16665003ee92daf96b216d6f9563
14 # PKG_VARIANT:=-tls # for tls version
17 PKG_SOURCE_URL:=http://openser.org/pub/openser/$(PKG_VERSION)/src
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz
20 include $(INCLUDE_DIR)/package.mk
22 define Package/openser
26 TITLE:=Configurable, free SIP server
27 URL:=http://www.openser.org
31 define Package/openser/conffiles
32 /etc/openser/openser.cfg
35 define Package/openser-mod-acc
39 TITLE:=Accounting support
43 define Package/openser-mod-auth
47 TITLE:=Authentication support
50 define Package/openser-mod-auth-db
54 TITLE:=Authentication with database support
57 define Package/openser-mod-auth-radius
60 DEPENDS:=openser +libradiusclient-ng
61 TITLE:=Authentication with RADIUS support
64 define Package/openser-mod-avp-radius
67 DEPENDS:=openser +libradiusclient-ng
68 TITLE:=AVP with RADIUS support
71 define Package/openser-mod-avpops
75 TITLE:=AVP options support
78 define Package/openser-mod-dispatcher
82 TITLE:=Dispatcher support
85 define Package/openser-mod-diversion
89 TITLE:=Diversion support
92 define Package/openser-mod-flatstore
96 TITLE:=Flatstore support
99 define Package/openser-mod-gflags
103 TITLE:=Gflags support
106 define Package/openser-mod-group
113 define Package/openser-mod-group-radius
116 DEPENDS:=openser +libradiusclient-ng
117 TITLE:=Group with RADIUS support
120 define Package/openser-mod-lcr
123 DEPENDS:=openser openser-mod-mysql
124 TITLE:=Least Cost Routing support
127 define Package/openser-mod-mediaproxy
131 TITLE:=Mediaproxy support
134 define Package/openser-mod-msilo
141 define Package/openser-mod-mysql
144 DEPENDS:=openser +libmysqlclient
148 define Package/openser-mod-nathelper
152 TITLE:=NAT helper support
155 define Package/openser-mod-options
159 TITLE:=Options support
162 define Package/openser-mod-pdt
169 define Package/openser-mod-permissions
173 TITLE:=Permissions support
176 define Package/openser-mod-pike
183 define Package/openser-mod-sms
190 define Package/openser-mod-speeddial
194 TITLE:=Speeddial supporte
197 define Package/openser-mod-uac
204 define Package/openser-mod-uac-redirect
208 TITLE:=UAC with redirect support
211 define Package/openser-mod-uri
218 define Package/openser-mod-uri-db
221 DEPENDS:=openser +openser-mod-mysql
222 TITLE:=URI with database support
225 define Package/openser-mod-uri-radius
228 DEPENDS:=openser +libradiusclient-ng
229 TITLE:=URI with RADIUS support
232 define Package/openser-mod-xlog
236 TITLE:=Advanced logging support
239 # Select here the modules for the ipk package
240 OPENSER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops exec
242 OPENSER_MODULE_FILES := $(foreach module,$(OPENSER_MODULES),modules/$(module)/$(module).so)
243 OPENSER_MODULES := $(patsubst %,modules/%,$(OPENSER_MODULES))
246 $(MAKE) -C $(PKG_BUILD_DIR) \
248 extra_defs="-DUSE_PTHREAD_MUTEX " \
251 CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
252 LOCALBASE="$(STAGING_DIR)/usr" \
253 all utils/gen_ha1/gen_ha1
256 define Package/openser/install
257 $(INSTALL_DIR) $(1)/usr/sbin
258 $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
259 $(CP) $(PKG_BUILD_DIR)/utils/gen_ha1/gen_ha1 $(1)/usr/sbin/openser_gen_ha1
260 $(CP) $(PKG_BUILD_DIR)/scripts/sc $(1)/usr/sbin/openserctl
261 chmod 744 $(1)/usr/sbin/openserctl
262 $(CP) $(PKG_BUILD_DIR)/scripts/sc.dbtext $(1)/usr/sbin/dbtextctl
263 chmod 744 $(1)/usr/sbin/dbtextctl
264 $(INSTALL_DIR) $(1)/usr/lib/openser/modules
265 (cd $(PKG_BUILD_DIR);\
266 $(CP) $(OPENSER_MODULE_FILES) $(1)/usr/lib/openser/modules/; \
268 $(INSTALL_DIR) $(1)/etc/openser
269 $(CP) $(PKG_BUILD_DIR)/etc/openser.cfg $(1)/etc/openser/
273 define Package/$(1)/install
274 [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/openser/modules/
275 $(CP) $(PKG_BUILD_DIR)/modules/$(2)/$(2).so \
276 $$(1)/usr/lib/openser/modules/ ;
279 $$(eval $$(call BuildPackage,$(1)))
282 $(eval $(call BuildPackage,openser))
283 $(eval $(call BuildPlugin,openser-mod-acc,acc))
284 $(eval $(call BuildPlugin,openser-mod-auth,auth))
285 $(eval $(call BuildPlugin,openser-mod-auth-db,auth_db))
286 $(eval $(call BuildPlugin,openser-mod-auth-radius,auth_radius))
287 $(eval $(call BuildPlugin,openser-mod-avp-radius,avp_radius))
288 $(eval $(call BuildPlugin,openser-mod-avpops,avpops))
289 $(eval $(call BuildPlugin,openser-mod-dispatcher,dispatcher))
290 $(eval $(call BuildPlugin,openser-mod-diversion,diversion))
291 $(eval $(call BuildPlugin,openser-mod-flatstore,flatstore))
292 $(eval $(call BuildPlugin,openser-mod-gflags,gflags))
293 $(eval $(call BuildPlugin,openser-mod-group,group))
294 $(eval $(call BuildPlugin,openser-mod-group-radius,group_radius))
295 $(eval $(call BuildPlugin,openser-mod-lcr,lcr))
296 $(eval $(call BuildPlugin,openser-mod-mediaproxy,mediaproxy))
297 $(eval $(call BuildPlugin,openser-mod-msilo,msilo))
298 $(eval $(call BuildPlugin,openser-mod-mysql,mysql))
299 $(eval $(call BuildPlugin,openser-mod-nathelper,nathelper))
300 $(eval $(call BuildPlugin,openser-mod-options,options))
301 $(eval $(call BuildPlugin,openser-mod-pdt,pdt))
302 $(eval $(call BuildPlugin,openser-mod-permissions,permissions))
303 $(eval $(call BuildPlugin,openser-mod-pike,pike))
304 $(eval $(call BuildPlugin,openser-mod-sms,sms))
305 $(eval $(call BuildPlugin,openser-mod-speeddial,speeddial))
306 $(eval $(call BuildPlugin,openser-mod-uac,uac))
307 $(eval $(call BuildPlugin,openser-mod-uac-redirect,uac_redirect))
308 $(eval $(call BuildPlugin,openser-mod-uri,uri))
309 $(eval $(call BuildPlugin,openser-mod-uri-db,uri_db))
310 $(eval $(call BuildPlugin,openser-mod-uri-radius,uri_radius))
311 $(eval $(call BuildPlugin,openser-mod-xlog,xlog))