]>
Commit | Line | Data |
---|---|---|
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 | ||
25 | include Config | |
26 | ||
83bac7f3 | 27 | VER = 1.4.18 |
5e69ef1a MT |
28 | |
29 | THISAPP = asterisk-$(VER) | |
30 | DL_FILE = $(THISAPP).tar.gz | |
1751628e | 31 | DL_FROM = $(URL_IPFIRE) |
5e69ef1a MT |
32 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
33 | TARGET = $(DIR_INFO)/$(THISAPP) | |
a8b159e7 | 34 | PROG = asterisk |
cc3232ce | 35 | PAK_VER = 4 |
5e69ef1a | 36 | |
83bac7f3 MT |
37 | CHAN_CAPI = chan_capi-1.0.2 |
38 | ||
41af06f3 | 39 | DEPS = "libpri spandsp sox" |
3489ebac | 40 | |
5e69ef1a MT |
41 | ############################################################################### |
42 | # Top-level Rules | |
43 | ############################################################################### | |
44 | ||
45 | objects = $(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 \ | |
3926e90d | 50 | agx-ast-addons-1.4.5.tar.bz2 \ |
83bac7f3 | 51 | $(CHAN_CAPI).tar.gz |
5e69ef1a MT |
52 | |
53 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
83bac7f3 | 54 | asterisk-core-sounds-en-alaw-1.4.8.tar.gz = $(URL_IPFIRE)/asterisk-core-sounds-en-alaw-1.4.8.tar.gz |
2a139f5c | 55 | asterisk-extra-sounds-en-alaw-1.4.7.tar.gz = $(URL_IPFIRE)/asterisk-extra-sounds-en-alaw-1.4.7.tar.gz |
61d0d586 | 56 | asterisk-1.4-de-prompts.tar.gz = $(URL_IPFIRE)/asterisk-1.4-de-prompts.tar.gz |
83bac7f3 | 57 | asterisk-addons-1.4.5.tar.gz = $(URL_IPFIRE)/asterisk-addons-1.4.5.tar.gz |
3926e90d | 58 | agx-ast-addons-1.4.5.tar.bz2 = $(URL_IPFIRE)/agx-ast-addons-1.4.5.tar.bz2 |
83bac7f3 | 59 | $(CHAN_CAPI).tar.gz = $(URL_IPFIRE)/$(CHAN_CAPI).tar.gz |
5e69ef1a | 60 | |
83bac7f3 MT |
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 | |
61d0d586 | 64 | asterisk-1.4-de-prompts.tar.gz_MD5 = 626a2b95071a5505851e43874dfbfd5c |
83bac7f3 | 65 | asterisk-addons-1.4.5.tar.gz_MD5 = 8de9922c0a93321941f29a77a2f1bf13 |
3926e90d | 66 | agx-ast-addons-1.4.5.tar.bz2_MD5 = a28f73d041769ea103e59b7f96c13d5e |
83bac7f3 | 67 | $(CHAN_CAPI).tar.gz_MD5 = d4732ecc008e8ef45c38bd2f4d70ef44 |
5e69ef1a MT |
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: | |
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) | |
3926e90d MT |
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) | |
6f61f8c6 | 101 | cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/var/ipfire |
73bbccca MT |
102 | cd $(DIR_APP) && cp -fv $(DIR_SRC)/config/asterisk/asterisk.makeopts \ |
103 | menuselect.makeopts | |
83bac7f3 MT |
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 | |
6f61f8c6 MT |
108 | cd $(DIR_APP) && make $(MAKETUNING) all |
109 | cd $(DIR_APP) && make install | |
110 | cd $(DIR_APP) && make samples | |
83bac7f3 | 111 | cd $(DIR_SRC) && tar zxf $(DIR_DL)/asterisk-addons-1.4.5.tar.gz |
61d0d586 MT |
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 | |
6f61f8c6 | 116 | cd $(DIR_SRC)/asterisk-addons-* && make $(MAKETUNING) all install |
61d0d586 MT |
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-* | |
42dc0090 CS |
120 | -mkdir -p /var/ipfire/asterisk |
121 | cp -vrf $(DIR_SRC)/config/asterisk/* /var/ipfire/asterisk/ | |
122 | chmod o+w /var/ipfire/asterisk | |
6257cba2 | 123 | chown nobody:nobody -R /var/ipfire/asterisk |
42dc0090 | 124 | ln -f -s /var/ipfire/asterisk/wakeup/wakeup.sh /etc/fcron.minutely/wakeup.sh |
83bac7f3 MT |
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 | ||
3926e90d MT |
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 | |
ef3002be | 135 | install -v -m 644 $(DIR_SRC)/config/backup/includes/asterisk /var/ipfire/backup/addons/includes/asterisk |
5e69ef1a | 136 | @$(POSTBUILD) |