[packages] bump release number for packages modified after 0.03
[openwrt/svn-archive/archive.git] / net / asterisk-1.6.x / Makefile
1 #
2 # Copyright (C) 2008-2010 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:=asterisk
11 PKG_VERSION:=1.6.2.6
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
16 PKG_MD5SUM:=f068ef2433eebdc7f6dd635986f36d77
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/asterisk16/Default
21 SUBMENU:=asterisk16 (Complete Open Source PBX), v1.6.x
22 SECTION:=net
23 CATEGORY:=Network
24 URL:=http://www.asterisk.org/
25 MAINTAINER:=Hans Zandbelt <hans.zandbelt@gmail.com>
26 endef
27
28 define Package/asterisk16/Default/description
29 Asterisk is a complete PBX in software. It provides all of the features
30 you would expect from a PBX and more. Asterisk does voice over IP in three
31 protocols, and can interoperate with almost all standards-based telephony
32 equipment using relatively inexpensive hardware.
33 endef
34
35
36 define Package/asterisk16
37 $(call Package/asterisk16/Default)
38 TITLE:=Complete open source PBX
39 DEPENDS:= +libopenssl +libncurses +libpopt +libpthread +zlib @!TARGET_avr32 @!PACKAGE_asterisk14
40 endef
41
42 define Package/asterisk16/description
43 $(call Package/asterisk16/Default/description)
44 endef
45
46 define Package/asterisk16-sounds
47 $(call Package/asterisk16/Default)
48 TITLE:=Sound files
49 DEPENDS:= +asterisk16
50 endef
51
52 define Package/asterisk16-sounds/description
53 $(call Package/asterisk16/Default/description)
54 This package contains sound files for Asterisk.
55 endef
56
57
58 define Package/asterisk16-voicemail
59 $(call Package/asterisk16/Default)
60 TITLE:=Voicemail support
61 DEPENDS:= +asterisk16
62 endef
63
64 define Package/asterisk16-voicemail/description
65 $(call Package/asterisk16/Default/description)
66 This package contains voicemail related modules for Asterisk.
67 endef
68
69 define Package/asterisk16-app-meetme
70 $(call Package/asterisk16/Default)
71 TITLE:=conferencing support
72 DEPENDS:= +asterisk16 +dahdi-tools-libtonezone +kmod-dahdi-linux
73 endef
74
75 define Package/asterisk16-app-meetme/description
76 $(call Package/asterisk16/Default/description)
77 This package provides the MeetMe application driver Conferencing support to
78 Asterisk.
79 endef
80
81 define Package/asterisk16-chan-iax2
82 $(call Package/asterisk16/Default)
83 TITLE:=IAX support
84 DEPENDS:= +asterisk16
85 endef
86
87 define Package/asterisk16-chan-iax2/description
88 $(call Package/asterisk16/Default/description)
89 This package provides IAX support to
90 Asterisk.
91 endef
92
93 define Package/asterisk16-cdr
94 $(call Package/asterisk16/Default)
95 TITLE:=CDR support
96 DEPENDS:= +asterisk16
97 endef
98
99 define Package/asterisk16-cdr/description
100 $(call Package/asterisk16/Default/description)
101 This package provides Call Detail Record support to
102 Asterisk.
103 endef
104
105 define Package/asterisk16-res-musiconhold
106 $(call Package/asterisk16/Default)
107 TITLE:=MOH support
108 DEPENDS:= +asterisk16
109 endef
110
111 define Package/asterisk16-res-musiconhold/description
112 $(call Package/asterisk16/Default/description)
113 This package provides Music On Hold support to
114 Asterisk.
115 endef
116
117 define Package/asterisk16-chan-gtalk
118 $(call Package/asterisk16/Default)
119 TITLE:=GTalk support
120 DEPENDS:= +asterisk16 +libiksemel
121 endef
122
123 define Package/asterisk16-chan-gtalk/description
124 $(call Package/asterisk16/Default/description)
125 This package provides the channel chan_gtalk and res_jabber for GTalk
126 support to Asterisk.
127 endef
128
129 CONFIGURE_ARGS+= \
130 --without-curl \
131 --without-curses \
132 --with-gsm=internal \
133 --without-gtk \
134 --without-gtk2 \
135 --without-isdnnet \
136 --without-kde \
137 --without-misdn \
138 --without-nbs \
139 --with-ncurses="$(STAGING_DIR)/usr" \
140 --without-netsnmp \
141 --without-newt \
142 --without-odbc \
143 --without-ogg \
144 --without-osptk \
145 --with-popt="$(STAGING_DIR)/usr" \
146 --without-pri \
147 --without-qt \
148 --without-radius \
149 --without-sdl \
150 --without-spandsp \
151 --without-suppserv \
152 --without-tds \
153 --without-termcap \
154 --without-tinfo \
155 --without-vorbis \
156 --without-vpb \
157 --with-z="$(STAGING_DIR)/usr" \
158 --disable-xmldoc \
159
160 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-app-meetme),)
161 CONFIGURE_ARGS+= \
162 --with-dahdi="$(STAGING_DIR)/usr"
163 else
164 CONFIGURE_ARGS+= \
165 --without-dahdi
166 endif
167
168 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-chan-gtalk),)
169 CONFIGURE_ARGS+= \
170 --with-gnutls="$(STAGING_DIR)/usr" \
171 --with-iksemel="$(STAGING_DIR)/usr"
172 SITE_VARS+= \
173 ac_cv_lib_iksemel_iks_start_sasl=yes \
174 ac_cv_lib_gnutls_gnutls_bye=yes
175 else
176 CONFIGURE_ARGS+= \
177 --without-gnutls \
178 --without-iksemel
179 endif
180
181 EXTRA_CFLAGS:= $(TARGET_CPPFLAGS)
182 EXTRA_LDFLAGS:= $(TARGET_LDFLAGS)
183
184 define Build/Configure
185 -rm $(PKG_BUILD_DIR)/menuselect.makeopts
186 $(call Build/Configure/Default,,$(SITE_VARS))
187 endef
188
189 define Build/Compile
190 $(MAKE) -C "$(PKG_BUILD_DIR)" \
191 include/asterisk/version.h \
192 include/asterisk/buildopts.h defaults.h \
193 makeopts.embed_rules
194 ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY $(TARGET_CFLAGS)" \
195 ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
196 $(MAKE) -C "$(PKG_BUILD_DIR)" \
197 ASTVARLIBDIR="/usr/lib/asterisk" \
198 NOISY_BUILD="1" \
199 DEBUG="" \
200 OPTIMIZE="" \
201 DESTDIR="$(PKG_INSTALL_DIR)" \
202 all install samples
203 $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
204 endef
205
206 #define Build/InstallDev
207 # $(INSTALL_DIR) $(1)/usr/include/asterisk/
208 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/
209 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/
210 #endef
211
212 define Package/asterisk16/conffiles
213 /etc/asterisk/asterisk.conf
214 /etc/asterisk/modules.conf
215 /etc/asterisk/extensions.conf
216 /etc/asterisk/sip.conf
217 /etc/asterisk/sip_notify.conf
218 /etc/asterisk/features.conf
219 /etc/asterisk/indications.conf
220 /etc/asterisk/logger.conf
221 /etc/asterisk/manager.conf
222 /etc/asterisk/rtp.conf
223 /etc/default/asterisk
224 /etc/init.d/asterisk
225 endef
226
227 define Package/asterisk16/install
228 $(INSTALL_DIR) $(1)/etc/asterisk
229 for f in asterisk extensions features \
230 indications logger manager modules \
231 sip sip_notify rtp; do \
232 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
233 done
234 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
235 for f in app_dial app_echo app_playback app_macro \
236 chan_sip \
237 codec_ulaw codec_gsm \
238 format_gsm format_pcm format_wav format_wav_gsm \
239 pbx_config \
240 func_strings func_timeout func_callerid; do \
241 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
242 done
243 $(INSTALL_DIR) $(1)/usr/sbin
244 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
245 $(INSTALL_DIR) $(1)/etc/default
246 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
247 $(INSTALL_DIR) $(1)/etc/init.d
248 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
249 endef
250
251 define Package/asterisk16-sounds/install
252 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
253 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
254 rm -f $(1)/usr/lib/asterisk/sounds/vm-*
255 rm -f $(1)/usr/lib/asterisk/sounds/conf-*
256 endef
257
258
259 define Package/asterisk16-voicemail/conffiles
260 /etc/asterisk/voicemail.conf
261 endef
262
263 define Package/asterisk16-voicemail/install
264 $(INSTALL_DIR) $(1)/etc/asterisk
265 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
266 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
267 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
268 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
269 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
270 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
271 endef
272
273 define Package/asterisk16-app-meetme/conffiles
274 /etc/asterisk/meetme.conf
275 endef
276
277 define Package/asterisk16-app-meetme/install
278 $(INSTALL_DIR) $(1)/etc/asterisk
279 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
280 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
281 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
282 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_dahdi.so $(1)/usr/lib/asterisk/modules/
283 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
284 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/conf-*.gsm $(1)/usr/lib/asterisk/sounds/
285 endef
286
287 define Package/asterisk16-chan-iax2/conffiles
288 /etc/asterisk/iax.conf
289 /etc/asterisk/iaxprov.conf
290 endef
291
292 define Package/asterisk16-cdr/conffiles
293 /etc/asterisk/cdr.conf
294 /etc/asterisk/cdr_custom.conf
295 /etc/asterisk/cdr_manager.conf
296 /etc/asterisk/cdr_odbc.conf
297 /etc/asterisk/cdr_pgsql.conf
298 /etc/asterisk/cdr_tds.conf
299 endef
300
301 define Package/asterisk16-res-musiconhold/conffiles
302 /etc/asterisk/musiconhold.conf
303 endef
304
305 define Package/asterisk16-chan-iax2/install
306 $(INSTALL_DIR) $(1)/etc/asterisk
307 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iax.conf $(1)/etc/asterisk/
308 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iaxprov.conf $(1)/etc/asterisk/
309 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
310 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_iax2.so $(1)/usr/lib/asterisk/modules/
311 endef
312
313 define Package/asterisk16-cdr/install
314 $(INSTALL_DIR) $(1)/etc/asterisk
315 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr*.conf $(1)/etc/asterisk/
316 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
317 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*cdr*.so $(1)/usr/lib/asterisk/modules/
318 endef
319
320 define Package/asterisk16-res-musiconhold/install
321 $(INSTALL_DIR) $(1)/etc/asterisk
322 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf $(1)/etc/asterisk/
323 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
324 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_musiconhold.so $(1)/usr/lib/asterisk/modules/
325 endef
326
327 define Package/asterisk16-chan-gtalk/conffiles
328 /etc/asterisk/gtalk.conf
329 /etc/asterisk/jabber.conf
330 endef
331
332 define Package/asterisk16-chan-gtalk/install
333 $(INSTALL_DIR) $(1)/etc/asterisk
334 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
335 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
336 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
337 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
338 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
339 endef
340
341 define BuildAsterisk16ModuleTemplate
342
343 define Package/asterisk16-$(subst _,-,$(1))
344 $$(call Package/asterisk16/Default)
345 TITLE:=$(2) support
346 DEPENDS:= +asterisk16
347 endef
348
349 define Package/asterisk16-$(subst _,-,$(1))/description
350 $$(call Package/asterisk16/Default/description)
351 This package provides support $(3) in Asterisk.
352 endef
353
354 define Package/asterisk16-$(subst _,-,$(1))/install
355 $(INSTALL_DIR) $$(1)/usr/lib/asterisk/modules
356 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$(1).so $$(1)/usr/lib/asterisk/modules/
357 endef
358
359 $$(eval $$(call BuildPackage,asterisk16-$(subst _,-,$(1))))
360 endef
361
362 $(eval $(call BuildPackage,asterisk16))
363 $(eval $(call BuildPackage,asterisk16-voicemail))
364 $(eval $(call BuildPackage,asterisk16-sounds))
365 #$(eval $(call BuildPackage,asterisk16-app-meetme))
366 $(eval $(call BuildPackage,asterisk16-chan-iax2))
367 $(eval $(call BuildPackage,asterisk16-cdr))
368 $(eval $(call BuildPackage,asterisk16-res-musiconhold))
369 $(eval $(call BuildPackage,asterisk16-chan-gtalk))
370 $(eval $(call BuildAsterisk16ModuleTemplate,app_authenticate,Authenticate,support for executing arbitrary authenticate commands))
371 $(eval $(call BuildAsterisk16ModuleTemplate,app_chanisavail,Channel availability check,support for checking if a channel is available))
372 $(eval $(call BuildAsterisk16ModuleTemplate,app_chanspy,Channel listen in,support for listening in on any channel))
373 $(eval $(call BuildAsterisk16ModuleTemplate,app_directed_pickup,Directed call pickup,support for directed call pickup))
374 $(eval $(call BuildAsterisk16ModuleTemplate,app_exec,Exec application,support for application execution))
375 $(eval $(call BuildAsterisk16ModuleTemplate,app_minivm,Minimal voicemail system,a voicemail system in small building blocks working together based on the Comedian Mail voicemail system))
376 $(eval $(call BuildAsterisk16ModuleTemplate,app_readexten,Extension to variable,a trivial application to read an extension into a variable))
377 $(eval $(call BuildAsterisk16ModuleTemplate,app_read,Variable read,a trivial application to read a variable))
378 $(eval $(call BuildAsterisk16ModuleTemplate,app_sayunixtime,Say Unix time,an application to say Unix time))
379 $(eval $(call BuildAsterisk16ModuleTemplate,app_sms,SMS,SMS support (ETSI ES 201 912 protocol 1)))
380 $(eval $(call BuildAsterisk16ModuleTemplate,app_stack,Stack applications, stack applications Gosub Return etc.))
381 $(eval $(call BuildAsterisk16ModuleTemplate,app_system,System exec,support for executing system commands))
382 $(eval $(call BuildAsterisk16ModuleTemplate,app_talkdetect,File playback with audio detect,for file playback with audio detect))
383 $(eval $(call BuildAsterisk16ModuleTemplate,app_waituntil,Sleep,support sleeping until the given epoch))
384 $(eval $(call BuildAsterisk16ModuleTemplate,app_while,While loop,a while loop implementation))
385 $(eval $(call BuildAsterisk16ModuleTemplate,chan_agent,Agents proxy channel, an implementation of agents proxy channel))
386 $(eval $(call BuildAsterisk16ModuleTemplate,chan_local,Local proxy channel, an implementation of local proxy channel))
387 $(eval $(call BuildAsterisk16ModuleTemplate,codec_ulaw,Signed linear to ulaw translation,translation between signed linear and ulaw codecs))
388 $(eval $(call BuildAsterisk16ModuleTemplate,codec_a_mu,Alaw to ulaw translation,translation between alaw and ulaw codecs))
389 $(eval $(call BuildAsterisk16ModuleTemplate,codec_g726,Signed linear to G.726 translation,translation between signed linear and ITU G.726-32kbps codecs))
390 $(eval $(call BuildAsterisk16ModuleTemplate,format_g726,G.726,support for headerless G.726 16/24/32/40kbps data format))
391 $(eval $(call BuildAsterisk16ModuleTemplate,format_g729,G.729,support for raw headerless G729 data))
392 $(eval $(call BuildAsterisk16ModuleTemplate,format_sln,Raw slinear format,support for raw slinear format))
393 $(eval $(call BuildAsterisk16ModuleTemplate,format_sln16,Raw slinear 16 format,support for Raw slinear 16 format))
394 $(eval $(call BuildAsterisk16ModuleTemplate,func_db,Database interaction,functions for interaction with the database))
395 $(eval $(call BuildAsterisk16ModuleTemplate,func_devstate,Blinky lights control,functions for manually controlled blinky lights))
396 $(eval $(call BuildAsterisk16ModuleTemplate,func_vmcount,vmcount dialplan,a vmcount dialplan function))
397 $(eval $(call BuildAsterisk16ModuleTemplate,func_extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control))
398 $(eval $(call BuildAsterisk16ModuleTemplate,func_global,Global variable,global variable dialplan functions))
399 $(eval $(call BuildAsterisk16ModuleTemplate,func_shell,Shell,support for shell execution))
400 $(eval $(call BuildAsterisk16ModuleTemplate,pbx_ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic))
401 $(eval $(call BuildAsterisk16ModuleTemplate,res_ael_share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules))
402 $(eval $(call BuildAsterisk16ModuleTemplate,res_agi,Asterisk Gateway Interface,support for the Asterisk Gateway Interface extension))