]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/asterisk
Updated Asterisk and added chan_capi + capi4k-utils.
[ipfire-2.x.git] / lfs / asterisk
CommitLineData
5e69ef1a 1###############################################################################
5e69ef1a 2# #
70df8302
MT
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
5e69ef1a 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
5e69ef1a
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
5e69ef1a
MT
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
5e69ef1a
MT
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
83bac7f3 27VER = 1.4.18
5e69ef1a
MT
28
29THISAPP = asterisk-$(VER)
30DL_FILE = $(THISAPP).tar.gz
1751628e 31DL_FROM = $(URL_IPFIRE)
5e69ef1a
MT
32DIR_APP = $(DIR_SRC)/$(THISAPP)
33TARGET = $(DIR_INFO)/$(THISAPP)
a8b159e7 34PROG = asterisk
42dc0090 35PAK_VER = 2
5e69ef1a 36
83bac7f3
MT
37CHAN_CAPI = chan_capi-1.0.2
38
5609904b 39DEPS = "sox zaptel libpri spandsp libmad"
3489ebac 40
5e69ef1a
MT
41###############################################################################
42# Top-level Rules
43###############################################################################
44
45objects = $(DL_FILE) \
61d0d586 46 asterisk-1.4-de-prompts.tar.gz \
83bac7f3
MT
47 asterisk-core-sounds-en-alaw-1.4.8.tar.gz \
48 asterisk-extra-sounds-en-alaw-1.4.7.tar.gz \
49 asterisk-addons-1.4.5.tar.gz \
50 $(CHAN_CAPI).tar.gz
5e69ef1a
MT
51
52$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
83bac7f3
MT
53asterisk-core-sounds-en-alaw-1.4.8.tar.gz = $(URL_IPFIRE)/asterisk-core-sounds-en-alaw-1.4.8.tar.gz
54asterisk-extra-sounds-en-alaw-.1.4.7.tar.gz = $(URL_IPFIRE)/asterisk-extra-sounds-en-alaw-1.4.7.tar.gz
61d0d586 55asterisk-1.4-de-prompts.tar.gz = $(URL_IPFIRE)/asterisk-1.4-de-prompts.tar.gz
83bac7f3
MT
56asterisk-addons-1.4.5.tar.gz = $(URL_IPFIRE)/asterisk-addons-1.4.5.tar.gz
57$(CHAN_CAPI).tar.gz = $(URL_IPFIRE)/$(CHAN_CAPI).tar.gz
5e69ef1a 58
83bac7f3
MT
59$(DL_FILE)_MD5 = 3d8b2b2ef4f202901771663b40f19c3d
60asterisk-core-sounds-en-alaw-1.4.8.tar.gz_MD5 = e708a5510a61217725b6ad663287dfa0
61asterisk-extra-sounds-en-alaw-1.4.7.tar.gz_MD5 = ecc50bd2b9b29d8237911272248c5d35
61d0d586 62asterisk-1.4-de-prompts.tar.gz_MD5 = 626a2b95071a5505851e43874dfbfd5c
83bac7f3
MT
63asterisk-addons-1.4.5.tar.gz_MD5 = 8de9922c0a93321941f29a77a2f1bf13
64$(CHAN_CAPI).tar.gz_MD5 = d4732ecc008e8ef45c38bd2f4d70ef44
5e69ef1a
MT
65
66install : $(TARGET)
67
68check : $(patsubst %,$(DIR_CHK)/%,$(objects))
69
70download :$(patsubst %,$(DIR_DL)/%,$(objects))
71
72md5 : $(subst %,%_MD5,$(objects))
73
74dist:
61d0d586 75 $(PAK)
5e69ef1a
MT
76
77###############################################################################
78# Downloading, checking, md5sum
79###############################################################################
80
81$(patsubst %,$(DIR_CHK)/%,$(objects)) :
82 @$(CHECK)
83
84$(patsubst %,$(DIR_DL)/%,$(objects)) :
85 @$(LOAD)
86
87$(subst %,%_MD5,$(objects)) :
88 @$(MD5)
89
90###############################################################################
91# Installation Details
92###############################################################################
93
94$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
95 @$(PREBUILD)
83bac7f3 96 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-* $(DIR_SRC)/$(CHAN_CAPI) && \
61d0d586 97 cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
6f61f8c6 98 cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/var/ipfire
61d0d586
MT
99 cd $(DIR_APP) && cp -fv $(DIR_SRC)/config/asterisk/asterisk.makeopts \
100 menuselect.makeopts
83bac7f3
MT
101 cd $(DIR_APP) && cp -fv $(DIR_DL)/asterisk-core-sounds-en-alaw-1.4.8.tar.gz \
102 $(DIR_APP)/sounds/asterisk-core-sounds-en-alaw-1.4.8.tar.gz
103 cd $(DIR_APP) && cp -fv $(DIR_DL)/asterisk-extra-sounds-en-alaw-1.4.7.tar.gz \
104 $(DIR_APP)/sounds/asterisk-extra-sounds-en-alaw-1.4.7.tar.gz
6f61f8c6
MT
105 cd $(DIR_APP) && make $(MAKETUNING) all
106 cd $(DIR_APP) && make install
107 cd $(DIR_APP) && make samples
83bac7f3 108 cd $(DIR_SRC) && tar zxf $(DIR_DL)/asterisk-addons-1.4.5.tar.gz
61d0d586
MT
109 cd $(DIR_SRC)/asterisk-addons-* && ./configure --prefix=/usr \
110 --sysconfdir=/var/ipfire
111 cd $(DIR_SRC)/asterisk-addons-* && cp -f $(DIR_SRC)/config/asterisk/addons.makeopts \
112 menuselect.makeopts
6f61f8c6 113 cd $(DIR_SRC)/asterisk-addons-* && make $(MAKETUNING) all install
61d0d586
MT
114 tar xfz $(DIR_DL)/asterisk-1.4-de-prompts.tar.gz -C /var/lib/asterisk/sounds/
115 -rm -f /var/lib/asterisk/sounds/README.txt
116 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-*
42dc0090
CS
117 -mkdir -p /var/ipfire/asterisk
118 cp -vrf $(DIR_SRC)/config/asterisk/* /var/ipfire/asterisk/
119 chmod o+w /var/ipfire/asterisk
6257cba2 120 chown nobody:nobody -R /var/ipfire/asterisk
42dc0090 121 ln -f -s /var/ipfire/asterisk/wakeup/wakeup.sh /etc/fcron.minutely/wakeup.sh
83bac7f3
MT
122
123 cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(CHAN_CAPI).tar.gz
124 cd $(DIR_SRC)/$(CHAN_CAPI) && make $(MAKETUNING)
125 cd $(DIR_SRC)/$(CHAN_CAPI) && make install
126
127 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-* $(DIR_SRC)/$(CHAN_CAPI)
5e69ef1a 128 @$(POSTBUILD)