]> git.ipfire.org Git - ipfire-2.x.git/blob - lfs/asterisk
Updated kernel to 2.6.24.7
[ipfire-2.x.git] / lfs / asterisk
1 ###############################################################################
2 # #
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 #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
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 #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include Config
26
27 VER = 1.4.18
28
29 THISAPP = asterisk-$(VER)
30 DL_FILE = $(THISAPP).tar.gz
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33 TARGET = $(DIR_INFO)/$(THISAPP)
34 PROG = asterisk
35 PAK_VER = 3
36
37 CHAN_CAPI = chan_capi-1.0.2
38
39 DEPS = "sox libpri spandsp libmad"
40
41 ###############################################################################
42 # Top-level Rules
43 ###############################################################################
44
45 objects = $(DL_FILE) \
46 asterisk-1.4-de-prompts.tar.gz \
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 agx-ast-addons-1.4.5.tar.bz2 \
51 $(CHAN_CAPI).tar.gz
52
53 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
54 asterisk-core-sounds-en-alaw-1.4.8.tar.gz = $(URL_IPFIRE)/asterisk-core-sounds-en-alaw-1.4.8.tar.gz
55 asterisk-extra-sounds-en-alaw-1.4.7.tar.gz = $(URL_IPFIRE)/asterisk-extra-sounds-en-alaw-1.4.7.tar.gz
56 asterisk-1.4-de-prompts.tar.gz = $(URL_IPFIRE)/asterisk-1.4-de-prompts.tar.gz
57 asterisk-addons-1.4.5.tar.gz = $(URL_IPFIRE)/asterisk-addons-1.4.5.tar.gz
58 agx-ast-addons-1.4.5.tar.bz2 = $(URL_IPFIRE)/agx-ast-addons-1.4.5.tar.bz2
59 $(CHAN_CAPI).tar.gz = $(URL_IPFIRE)/$(CHAN_CAPI).tar.gz
60
61 $(DL_FILE)_MD5 = 3d8b2b2ef4f202901771663b40f19c3d
62 asterisk-core-sounds-en-alaw-1.4.8.tar.gz_MD5 = e708a5510a61217725b6ad663287dfa0
63 asterisk-extra-sounds-en-alaw-1.4.7.tar.gz_MD5 = ecc50bd2b9b29d8237911272248c5d35
64 asterisk-1.4-de-prompts.tar.gz_MD5 = 626a2b95071a5505851e43874dfbfd5c
65 asterisk-addons-1.4.5.tar.gz_MD5 = 8de9922c0a93321941f29a77a2f1bf13
66 agx-ast-addons-1.4.5.tar.bz2_MD5 = a28f73d041769ea103e59b7f96c13d5e
67 $(CHAN_CAPI).tar.gz_MD5 = d4732ecc008e8ef45c38bd2f4d70ef44
68
69 install : $(TARGET)
70
71 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
72
73 download :$(patsubst %,$(DIR_DL)/%,$(objects))
74
75 md5 : $(subst %,%_MD5,$(objects))
76
77 dist:
78 $(PAK)
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)
99 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-* $(DIR_SRC)/$(CHAN_CAPI) \
100 $(DIR_SRC)/agx-ast-addons && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
101 cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/var/ipfire
102 # cd $(DIR_APP) && cp -fv $(DIR_SRC)/config/asterisk/asterisk.makeopts \
103 # menuselect.makeopts
104 cd $(DIR_APP) && cp -fv $(DIR_DL)/asterisk-core-sounds-en-alaw-1.4.8.tar.gz \
105 $(DIR_APP)/sounds/asterisk-core-sounds-en-alaw-1.4.8.tar.gz
106 cd $(DIR_APP) && cp -fv $(DIR_DL)/asterisk-extra-sounds-en-alaw-1.4.7.tar.gz \
107 $(DIR_APP)/sounds/asterisk-extra-sounds-en-alaw-1.4.7.tar.gz
108 cd $(DIR_APP) && make $(MAKETUNING) all
109 cd $(DIR_APP) && make install
110 cd $(DIR_APP) && make samples
111 cd $(DIR_SRC) && tar zxf $(DIR_DL)/asterisk-addons-1.4.5.tar.gz
112 cd $(DIR_SRC)/asterisk-addons-* && ./configure --prefix=/usr \
113 --sysconfdir=/var/ipfire
114 cd $(DIR_SRC)/asterisk-addons-* && cp -f $(DIR_SRC)/config/asterisk/addons.makeopts \
115 menuselect.makeopts
116 cd $(DIR_SRC)/asterisk-addons-* && make $(MAKETUNING) all install
117 tar xfz $(DIR_DL)/asterisk-1.4-de-prompts.tar.gz -C /var/lib/asterisk/sounds/
118 -rm -f /var/lib/asterisk/sounds/README.txt
119 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-*
120 -mkdir -p /var/ipfire/asterisk
121 cp -vrf $(DIR_SRC)/config/asterisk/* /var/ipfire/asterisk/
122 chmod o+w /var/ipfire/asterisk
123 chown nobody:nobody -R /var/ipfire/asterisk
124 ln -f -s /var/ipfire/asterisk/wakeup/wakeup.sh /etc/fcron.minutely/wakeup.sh
125
126 cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(CHAN_CAPI).tar.gz
127 cd $(DIR_SRC)/$(CHAN_CAPI) && make $(MAKETUNING)
128 cd $(DIR_SRC)/$(CHAN_CAPI) && make install
129
130 cd $(DIR_SRC) && tar jxf $(DIR_DL)/agx-ast-addons-1.4.5.tar.bz2
131 cd $(DIR_SRC)/agx-ast-addons && ./build.sh
132
133 @rm -rf $(DIR_APP) $(DIR_SRC)/asterisk-* $(DIR_SRC)/$(CHAN_CAPI) \
134 $(DIR_SRC)/agx-ast-addons
135 install -v -m 644 $(DIR_SRC)/config/backup/includes/asterisk /var/ipfire/backup/addons/includes/asterisk
136 @$(POSTBUILD)