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
25 TITLE:=Configurable, free SIP server
26 URL:=http://www.openser.org
30 define Package/openser/conffiles
31 /etc/openser/openser.cfg
34 define Package/openser-mod-acc
38 TITLE:=Accounting support
42 define Package/openser-mod-auth
46 TITLE:=Authentication support
49 define Package/openser-mod-auth-db
53 TITLE:=Authentication with database support
56 define Package/openser-mod-auth-radius
59 DEPENDS:=openser +libradiusclient-ng
60 TITLE:=Authentication with RADIUS support
63 define Package/openser-mod-avp-radius
66 DEPENDS:=openser +libradiusclient-ng
67 TITLE:=AVP with RADIUS support
70 define Package/openser-mod-avpops
74 TITLE:=AVP options support
77 define Package/openser-mod-dispatcher
81 TITLE:=Dispatcher support
84 define Package/openser-mod-diversion
88 TITLE:=Diversion support
91 define Package/openser-mod-flatstore
95 TITLE:=Flatstore support
98 define Package/openser-mod-gflags
102 TITLE:=Gflags support
105 define Package/openser-mod-group
112 define Package/openser-mod-group-radius
115 DEPENDS:=openser +libradiusclient-ng
116 TITLE:=Group with RADIUS support
119 define Package/openser-mod-lcr
122 DEPENDS:=openser openser-mod-mysql
123 TITLE:=Least Cost Routing support
126 define Package/openser-mod-mediaproxy
130 TITLE:=Mediaproxy support
133 define Package/openser-mod-msilo
140 define Package/openser-mod-mysql
143 DEPENDS:=openser +libmysqlclient
147 define Package/openser-mod-nathelper
151 TITLE:=NAT helper support
154 define Package/openser-mod-options
158 TITLE:=Options support
161 define Package/openser-mod-pdt
168 define Package/openser-mod-permissions
172 TITLE:=Permissions support
175 define Package/openser-mod-pike
182 define Package/openser-mod-sms
189 define Package/openser-mod-speeddial
193 TITLE:=Speeddial supporte
196 define Package/openser-mod-uac
203 define Package/openser-mod-uac-redirect
207 TITLE:=UAC with redirect support
210 define Package/openser-mod-uri
217 define Package/openser-mod-uri-db
220 DEPENDS:=openser +openser-mod-mysql
221 TITLE:=URI with database support
224 define Package/openser-mod-uri-radius
227 DEPENDS:=openser +libradiusclient-ng
228 TITLE:=URI with RADIUS support
231 define Package/openser-mod-xlog
235 TITLE:=Advanced logging support
238 # Select here the modules for the ipk package
239 OPENSER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops exec
241 OPENSER_MODULE_FILES := $(foreach module,$(OPENSER_MODULES),modules/$(module)/$(module).so)
242 OPENSER_MODULES := $(patsubst %,modules/%,$(OPENSER_MODULES))
245 $(MAKE) -C $(PKG_BUILD_DIR) \
247 extra_defs="-DUSE_PTHREAD_MUTEX " \
250 CFLAGS="$(TARGET_CFLAGS)" \
251 LOCALBASE="$(STAGING_DIR)/usr" \
252 all utils/gen_ha1/gen_ha1
255 define Package/openser/install
256 $(INSTALL_DIR) $(1)/usr/sbin
257 $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
258 $(CP) $(PKG_BUILD_DIR)/utils/gen_ha1/gen_ha1 $(1)/usr/sbin/openser_gen_ha1
259 $(CP) $(PKG_BUILD_DIR)/scripts/sc $(1)/usr/sbin/openserctl
260 chmod 744 $(1)/usr/sbin/openserctl
261 $(CP) $(PKG_BUILD_DIR)/scripts/sc.dbtext $(1)/usr/sbin/dbtextctl
262 chmod 744 $(1)/usr/sbin/dbtextctl
263 $(INSTALL_DIR) $(1)/usr/lib/openser/modules
264 (cd $(PKG_BUILD_DIR);\
265 $(CP) $(OPENSER_MODULE_FILES) $(1)/usr/lib/openser/modules/; \
267 $(INSTALL_DIR) $(1)/etc/openser
268 $(CP) $(PKG_BUILD_DIR)/etc/openser.cfg $(1)/etc/openser/
272 define Package/$(1)/install
273 [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/openser/modules/
274 $(CP) $(PKG_BUILD_DIR)/modules/$(2)/$(2).so \
275 $$(1)/usr/lib/openser/modules/ ;
278 $$(eval $$(call BuildPackage,$(1)))
281 $(eval $(call BuildPackage,openser))
282 $(eval $(call BuildPlugin,openser-mod-acc,acc))
283 $(eval $(call BuildPlugin,openser-mod-auth,auth))
284 $(eval $(call BuildPlugin,openser-mod-auth-db,auth_db))
285 $(eval $(call BuildPlugin,openser-mod-auth-radius,auth_radius))
286 $(eval $(call BuildPlugin,openser-mod-avp-radius,avp_radius))
287 $(eval $(call BuildPlugin,openser-mod-avpops,avpops))
288 $(eval $(call BuildPlugin,openser-mod-dispatcher,dispatcher))
289 $(eval $(call BuildPlugin,openser-mod-diversion,diversion))
290 $(eval $(call BuildPlugin,openser-mod-flatstore,flatstore))
291 $(eval $(call BuildPlugin,openser-mod-gflags,gflags))
292 $(eval $(call BuildPlugin,openser-mod-group,group))
293 $(eval $(call BuildPlugin,openser-mod-group-radius,group_radius))
294 $(eval $(call BuildPlugin,openser-mod-lcr,lcr))
295 $(eval $(call BuildPlugin,openser-mod-mediaproxy,mediaproxy))
296 $(eval $(call BuildPlugin,openser-mod-msilo,msilo))
297 $(eval $(call BuildPlugin,openser-mod-mysql,mysql))
298 $(eval $(call BuildPlugin,openser-mod-nathelper,nathelper))
299 $(eval $(call BuildPlugin,openser-mod-options,options))
300 $(eval $(call BuildPlugin,openser-mod-pdt,pdt))
301 $(eval $(call BuildPlugin,openser-mod-permissions,permissions))
302 $(eval $(call BuildPlugin,openser-mod-pike,pike))
303 $(eval $(call BuildPlugin,openser-mod-sms,sms))
304 $(eval $(call BuildPlugin,openser-mod-speeddial,speeddial))
305 $(eval $(call BuildPlugin,openser-mod-uac,uac))
306 $(eval $(call BuildPlugin,openser-mod-uac-redirect,uac_redirect))
307 $(eval $(call BuildPlugin,openser-mod-uri,uri))
308 $(eval $(call BuildPlugin,openser-mod-uri-db,uri_db))
309 $(eval $(call BuildPlugin,openser-mod-uri-radius,uri_radius))
310 $(eval $(call BuildPlugin,openser-mod-xlog,xlog))