]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - lfs/asterisk
strongswan: update to 4.6.3.
[people/teissler/ipfire-2.x.git] / lfs / asterisk
CommitLineData
5e69ef1a 1###############################################################################
5e69ef1a 2# #
70df8302 3# IPFire.org - A linux based firewall #
821f9f50 4# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
70df8302
MT
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
eb5b3f95 27VER = 1.4.42
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
eb5b3f95 35PAK_VER = 6
5e69ef1a 36
b6541fec 37CHAN_CAPI = chan_capi-1.1.4
83bac7f3 38
980245eb 39DEPS = "libpri libtiff libvorbis libogg spandsp netsnmpd"
3489ebac 40
5e69ef1a
MT
41###############################################################################
42# Top-level Rules
43###############################################################################
44
45objects = $(DL_FILE) \
980245eb 46 asterisk-1.4-de-prompts.tar.gz \
eb5b3f95
AF
47 asterisk-core-sounds-en-gsm-1.4.22.tar.gz \
48 asterisk-extra-sounds-en-gsm-1.4.11.tar.gz \
49 asterisk-moh-opsound-gsm-2.03.tar.gz \
50 asterisk-addons-1.4.13.tar.gz \
980245eb 51 $(CHAN_CAPI).tar.gz
5e69ef1a
MT
52
53$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
eb5b3f95
AF
54asterisk-core-sounds-en-gsm-1.4.22.tar.gz = $(URL_IPFIRE)/asterisk-core-sounds-en-gsm-1.4.22.tar.gz
55asterisk-extra-sounds-en-gsm-1.4.11.tar.gz = $(URL_IPFIRE)/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz
56asterisk-moh-opsound-gsm-2.03.tar.gz = $(URL_IPFIRE)/asterisk-moh-opsound-gsm-2.03.tar.gz
61d0d586 57asterisk-1.4-de-prompts.tar.gz = $(URL_IPFIRE)/asterisk-1.4-de-prompts.tar.gz
eb5b3f95 58asterisk-addons-1.4.13.tar.gz = $(URL_IPFIRE)/asterisk-addons-1.4.13.tar.gz
83bac7f3 59$(CHAN_CAPI).tar.gz = $(URL_IPFIRE)/$(CHAN_CAPI).tar.gz
5e69ef1a 60
eb5b3f95
AF
61$(DL_FILE)_MD5 = 332f2f67e0eefe84b1e55320eab45166
62asterisk-core-sounds-en-gsm-1.4.22.tar.gz_MD5 = 2a99a45c0675135255bc65796b12f7c6
63asterisk-extra-sounds-en-gsm-1.4.11.tar.gz_MD5 = 5479cb4cb81d678304d96f35e4933a11
64asterisk-moh-opsound-gsm-2.03.tar.gz_MD5 = 09066f55f1358f298bc1a6e4678a3ddf
61d0d586 65asterisk-1.4-de-prompts.tar.gz_MD5 = 626a2b95071a5505851e43874dfbfd5c
eb5b3f95 66asterisk-addons-1.4.13.tar.gz_MD5 = e59471b6f25901a82e45b9e5e0c73703
b6541fec 67$(CHAN_CAPI).tar.gz_MD5 = 18fa835e724b7814deafbfa5b8cb01eb
5e69ef1a
MT
68
69install : $(TARGET)
70
71check : $(patsubst %,$(DIR_CHK)/%,$(objects))
72
73download :$(patsubst %,$(DIR_DL)/%,$(objects))
74
75md5 : $(subst %,%_MD5,$(objects))
76
77dist:
61d0d586 78 $(PAK)
5e69ef1a
MT
79
80###############################################################################
81# Downloading, checking, md5sum
82###############################################################################
83
84$(patsubst %,$(DIR_CHK)/%,$(objects)) :
85 @$(CHECK)
86
87$(patsubst %,$(DIR_DL)/%,$(objects)) :
88 @$(LOAD)
89
90$(subst %,%_MD5,$(objects)) :
91 @$(MD5)
92
93###############################################################################
94# Installation Details
95###############################################################################
96
97$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
98 @$(PREBUILD)
b6541fec
AF
99
100 # remove old directories and extract asterisk
101 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-* $(DIR_SRC)/$(CHAN_CAPI) $(DIR_SRC)/agx-ast-addons && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
102
103 # confiure asterisk
6f61f8c6 104 cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/var/ipfire
b6541fec
AF
105
106 # enable additional features (include following sound-tars)
107 cd $(DIR_APP) && cp -fv $(DIR_SRC)/config/asterisk/asterisk.makeopts menuselect.makeopts
108
109 # add additional sounds
eb5b3f95
AF
110 cd $(DIR_APP) && cp -fv $(DIR_DL)/asterisk-core-sounds-en-gsm-1.4.22.tar.gz $(DIR_APP)/sounds/
111 cd $(DIR_APP) && cp -fv $(DIR_DL)/asterisk-extra-sounds-en-gsm-1.4.11.tar.gz $(DIR_APP)/sounds/
112 cd $(DIR_APP) && cp -fv $(DIR_DL)/asterisk-moh-opsound-gsm-2.03.tar.gz $(DIR_APP)/sounds/
b6541fec 113
eb5b3f95
AF
114 # Fix wrong cpu optimization (march=armv5tel)
115 cd $(DIR_APP) && sed -i -e "s|^PROC=armv5te.*|PROC=armv5te|g" makeopts
116
117 # Add armv5te to gsm codecs
118 cd $(DIR_APP) && sed -i -e "s|armv5b |*armv5te |g" codecs/gsm/Makefile
821f9f50 119
b6541fec 120 # compile and install
6f61f8c6
MT
121 cd $(DIR_APP) && make $(MAKETUNING) all
122 cd $(DIR_APP) && make install
123 cd $(DIR_APP) && make samples
b6541fec
AF
124
125 # extract and configure asterisk-addons
eb5b3f95 126 cd $(DIR_SRC) && tar zxf $(DIR_DL)/asterisk-addons-1.4.13.tar.gz
b6541fec
AF
127 cd $(DIR_SRC)/asterisk-addons-* && ./configure --prefix=/usr --sysconfdir=/var/ipfire
128 # enable additional features (--> NOT NEEDED, DEFAULT CONFIG INCLUDES ALL)
129 #cd $(DIR_SRC)/asterisk-addons-* && cp -f $(DIR_SRC)/config/asterisk/addons.makeopts menuselect.makeopts
130 # make and install asterisk-addons
131 cd $(DIR_SRC)/asterisk-addons-* && make $(MAKETUNING) all
132 cd $(DIR_SRC)/asterisk-addons-* && make install
133 cd $(DIR_SRC)/asterisk-addons-* && make samples
134
135 # add german sounds and remove README.txt
61d0d586
MT
136 tar xfz $(DIR_DL)/asterisk-1.4-de-prompts.tar.gz -C /var/lib/asterisk/sounds/
137 -rm -f /var/lib/asterisk/sounds/README.txt
b6541fec
AF
138
139 # remove build directories
61d0d586 140 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-*
b6541fec
AF
141
142 # copy additional ipfire scripts for asterisk
42dc0090
CS
143 -mkdir -p /var/ipfire/asterisk
144 cp -vrf $(DIR_SRC)/config/asterisk/* /var/ipfire/asterisk/
145 chmod o+w /var/ipfire/asterisk
6257cba2 146 chown nobody:nobody -R /var/ipfire/asterisk
42dc0090 147 ln -f -s /var/ipfire/asterisk/wakeup/wakeup.sh /etc/fcron.minutely/wakeup.sh
b6541fec
AF
148
149 # build and install chan capi (needed for isdn)
83bac7f3
MT
150 cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(CHAN_CAPI).tar.gz
151 cd $(DIR_SRC)/$(CHAN_CAPI) && make $(MAKETUNING)
152 cd $(DIR_SRC)/$(CHAN_CAPI) && make install
b6541fec
AF
153 @rm -rf $(DIR_SRC)/$(CHAN_CAPI)
154
b6541fec
AF
155 # be sure all source is removed
156 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-*
157
158 # remember backup-location
ef3002be 159 install -v -m 644 $(DIR_SRC)/config/backup/includes/asterisk /var/ipfire/backup/addons/includes/asterisk
b6541fec
AF
160
161 # generate softlink (or asterisk will not work properly)
162 ln -sf /var/ipfire/asterisk /etc/asterisk
163
164 # make asterisk start with reboot
165 ln -sf /etc/rc.d/init.d/asterisk /etc/rc.d/rc0.d/K30asterisk
166 ln -sf /etc/rc.d/init.d/asterisk /etc/rc.d/rc6.d/K30asterisk
167 ln -sf /etc/rc.d/init.d/asterisk /etc/rc.d/rc3.d/S30asterisk
168
169 # all done
5e69ef1a 170 @$(POSTBUILD)