[package] update rrdtool to 1.2.30
[openwrt/svn-archive/archive.git] / net / asterisk-1.6.x / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=asterisk
12 PKG_VERSION:=1.6.1.0-rc3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
17 PKG_MD5SUM:=29c45a36653e15ef8e78f92a1de753b8
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/asterisk16/Default
22 SUBMENU:=asterisk16 (Complete Open Source PBX), v1.6.x
23 SECTION:=net
24 CATEGORY:=Network
25 URL:=http://www.asterisk.org/
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 CONFIGURE_ARGS+= \
94 --without-curl \
95 --without-curses \
96 --with-gsm=internal \
97 --without-gtk \
98 --without-gtk2 \
99 --without-isdnnet \
100 --without-kde \
101 --without-misdn \
102 --without-nbs \
103 --with-ncurses="$(STAGING_DIR)/usr" \
104 --without-netsnmp \
105 --without-newt \
106 --without-odbc \
107 --without-ogg \
108 --without-osptk \
109 --with-popt="$(STAGING_DIR)/usr" \
110 --without-pri \
111 --without-qt \
112 --without-radius \
113 --without-sdl \
114 --without-spandsp \
115 --without-suppserv \
116 --without-tds \
117 --without-termcap \
118 --without-tinfo \
119 --without-vorbis \
120 --without-vpb \
121 --with-z="$(STAGING_DIR)/usr" \
122
123 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-app-meetme),)
124 CONFIGURE_ARGS+= \
125 --with-dahdi="$(STAGING_DIR)/usr"
126 else
127 CONFIGURE_ARGS+= \
128 --without-dahdi
129 endif
130
131 EXTRA_CFLAGS:= $(TARGET_CPPFLAGS)
132 EXTRA_LDFLAGS:= $(TARGET_LDFLAGS)
133
134 define Build/Configure
135 -rm $(PKG_BUILD_DIR)/menuselect.makeopts
136 $(call Build/Configure/Default,,$(SITE_VARS))
137 endef
138
139 define Build/Compile
140 $(MAKE) -C "$(PKG_BUILD_DIR)" \
141 include/asterisk/version.h \
142 include/asterisk/buildopts.h defaults.h \
143 makeopts.embed_rules
144 ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY $(TARGET_CFLAGS)" \
145 ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
146 $(MAKE) -C "$(PKG_BUILD_DIR)" \
147 ASTVARLIBDIR="/usr/lib/asterisk" \
148 NOISY_BUILD="1" \
149 DEBUG="" \
150 OPTIMIZE="" \
151 DESTDIR="$(PKG_INSTALL_DIR)" \
152 all install samples
153 $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
154 endef
155
156 #define Build/InstallDev
157 # mkdir -p $(1)/usr/include/asterisk/
158 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/
159 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/
160 #endef
161
162 define Package/asterisk16/conffiles
163 /etc/asterisk/asterisk.conf
164 /etc/asterisk/modules.conf
165 /etc/asterisk/extensions.conf
166 /etc/asterisk/sip.conf
167 /etc/asterisk/sip_notify.conf
168 /etc/asterisk/features.conf
169 /etc/asterisk/logger.conf
170 /etc/asterisk/manager.conf
171 /etc/asterisk/rtp.conf
172 /etc/default/asterisk
173 /etc/init.d/asterisk
174 endef
175
176 define Package/asterisk16/install
177 $(INSTALL_DIR) $(1)/etc/asterisk
178 for f in asterisk extensions features \
179 logger manager modules \
180 sip sip_notify rtp; do \
181 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
182 done
183 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
184 for f in app_dial app_echo app_playback app_macro \
185 chan_sip \
186 codec_ulaw codec_gsm \
187 format_gsm format_pcm format_wav format_wav_gsm \
188 pbx_config \
189 func_strings func_timeout func_callerid; do \
190 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
191 done
192 $(INSTALL_DIR) $(1)/usr/sbin
193 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
194 $(INSTALL_DIR) $(1)/etc/default
195 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
196 $(INSTALL_DIR) $(1)/etc/init.d
197 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
198 endef
199
200 define Package/asterisk16-sounds/install
201 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
202 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
203 rm -f $(1)/usr/lib/asterisk/sounds/vm-*
204 rm -f $(1)/usr/lib/asterisk/sounds/conf-*
205 endef
206
207
208 define Package/asterisk16-voicemail/conffiles
209 /etc/asterisk/voicemail.conf
210 endef
211
212 define Package/asterisk16-voicemail/install
213 $(INSTALL_DIR) $(1)/etc/asterisk
214 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
215 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
216 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
217 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
218 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
219 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
220 endef
221
222 define Package/asterisk16-app-meetme/conffiles
223 /etc/asterisk/meetme.conf
224 endef
225
226 define Package/asterisk16-app-meetme/install
227 $(INSTALL_DIR) $(1)/etc/asterisk
228 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
229 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
230 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
231 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_dahdi.so $(1)/usr/lib/asterisk/modules/
232 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
233 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/conf-*.gsm $(1)/usr/lib/asterisk/sounds/
234 endef
235
236 define Package/asterisk16-chan-iax2/conffiles
237 /etc/asterisk/iax.conf
238 /etc/asterisk/iaxprov.conf
239 endef
240
241 define Package/asterisk16-chan-iax2/install
242 $(INSTALL_DIR) $(1)/etc/asterisk
243 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iax.conf $(1)/etc/asterisk/
244 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iaxprov.conf $(1)/etc/asterisk/
245 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
246 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_iax2.so $(1)/usr/lib/asterisk/modules/
247 endef
248
249 $(eval $(call BuildPackage,asterisk16))
250 $(eval $(call BuildPackage,asterisk16-voicemail))
251 $(eval $(call BuildPackage,asterisk16-sounds))
252 #$(eval $(call BuildPackage,asterisk16-app-meetme))
253 $(eval $(call BuildPackage,asterisk16-chan-iax2))